diff --git a/Definitions/angular-1.0.2.d.ts b/Definitions/angular-1.0.2.d.ts index d5f9980c4..540929e48 100644 --- a/Definitions/angular-1.0.2.d.ts +++ b/Definitions/angular-1.0.2.d.ts @@ -372,6 +372,7 @@ module ng { interface IDeferred { resolve(value?: any): void; reject(reason?: string): void; + promise: IPromise; } /////////////////////////////////////////////////////////////////////////// @@ -636,4 +637,4 @@ module ng { } -} +} \ No newline at end of file diff --git a/Definitions/angular-cookies-1.0.2.d.ts b/Definitions/angular-cookies-1.0.2.d.ts index 39e878efc..dc15927b2 100644 --- a/Definitions/angular-cookies-1.0.2.d.ts +++ b/Definitions/angular-cookies-1.0.2.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Angular JS 1.0.2 (ngCookies module) +/// Type definitions for Angular JS 1.0.2 (ngCookies module) // Project: http://angularjs.org // Definitions by: Diego Vilar // Definitions: https://github.com/borisyankov/DefinitelyTyped diff --git a/Definitions/jquery.dynatree-1.2.d.ts b/Definitions/jquery.dynatree-1.2.d.ts new file mode 100644 index 000000000..f4502aca7 --- /dev/null +++ b/Definitions/jquery.dynatree-1.2.d.ts @@ -0,0 +1,240 @@ +// Type definitions for jquery.dynagrid 1.2 +// Project: http://code.google.com/p/dynatree/ +// Definitions by: https://github.com/fdecampredon +// Definitions: https://github.com/borisyankov/DefinitelyTyped + + +interface JQuery { + dynatree(options?: DynatreeOptions): DynaTree; + dynatree(option?: string, ...rest: any[]): any; +} + +interface JQueryStatic { + ui: { + dynatree: DynatreeNamespace; + }; +} + +interface DynaTree { + activateKey(key: string): DynaTreeNode; + count(): number; + enable(): void; + disable(): void; + enableUpdate(enable: bool): void; + getActiveNode(): DynaTreeNode; + getNodeByKey(key: string): DynaTreeNode; + getPersistData(): any; + getRoot(): DynaTreeNode; + getSelectedNodes(stopOnParents: bool): DynaTreeNode[]; + initialize(): void; + isInitializing(): bool; + isReloading(): bool; + isUserEvent(): bool; + loadKeyPath(keyPath: string, callback: (node: DynaTreeNode, status: string) =>void ): void; + reactivate(setFocus: bool): void; + redraw(): void; + reload(): void; + renderInvisibleNodes(): void; + selectKey(key: string, flag: string): DynaTreeNode; + serializeArray(stopOnParents: bool): any[]; + toDict(): any; + visit(fn: (node: DynaTreeNode) =>bool, includeRoot: bool): void; +} + + +interface DynaTreeNode { + data: DynaTreeDataModel; + activate(): void; + activateSilently(): void; + addChild(nodeData: DynaTreeDataModel, beforeNode?: DynaTreeNode): void; + addChild(nodeData: DynaTreeDataModel[], beforeNode?: DynaTreeNode): void; + appendAjax(ajaxOptions: JQueryAjaxSettings): void; + countChildren(): number; + deactivate(): void; + expand(flag: string): void; + focus(): void; + getChildren(): DynaTreeNode[]; + getEventTargetType(event: Event): string; + getLevel(): number; + getNextSibling(): DynaTreeNode; + getParent(): DynaTreeNode; + getPrevSibling(): DynaTreeNode; + hasChildren(): bool; + isActive(): bool; + isChildOf(otherNode: DynaTreeNode): bool; + isDescendantOf(otherNode: DynaTreeNode): bool; + isExpanded(): bool; + isFirstSibling(): bool; + isFocused(): bool; + isLastSibling(): bool; + isLazy(): bool; + isLoading(): bool; + isSelected(): bool; + isStatusNode(): bool; + isVisible(): bool; + makeVisible(): bool; + move(targetNode: DynaTreeNode, mode: string): bool; + reload(force: bool): void; + remove(): void; + removeChildren(): void; + render(useEffects: bool, includeInvisible: bool): void; + resetLazy(): void; + scheduleAction(mode: string, ms: number); + select(flag: string): void; + setLazyNodeStatus(status: number): void; + setTitle(title: string): void; + sortChildren(cmp?: (a: DynaTreeNode, b: DynaTreeNode) =>number, deep?: bool); + toDict(recursive: bool, callback?: (node: any) =>any): any; + toggleExpand(): void; + toggleSelect(): void; + visit(fn: (node: DynaTreeNode) =>bool, includeSelf: bool): void; + visitParents(fn: (node: DynaTreeNode) =>bool, includeSelf: bool): void; +} + +interface DynatreeOptions { + title?: string; // Tree's name (only used for debug outpu) + minExpandLevel?: number; // 1: root node is not collapsible + imagePath?: string; // Path to a folder containing icons. Defaults to 'skin/' subdirectory. + children?: DynaTreeDataModel[]; // Init tree structure from this object array. + initId?: string; // Init tree structure from a