Skip to content

Instantly share code, notes, and snippets.

@leefsmp
Created September 10, 2015 13:49
Show Gist options
  • Save leefsmp/eff56368c6b246d114fb to your computer and use it in GitHub Desktop.
Save leefsmp/eff56368c6b246d114fb to your computer and use it in GitHub Desktop.
TypeScript declarations for View & Data Client API
declare module Autodesk {
export module Viewing {
export function Initializer(
options: InitializerOptions,
callback: () => void): void;
interface InitializerOptions {
env: string;
getAccessToken: Function;
refreshToken: Function;
}
export class Document {
static load(
documentId: string,
successCallback: (doc: Document) => void,
errorCallback: (msg: string) => void): void;
static getSubItemsWithProperties(
item: Object,
properties: Properties,
recursive: boolean): Object[];
getRootItem(): Object;
getViewablePath(item: Object): string;
}
interface Properties {
type: string;
role: string;
}
}
export module Viewing.Private {
export class GuiViewer3D {
constructor(container: HTMLElement);
start(): void;
load(path: any): void;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment