From 54d6e6fb6ba332294e8183b6d63d5585ed139537 Mon Sep 17 00:00:00 2001 From: Dave Allen Date: Wed, 10 Jun 2015 12:19:26 -0700 Subject: [PATCH 01/30] Added _.includes method. This closes #4610. --- lodash/lodash-tests.ts | 5 ++++ lodash/lodash.d.ts | 53 +++++++++++++++++++++++++++++++++++------- 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 633c4ed0d..1484ac048 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -371,6 +371,11 @@ result = _.include([1, 2, 3], 1, 2); result = _.include({ 'name': 'moe', 'age': 40 }, 'moe'); result = _.include('curly', 'ur'); +result = _.includes([1, 2, 3], 1); +result = _.includes([1, 2, 3], 1, 2); +result = _.includes({ 'name': 'moe', 'age': 40 }, 'moe'); +result = _.includes('curly', 'ur'); + result = <_.Dictionary>_.countBy([4.3, 6.1, 6.4], function (num) { return Math.floor(num); }); result = <_.Dictionary>_.countBy([4.3, 6.1, 6.4], function (num) { return this.floor(num); }, Math); result = <_.Dictionary>_.countBy(['one', 'two', 'three'], 'length'); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 9cb55485d..86e72e468 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -2172,7 +2172,7 @@ declare module _ { ...indexes: number[]): T[]; } - //_.contains + //_.includes interface LoDashStatic { /** * Checks if a given value is present in a collection using strict equality for comparisons, @@ -2182,13 +2182,49 @@ declare module _ { * @param fromIndex The index to search from. * @return True if the target element is found, else false. **/ + includes( + collection: Array, + target: T, + fromIndex?: number): boolean; + + /** + * @see _.includes + **/ + includes( + collection: List, + target: T, + fromIndex?: number): boolean; + + /** + * @see _.includes + * @param dictionary The dictionary to iterate over. + * @param key The key in the dictionary to search for. + **/ + includes( + dictionary: Dictionary, + key: string, + fromIndex?: number): boolean; + + /** + * @see _.includes + * @param searchString the string to search + * @param targetString the string to search for + **/ + includes( + searchString: string, + targetString: string, + fromIndex?: number): boolean; + + /** + * @see _.includes + **/ contains( collection: Array, target: T, fromIndex?: number): boolean; /** - * @see _.contains + * @see _.includes **/ contains( collection: List, @@ -2196,7 +2232,7 @@ declare module _ { fromIndex?: number): boolean; /** - * @see _.contains + * @see _.includes * @param dictionary The dictionary to iterate over. * @param key The key in the dictionary to search for. **/ @@ -2206,7 +2242,7 @@ declare module _ { fromIndex?: number): boolean; /** - * @see _.contains + * @see _.includes * @param searchString the string to search * @param targetString the string to search for **/ @@ -2215,8 +2251,9 @@ declare module _ { targetString: string, fromIndex?: number): boolean; + /** - * @see _.contains + * @see _.includes **/ include( collection: Array, @@ -2224,7 +2261,7 @@ declare module _ { fromIndex?: number): boolean; /** - * @see _.contains + * @see _.includes **/ include( collection: List, @@ -2232,7 +2269,7 @@ declare module _ { fromIndex?: number): boolean; /** - * @see _.contains + * @see _.includes **/ include( dictionary: Dictionary, @@ -2240,7 +2277,7 @@ declare module _ { fromIndex?: number): boolean; /** - * @see _.contains + * @see _.includes **/ include( searchString: string, From 7aa3a226d7e0b2d6e2978c495c3566f3f847577c Mon Sep 17 00:00:00 2001 From: Joe Skeen Date: Mon, 28 Sep 2015 16:04:43 -0600 Subject: [PATCH 02/30] Added documentation to browser-sync.d.ts --- browser-sync/browser-sync-tests.ts | 3 +- browser-sync/browser-sync.d.ts | 343 ++++++++++++++++++++++++++--- 2 files changed, 318 insertions(+), 28 deletions(-) diff --git a/browser-sync/browser-sync-tests.ts b/browser-sync/browser-sync-tests.ts index f5c02292c..4b2c0bb54 100644 --- a/browser-sync/browser-sync-tests.ts +++ b/browser-sync/browser-sync-tests.ts @@ -79,9 +79,10 @@ bs.init({ bs.reload(); -function browserSyncInit(): browserSync.BrowserSync { +function browserSyncInit(): typeof browserSync { var browser = browserSync.create(); browser.init(); return browser; } var browser = browserSyncInit(); +browser.exit(); diff --git a/browser-sync/browser-sync.d.ts b/browser-sync/browser-sync.d.ts index 70e8dc1c1..9f081f663 100644 --- a/browser-sync/browser-sync.d.ts +++ b/browser-sync/browser-sync.d.ts @@ -1,6 +1,6 @@ // Type definitions for browser-sync // Project: http://www.browsersync.io/ -// Definitions by: Asana +// Definitions by: Asana , Joe Skeen // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -12,55 +12,280 @@ declare module "browser-sync" { import http = require("http"); interface Options { + /** + * Browsersync includes a user-interface that is accessed via a separate port. The UI allows to controls + * all devices, push sync updates and much more. + * + * port - Default: 3001 + * weinre.port - Default: 8080 + * Note: requires at least version 2.0.0 + */ + ui?: UIOptions; + /** + * Browsersync can watch your files as you work. Changes you make will either be injected into the page (CSS + * & images) or will cause all browsers to do a full-page refresh. See anymatch for more information on glob + * patterns. + * Default: false + */ files?: string | string[]; - watchOptions?: GazeOptions; + /** + * File watching options that get passed along to Chokidar. Check their docs for available options + * Default: undefined + * Note: requires at least version 2.6.0 + */ + watchOptions?: ChokidarOptions; + /** + * Use the built-in static server for basic HTML/JS/CSS websites. + * Default: false + */ server?: ServerOptions; - proxy?: string | boolean; + /** + * Proxy an EXISTING vhost. Browsersync will wrap your vhost with a proxy URL to view your site. + * target - Default: undefined + * ws - Default: undefined + * middleware - Default: undefined + * reqHeaders - Default: undefined + * proxyRes - Default: undefined + */ + proxy?: string | boolean | ProxyOptions; + /** + * Use a specific port (instead of the one auto-detected by Browsersync) + * Default: 3000 + */ port?: number; + /** + * Add additional directories from which static files should be served. + * Should only be used in proxy or snippet mode. + * Default: [] + * Note: requires at least version 2.8.0 + */ + serveStatic?: string[]; + /** + * Enable https for localhost development. + * Note - this is not needed for proxy option as it will be inferred from your target url. + * Note: requires at least version 1.3.0 + */ https?: boolean; + /** + * Clicks, Scrolls & Form inputs on any device will be mirrored to all others. + * clicks - Default: true + * scroll - Default: true + * forms - Default: true + */ ghostMode?: GhostOptions | boolean; + /** + * Can be either "info", "debug", "warn", or "silent" + * Default: info + */ logLevel?: string; + /** + * Change the console logging prefix. Useful if you're creating your own project based on Browsersync + * Default: BS + * Note: requires at least version 1.5.1 + */ logPrefix?: string; + /** + * Whether or not to log connections + * Default: false + */ logConnections?: boolean; + /** + * Whether or not to log information about changed files + * Default: false + */ logFileChanges?: boolean; + /** + * Log the snippet to the console when you're in snippet mode (no proxy/server) + * Default: true + * Note: requires at least version 1.5.2 + */ logSnippet?: boolean; + /** + * You can control how the snippet is injected onto each page via a custom regex + function. + * You can also provide patterns for certain urls that should be ignored from the snippet injection. + * Note: requires at least version 2.0.0 + */ snippetOptions?: SnippetOptions; + /** + * Add additional HTML rewriting rules. + * Default: false + * Note: requires at least version 2.4.0 + */ rewriteRules?: boolean | RewriteRules[]; + /** + * Tunnel the Browsersync server through a random Public URL + * Default: null + */ tunnel?: string | boolean; + /** + * Some features of Browsersync (such as xip & tunnel) require an internet connection, but if you're + * working offline, you can reduce start-up time by setting this option to false + */ online?: boolean; + /** + * Default: true + * Decide which URL to open automatically when Browsersync starts. Defaults to "local" if none set. + * Can be true, local, external, ui, ui-external, tunnel or false + */ open?: string | boolean; + /** + * The browser(s) to open + * Default: default + */ browser?: string | string[]; + /** + * Requires an internet connection - useful for services such as Typekit as it allows you to configure + * domains such as *.xip.io in your kit settings + * Default: false + */ xip?: boolean; + /** + * Reload each browser when Browsersync is restarted. + * Default: false + */ + reloadOnRestart?: boolean; + /** + * The small pop-over notifications in the browser are not always needed/wanted. + * Default: true + */ notify?: boolean; - scrollProportionally?: boolean; + /** + * scrollProportionally: false // Sync viewports to TOP position + * Default: true + */ + scrollProportionally?: boolean + /** + * How often to send scroll events + * Default: 0 + */ scrollThrottle?: number; + /** + * Decide which technique should be used to restore scroll position following a reload. + * Can be window.name or cookie + * Default: 'window.name' + */ + scrollRestoreTechnique?: string; + /** + * Sync the scroll position of any element on the page. Add any amount of CSS selectors + * Default: [] + * Note: requires at least version 2.9.0 + */ + scrollElements?: string[]; + /** + * Default: [] + * Note: requires at least version 2.9.0 + * Sync the scroll position of any element on the page - where any scrolled element will cause + * all others to match scroll position. This is helpful when a breakpoint alters which element + * is actually scrolling + */ + scrollElementMapping?: string[]; + /** + * Time, in milliseconds, to wait before instructing the browser to reload/inject following a file change event + * Default: 0 + */ reloadDelay?: number; + /** + * Restrict the frequency in which browser:reload events can be emitted to connected clients + * Default: 0 + * Note: requires at least version 2.6.0 + */ reloadDebounce?: number; + /** + * User provided plugins + * Default: [] + * Note: requires at least version 2.6.0 + */ plugins?: any[]; + /** + * Whether to inject changes (rather than a page refresh) + * Default: true + */ injectChanges?: boolean; + /** + * The initial path to load + */ startPath?: string; + /** + * Whether to minify the client script + * Default: true + */ minify?: boolean; + /** + * Override host detection if you know the correct IP to use + */ host?: string; + /** + * Send file-change events to the browser + * Default: true + */ codeSync?: boolean; + /** + * Append timestamps to injected files + * Default: true + */ timestamps?: boolean; + /** + * Alter the script path for complete control over where the Browsersync Javascript is served + * from. Whatever you return from this function will be used as the script path. + * Note: requires at least version 1.5.0 + */ scriptPath?: (path: string) => string; + /** + * Configure the Socket.IO path and namespace & domain to avoid collisions. + * path - Default: "/browser-sync/socket.io" + * clientPath - Default: "/browser-sync" + * namespace - Default: "/browser-sync" + * domain - Default: undefined + * port - Default: undefined + * clients.heartbeatTimeout - Default: 5000 + * Note: requires at least version 1.6.2 + */ socket?: SocketOptions; } - interface GazeOptions { + interface Hash { + [path: string]: T; + } + + interface ChokidarOptions { interval?: number; debounceDelay?: number; mode?: string; cwd?: string; } + + interface UIOptions { + /** set the default port */ + port?: number; + /** set the default weinre port */ + weinre?: { + port?: number; + }; + } interface ServerOptions { + /** set base directory */ baseDir?: string | string[]; + /** enable directory listing */ directory?: boolean; + /** set index filename */ index?: string; - routes?: {[path: string]: string}; + /** + * key-value object hash, where the key is the url to match, + * and the value is the folder to serve (relative to your working directory) + * */ + routes?: Hash; + /** configure custom middleware */ middleware?: MiddlewareHandler[]; } + + interface ProxyOptions { + target?: string; + middleware?: MiddlewareHandler; + ws: boolean; + reqHeaders: (config) => Hash; + proxyRes: (res: http.ServerResponse, req: http.ServerRequest, next: Function) => any; + } interface MiddlewareHandler { (req: http.ServerRequest, res: http.ServerResponse, next: Function): any; @@ -81,6 +306,9 @@ declare module "browser-sync" { path?: string; clientPath?: string; namespace?: string; + domain?: string; + port?: number; + clients?: { heartbeatTimeout?: number; }; } interface RewriteRules { @@ -88,30 +316,91 @@ declare module "browser-sync" { fn: (match: string) => string; } - module browserSync { - interface BrowserSync { - init(config?: Options, callback?: (err: Error, bs: Object) => any): void; - reload(): void; - reload(file: string): void; - reload(files: string[]): void; - reload(options: {stream: boolean}): NodeJS.ReadWriteStream; - notify(message: string, timeout?: number): void; - exit(): void; - watch(patterns: string, opts?: chokidar.WatchOptions, fn?: (event: string, file: fs.Stats) => any): NodeJS.EventEmitter; - pause(): void; - resume(): void; - emitter: NodeJS.EventEmitter; - active: boolean; - paused: boolean; - } - } - - interface Exports extends browserSync.BrowserSync { - create(): browserSync.BrowserSync; + + interface BrowserSync { (config?: Options, callback?: (err: Error, bs: Object) => any): void; + /** + * Create a Browsersync instance + * @param name an identifier that can used for retrieval later + */ + create(name?: string): BrowserSync; + /** + * Get a single instance by name. This is useful if you have your build scripts in separate files + * @param name the identifier used for retrieval + */ + get(name: string): BrowserSync; + /** + * Start the Browsersync service. This will launch a server, proxy or start the snippet mode + * depending on your use-case. + */ + init(config?: Options, callback?: (err: Error, bs: Object) => any): void; + /** + * Reload the browser + * The reload method will inform all browsers about changed files and will either cause the browser + * to refresh, or inject the files where possible. + */ + reload(): void; + /** + * Reload a single file + * The reload method will inform all browsers about changed files and will either cause the browser + * to refresh, or inject the files where possible. + */ + reload(file: string): void; + /** + * Reload multiple files + * The reload method will inform all browsers about changed files and will either cause the browser + * to refresh, or inject the files where possible. + */ + reload(files: string[]): void; + /** + * The reload method will inform all browsers about changed files and will either cause the browser + * to refresh, or inject the files where possible. + */ + reload(options: {stream: boolean}): NodeJS.ReadWriteStream; + /** + * The stream method returns a transform stream and can act once or on many files. + * @param opts Configuration for the stream method + */ + stream(opts: {once: boolean}): NodeJS.ReadWriteStream; + /** + * Helper method for browser notifications + * @param message Can be a simple message such as 'Connected' or HTML + * @param timeout How long the message will remain in the browser. @since 1.3.0 + */ + notify(message: string, timeout?: number): void; + /** + * This method will close any running server, stop file watching & exit the current process. + */ + exit(): void; + /** + * Stand alone file-watcher. Use this along with Browsersync to create your own, minimal build system + */ + watch(patterns: string, opts?: chokidar.WatchOptions, fn?: (event: string, file: fs.Stats) => any) + : NodeJS.EventEmitter; + /** + * Method to pause file change events + */ + pause(): void; + /** + * Method to resume paused watchers + */ + resume(): void; + /** + * The internal Event Emitter used by the running Browsersync instance (if there is one). You can use + * this to emit your own events, such as changed files, logging etc. + */ + emitter: NodeJS.EventEmitter; + /** + * A simple true/false flag that you can use to determine if there's a currently-running Browsersync instance. + */ + active: boolean; + /** + * A simple true/false flag to determine if the current instance is paused + */ + paused: boolean; } - var browserSync: Exports; + const browserSync: BrowserSync; export = browserSync; } From 596a8af137b4129d2253003952f2840d7f7633a7 Mon Sep 17 00:00:00 2001 From: Joe Skeen Date: Mon, 28 Sep 2015 16:17:56 -0600 Subject: [PATCH 03/30] Fix implicit 'any' --- browser-sync/browser-sync.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser-sync/browser-sync.d.ts b/browser-sync/browser-sync.d.ts index 9f081f663..f189f4ac0 100644 --- a/browser-sync/browser-sync.d.ts +++ b/browser-sync/browser-sync.d.ts @@ -283,7 +283,7 @@ declare module "browser-sync" { target?: string; middleware?: MiddlewareHandler; ws: boolean; - reqHeaders: (config) => Hash; + reqHeaders: (config: any) => Hash; proxyRes: (res: http.ServerResponse, req: http.ServerRequest, next: Function) => any; } From 740c99c0f18ba4010108e22a2f3125adce2480b7 Mon Sep 17 00:00:00 2001 From: Nobuhiro Nakamura Date: Tue, 29 Sep 2015 14:10:58 +0900 Subject: [PATCH 04/30] Add requirejs-domready --- requirejs-domready/domready-tests.ts | 7 +++++++ requirejs-domready/domready-tests.ts.tscparams | 1 + requirejs-domready/domready.d.ts | 15 +++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 requirejs-domready/domready-tests.ts create mode 100644 requirejs-domready/domready-tests.ts.tscparams create mode 100644 requirejs-domready/domready.d.ts diff --git a/requirejs-domready/domready-tests.ts b/requirejs-domready/domready-tests.ts new file mode 100644 index 000000000..fb7b59acd --- /dev/null +++ b/requirejs-domready/domready-tests.ts @@ -0,0 +1,7 @@ +/// + +import domReady = require("domReady"); + +domReady(() => { + return domReady.version; +}); diff --git a/requirejs-domready/domready-tests.ts.tscparams b/requirejs-domready/domready-tests.ts.tscparams new file mode 100644 index 000000000..d8392ee87 --- /dev/null +++ b/requirejs-domready/domready-tests.ts.tscparams @@ -0,0 +1 @@ +--noImplicitAny --target es5 --module amd diff --git a/requirejs-domready/domready.d.ts b/requirejs-domready/domready.d.ts new file mode 100644 index 000000000..a0557e1e0 --- /dev/null +++ b/requirejs-domready/domready.d.ts @@ -0,0 +1,15 @@ +// Type definitions for domReady 2.0.1 +// Project: https://github.com/requirejs/domReady +// Definitions by: Nobuhiro Nakamura +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module "domReady" { + interface DomReady { + (callback: () => any): DomReady; + version: string; + } + + let domReady: DomReady; + + export = domReady; +} From de62c4326435c86ffe5ab90de8d980a7ce61f2b6 Mon Sep 17 00:00:00 2001 From: Joe Skeen Date: Wed, 30 Sep 2015 08:07:12 -0600 Subject: [PATCH 05/30] Fixed problem with using static BrowserSync functions on an instance causing a runtime error --- browser-sync/browser-sync-tests.ts | 4 +++- browser-sync/browser-sync.d.ts | 38 ++++++++++++++++++------------ 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/browser-sync/browser-sync-tests.ts b/browser-sync/browser-sync-tests.ts index 4b2c0bb54..50042410f 100644 --- a/browser-sync/browser-sync-tests.ts +++ b/browser-sync/browser-sync-tests.ts @@ -79,9 +79,11 @@ bs.init({ bs.reload(); -function browserSyncInit(): typeof browserSync { +function browserSyncInit() { var browser = browserSync.create(); browser.init(); + console.log(browser.name); + console.log(browserSync.name); return browser; } var browser = browserSyncInit(); diff --git a/browser-sync/browser-sync.d.ts b/browser-sync/browser-sync.d.ts index f189f4ac0..03b751fab 100644 --- a/browser-sync/browser-sync.d.ts +++ b/browser-sync/browser-sync.d.ts @@ -316,24 +316,32 @@ declare module "browser-sync" { fn: (match: string) => string; } - - interface BrowserSync { - (config?: Options, callback?: (err: Error, bs: Object) => any): void; - /** - * Create a Browsersync instance - * @param name an identifier that can used for retrieval later - */ - create(name?: string): BrowserSync; - /** - * Get a single instance by name. This is useful if you have your build scripts in separate files - * @param name the identifier used for retrieval - */ - get(name: string): BrowserSync; + interface BrowserSyncStatic extends BrowserSyncInstance { /** * Start the Browsersync service. This will launch a server, proxy or start the snippet mode * depending on your use-case. */ - init(config?: Options, callback?: (err: Error, bs: Object) => any): void; + (config?: Options, callback?: (err: Error, bs: Object) => any): BrowserSyncInstance; + /** + * Create a Browsersync instance + * @param name an identifier that can used for retrieval later + */ + create(name?: string): BrowserSyncInstance; + /** + * Get a single instance by name. This is useful if you have your build scripts in separate files + * @param name the identifier used for retrieval + */ + get(name: string): BrowserSyncInstance; + } + + interface BrowserSyncInstance { + /** the name of this instance of browser-sync */ + name: string; + /** + * Start the Browsersync service. This will launch a server, proxy or start the snippet mode + * depending on your use-case. + */ + init(config?: Options, callback?: (err: Error, bs: Object) => any): BrowserSyncInstance; /** * Reload the browser * The reload method will inform all browsers about changed files and will either cause the browser @@ -400,7 +408,7 @@ declare module "browser-sync" { paused: boolean; } - const browserSync: BrowserSync; + const browserSync: BrowserSyncStatic; export = browserSync; } From 5c5a486b7f995e458dd50eada25632463c24f007 Mon Sep 17 00:00:00 2001 From: Niall Crosby Date: Thu, 1 Oct 2015 11:23:43 +0100 Subject: [PATCH 06/30] added types of project ag-Grid --- ag-grid/ag-grid.d-2.1.2.ts | 1991 ++++++++++++++++++++++++++++++++++++ ag-grid/ag-grid.d.ts | 1991 ++++++++++++++++++++++++++++++++++++ 2 files changed, 3982 insertions(+) create mode 100644 ag-grid/ag-grid.d-2.1.2.ts create mode 100644 ag-grid/ag-grid.d.ts diff --git a/ag-grid/ag-grid.d-2.1.2.ts b/ag-grid/ag-grid.d-2.1.2.ts new file mode 100644 index 000000000..cb2fdb5d1 --- /dev/null +++ b/ag-grid/ag-grid.d-2.1.2.ts @@ -0,0 +1,1991 @@ +// Type definitions for ag-grid v2.1.2 +// Project: http://www.ag-grid.com/ +// Definitions by: Niall Crosby +// Definitions: https://github.com/borisyankov/DefinitelyTyped +declare module ag.grid { + class ColumnChangeEvent { + private type; + private column; + private columnGroup; + private fromIndex; + private toIndex; + private pinnedColumnCount; + constructor(type: string); + toString(): string; + withColumn(column: Column): ColumnChangeEvent; + withColumnGroup(columnGroup: ColumnGroup): ColumnChangeEvent; + withFromIndex(fromIndex: number): ColumnChangeEvent; + withPinnedColumnCount(pinnedColumnCount: number): ColumnChangeEvent; + withToIndex(toIndex: number): ColumnChangeEvent; + getFromIndex(): number; + getToIndex(): number; + getPinnedColumnCount(): number; + getType(): string; + getColumn(): Column; + getColumnGroup(): ColumnGroup; + isPivotChanged(): boolean; + isValueChanged(): boolean; + isIndividualColumnResized(): boolean; + } +} +declare module ag.grid { + class Utils { + private static isSafari; + private static isIE; + static iterateObject(object: any, callback: (key: string, value: any) => void): void; + static cloneObject(object: any): any; + static map(array: TItem[], callback: (item: TItem) => TResult): TResult[]; + static forEach(array: T[], callback: (item: T, index: number) => void): void; + static filter(array: T[], callback: (item: T) => boolean): T[]; + static assign(object: any, source: any): void; + static getFunctionParameters(func: any): any; + static find(collection: any, predicate: any, value: any): any; + static toStrings(array: T[]): string[]; + static iterateArray(array: T[], callback: (item: T, index: number) => void): void; + static isNode(o: any): boolean; + static isElement(o: any): boolean; + static isNodeOrElement(o: any): boolean; + static addChangeListener(element: HTMLElement, listener: EventListener): void; + static makeNull(value: any): any; + static removeAllChildren(node: HTMLElement): void; + static removeElement(parent: HTMLElement, cssSelector: string): void; + static removeFromParent(node: Element): void; + static isVisible(element: HTMLElement): boolean; + /** + * loads the template and returns it as an element. makes up for no simple way in + * the dom api to load html directly, eg we cannot do this: document.createElement(template) + */ + static loadTemplate(template: string): Node; + static querySelectorAll_addCssClass(eParent: any, selector: string, cssClass: string): void; + static querySelectorAll_removeCssClass(eParent: any, selector: string, cssClass: string): void; + static querySelectorAll_replaceCssClass(eParent: any, selector: string, cssClassToRemove: string, cssClassToAdd: string): void; + static addOrRemoveCssClass(element: HTMLElement, className: string, addOrRemove: boolean): void; + static addCssClass(element: HTMLElement, className: string): void; + static offsetHeight(element: HTMLElement): number; + static offsetWidth(element: HTMLElement): number; + static removeCssClass(element: HTMLElement, className: string): void; + static removeFromArray(array: T[], object: T): void; + static defaultComparator(valueA: any, valueB: any): number; + static formatWidth(width: number | string): string; + /** + * Tries to use the provided renderer. + */ + static useRenderer(eParent: Element, eRenderer: (params: TParams) => Node | string, params: TParams): void; + /** + * If icon provided, use this (either a string, or a function callback). + * if not, then use the second parameter, which is the svgFactory function + */ + static createIcon(iconName: any, gridOptionsWrapper: any, colDefWrapper: any, svgFactoryFunc: () => Node): HTMLSpanElement; + static addStylesToElement(eElement: any, styles: any): void; + static getScrollbarWidth(): number; + static isKeyPressed(event: KeyboardEvent, keyToCheck: number): boolean; + static setVisible(element: HTMLElement, visible: boolean): void; + static isBrowserIE(): boolean; + static isBrowserSafari(): boolean; + } +} +declare module ag.grid { + class Constants { + static STEP_EVERYTHING: number; + static STEP_FILTER: number; + static STEP_SORT: number; + static STEP_MAP: number; + static ASC: string; + static DESC: string; + static ROW_BUFFER_SIZE: number; + static MIN_COL_WIDTH: number; + static SUM: string; + static MIN: string; + static MAX: string; + static KEY_TAB: number; + static KEY_ENTER: number; + static KEY_BACKSPACE: number; + static KEY_DELETE: number; + static KEY_ESCAPE: number; + static KEY_SPACE: number; + static KEY_DOWN: number; + static KEY_UP: number; + static KEY_LEFT: number; + static KEY_RIGHT: number; + } +} +declare module ag.grid { + class Column { + static colIdSequence: number; + colDef: ColDef; + actualWidth: any; + visible: any; + colId: any; + pinned: boolean; + index: number; + aggFunc: string; + pivotIndex: number; + sort: string; + sortedAt: number; + constructor(colDef: ColDef, actualWidth: any); + isGreaterThanMax(width: number): boolean; + getMinimumWidth(): number; + setMinimum(): void; + } +} +declare module ag.grid { + class ColumnGroup { + pinned: any; + name: any; + allColumns: Column[]; + displayedColumns: Column[]; + expandable: boolean; + expanded: boolean; + actualWidth: number; + constructor(pinned: any, name: any); + getMinimumWidth(): number; + addColumn(column: any): void; + calculateExpandable(): void; + calculateActualWidth(): void; + calculateDisplayedColumns(): void; + addToVisibleColumns(colsToAdd: any): void; + } +} +declare module ag.grid { + class GridOptionsWrapper { + private gridOptions; + private groupHeaders; + private headerHeight; + private rowHeight; + private floatingTopRowData; + private floatingBottomRowData; + init(gridOptions: GridOptions, eventService: EventService): void; + isRowSelection(): boolean; + isRowDeselection(): boolean; + isRowSelectionMulti(): boolean; + getContext(): any; + isVirtualPaging(): boolean; + isShowToolPanel(): boolean; + isToolPanelSuppressPivot(): boolean; + isToolPanelSuppressValues(): boolean; + isRowsAlreadyGrouped(): boolean; + isGroupSelectsChildren(): boolean; + isGroupHidePivotColumns(): boolean; + isGroupIncludeFooter(): boolean; + isGroupSuppressBlankHeader(): boolean; + isSuppressRowClickSelection(): boolean; + isSuppressCellSelection(): boolean; + isSuppressMultiSort(): boolean; + isGroupSuppressAutoColumn(): boolean; + isForPrint(): boolean; + isSuppressHorizontalScroll(): boolean; + isUnSortIcon(): boolean; + isSuppressMenuHide(): boolean; + getRowStyle(): any; + getRowClass(): any; + getRowStyleFunc(): any; + getRowClassFunc(): any; + getHeaderCellRenderer(): any; + getApi(): GridApi; + isEnableColResize(): boolean; + isSingleClickEdit(): boolean; + getGroupDefaultExpanded(): any; + getGroupKeys(): string[]; + getGroupAggFunction(): (nodes: any[]) => any; + getGroupAggFields(): string[]; + getRowData(): any[]; + isGroupUseEntireRow(): boolean; + getGroupColumnDef(): any; + isGroupSuppressRow(): boolean; + isAngularCompileRows(): boolean; + isAngularCompileFilters(): boolean; + isAngularCompileHeaders(): boolean; + isDebug(): boolean; + getColumnDefs(): any[]; + getDatasource(): any; + getRowBuffer(): number; + isEnableSorting(): boolean; + isEnableCellExpressions(): boolean; + isEnableServerSideSorting(): boolean; + isEnableFilter(): boolean; + isEnableServerSideFilter(): boolean; + isSuppressScrollLag(): boolean; + getIcons(): any; + getIsScrollLag(): () => boolean; + getSortingOrder(): string[]; + getSlaveGrids(): GridOptions[]; + getGroupRowRenderer(): Object | Function; + getRowHeight(): number; + getHeaderHeight(): number; + setHeaderHeight(headerHeight: number): void; + isGroupHeaders(): boolean; + setGroupHeaders(groupHeaders: boolean): void; + getFloatingTopRowData(): any[]; + setFloatingTopRowData(rows: any[]): void; + getFloatingBottomRowData(): any[]; + setFloatingBottomRowData(rows: any[]): void; + isExternalFilterPresent(): boolean; + doesExternalFilterPass(node: RowNode): boolean; + getGroupRowInnerRenderer(): (params: any) => void; + getColWidth(): number; + private checkForDeprecated(); + getPinnedColCount(): number; + getLocaleTextFunc(): Function; + globalEventHandler(eventName: string, event?: any): void; + private getCallbackForEvent(eventName); + } +} +declare module ag.grid { + class LoggerFactory { + private logging; + init(gridOptionsWrapper: GridOptionsWrapper): void; + create(name: string): Logger; + } + class Logger { + private logging; + private name; + constructor(name: string, logging: boolean); + log(message: string): void; + } +} +declare module ag.grid { + class Events { + /** A new set of columns has been entered, everything has potentially changed. */ + static EVENT_COLUMN_EVERYTHING_CHANGED: string; + /** A pivot column was added, removed or order changed. */ + static EVENT_COLUMN_PIVOT_CHANGE: string; + /** A value column was added, removed or agg function was changed. */ + static EVENT_COLUMN_VALUE_CHANGE: string; + /** A column was moved */ + static EVENT_COLUMN_MOVED: string; + /** One or more columns was shown / hidden */ + static EVENT_COLUMN_VISIBLE: string; + /** A column group was opened / closed */ + static EVENT_COLUMN_GROUP_OPENED: string; + /** One or more columns was resized. If just one, the column in the event is set. */ + static EVENT_COLUMN_RESIZED: string; + /** One or more columns was resized. If just one, the column in the event is set. */ + static EVENT_COLUMN_PINNED_COUNT_CHANGED: string; + static EVENT_MODEL_UPDATED: string; + static EVENT_CELL_CLICKED: string; + static EVENT_CELL_DOUBLE_CLICKED: string; + static EVENT_CELL_CONTEXT_MENU: string; + static EVENT_CELL_VALUE_CHANGED: string; + static EVENT_CELL_FOCUSED: string; + static EVENT_ROW_SELECTED: string; + static EVENT_SELECTION_CHANGED: string; + static EVENT_BEFORE_FILTER_CHANGED: string; + static EVENT_AFTER_FILTER_CHANGED: string; + static EVENT_FILTER_MODIFIED: string; + static EVENT_BEFORE_SORT_CHANGED: string; + static EVENT_AFTER_SORT_CHANGED: string; + static EVENT_VIRTUAL_ROW_REMOVED: string; + static EVENT_ROW_CLICKED: string; + static EVENT_READY: string; + } +} +declare module ag.grid { + class EventService { + private allListeners; + private globalListeners; + private getListenerList(eventType); + addEventListener(eventType: string, listener: Function): void; + addGlobalListener(listener: Function): void; + removeEventListener(eventType: string, listener: Function): void; + removeGlobalListener(listener: Function): void; + dispatchEvent(eventType: string, event?: any): void; + } +} +declare module ag.grid { + class MasterSlaveService { + private gridOptionsWrapper; + private columnController; + private gridPanel; + private logger; + private eventService; + private consuming; + init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, gridPanel: GridPanel, loggerFactory: LoggerFactory, eventService: EventService): void; + private fireEvent(callback); + private onEvent(callback); + private fireColumnEvent(event); + fireHorizontalScrollEvent(horizontalScroll: number): void; + onScrollEvent(horizontalScroll: number): void; + onColumnEvent(event: ColumnChangeEvent): void; + } +} +declare module ag.grid { + class ColumnApi { + private _columnController; + constructor(_columnController: ColumnController); + sizeColumnsToFit(gridWidth: any): void; + hideColumns(colIds: any, hide: any): void; + columnGroupOpened(group: ColumnGroup, newValue: boolean): void; + getColumnGroup(name: string): ColumnGroup; + getDisplayNameForCol(column: any): string; + getColumn(key: any): Column; + setState(columnState: any): void; + getState(): [any]; + isPinning(): boolean; + getVisibleColAfter(col: Column): Column; + getVisibleColBefore(col: Column): Column; + setColumnVisible(column: Column, visible: boolean): void; + getAllColumns(): Column[]; + getDisplayedColumns(): Column[]; + getPivotedColumns(): Column[]; + getValueColumns(): Column[]; + moveColumn(fromIndex: number, toIndex: number): void; + movePivotColumn(fromIndex: number, toIndex: number): void; + setColumnAggFunction(column: Column, aggFunc: string): void; + setColumnWidth(column: Column, newWidth: number): void; + removeValueColumn(column: Column): void; + addValueColumn(column: Column): void; + removePivotColumn(column: Column): void; + setPinnedColumnCount(count: number): void; + addPivotColumn(column: Column): void; + getHeaderGroups(): ColumnGroup[]; + hideColumn(colId: any, hide: any): void; + } + class ColumnController { + private gridOptionsWrapper; + private angularGrid; + private selectionRendererFactory; + private expressionService; + private masterSlaveController; + private allColumns; + private visibleColumns; + private displayedColumns; + private pivotColumns; + private valueColumns; + private columnGroups; + private setupComplete; + private valueService; + private pinnedColumnCount; + private eventService; + constructor(); + init(angularGrid: Grid, selectionRendererFactory: SelectionRendererFactory, gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, valueService: ValueService, masterSlaveController: MasterSlaveService, eventService: EventService): void; + getColumnApi(): ColumnApi; + isSetupComplete(): boolean; + getHeaderGroups(): ColumnGroup[]; + getPinnedContainerWidth(): number; + addPivotColumn(column: Column): void; + setPinnedColumnCount(count: number): void; + removePivotColumn(column: Column): void; + addValueColumn(column: Column): void; + removeValueColumn(column: Column): void; + private doesColumnExistInGrid(column); + setColumnWidth(column: Column, newWidth: number): void; + private updateGroupWidthsAfterColumnResize(column); + setColumnAggFunction(column: Column, aggFunc: string): void; + movePivotColumn(fromIndex: number, toIndex: number): void; + moveColumn(fromIndex: number, toIndex: number): void; + getBodyContainerWidth(): number; + getValueColumns(): Column[]; + getPivotedColumns(): Column[]; + getDisplayedColumns(): Column[]; + getAllColumns(): Column[]; + setColumnVisible(column: Column, visible: boolean): void; + getVisibleColBefore(col: any): Column; + getVisibleColAfter(col: Column): Column; + isPinning(): boolean; + getState(): [any]; + setState(columnState: any): void; + getColumns(keys: any[]): Column[]; + getColumn(key: any): Column; + getDisplayNameForCol(column: any): string; + getColumnGroup(name: string): ColumnGroup; + onColumnsChanged(): void; + private checkForDeprecatedItems(columnDefs); + columnGroupOpened(group: ColumnGroup, newValue: boolean): void; + hideColumns(colIds: any, hide: any): void; + private updateModel(); + private updateDisplayedColumns(); + sizeColumnsToFit(gridWidth: any): void; + private buildGroups(); + private updateGroups(); + private updateVisibleColumns(); + private updatePinnedColumns(); + private createColumns(colDefs); + private createPivotColumns(); + private createValueColumns(); + private createDummyColumn(field); + private calculateColInitialWidth(colDef); + private getTotalColWidth(includePinned); + } +} +declare module ag.grid { + interface CsvExportParams { + skipHeader?: boolean; + skipFooters?: boolean; + skipGroups?: boolean; + fileName?: string; + } + class CsvCreator { + private rowController; + private columnController; + private grid; + private valueService; + constructor(rowController: InMemoryRowController, columnController: ColumnController, grid: Grid, valueService: ValueService); + exportDataAsCsv(params?: CsvExportParams): void; + getDataAsCsv(params?: CsvExportParams): string; + private createValueForGroupNode(node); + private escape(value); + } +} +declare module ag.grid { + class ExpressionService { + private expressionToFunctionCache; + private logger; + init(loggerFactory: LoggerFactory): void; + evaluate(expression: string, params: any): any; + private createExpressionFunction(expression); + private createFunctionBody(expression); + } +} +declare module ag.grid { + interface TextAndNumberFilterParameters { + /** What to do when new rows are loaded. The default is to reset the filter, to keep it in line with 'set' filters. If you want to keep the selection, then set this value to 'keep'. */ + newRowsAction?: string; + } +} +declare module ag.grid { + class TextFilter implements Filter { + private filterParams; + private filterChangedCallback; + private filterModifiedCallback; + private localeTextFunc; + private valueGetter; + private filterText; + private filterType; + private api; + private eGui; + private eFilterTextField; + private eTypeSelect; + private applyActive; + private eApplyButton; + init(params: any): void; + onNewRowsLoaded(): void; + afterGuiAttached(): void; + doesFilterPass(node: any): boolean; + getGui(): any; + isFilterActive(): boolean; + private createTemplate(); + private createGui(); + private setupApply(); + private onTypeChanged(); + private onFilterChanged(); + private filterChanged(); + private createApi(); + private getApi(); + } +} +declare module ag.grid { + class NumberFilter implements Filter { + private filterParams; + private filterChangedCallback; + private filterModifiedCallback; + private localeTextFunc; + private valueGetter; + private filterNumber; + private filterType; + private api; + private eGui; + private eFilterTextField; + private eTypeSelect; + private applyActive; + private eApplyButton; + init(params: any): void; + onNewRowsLoaded(): void; + afterGuiAttached(): void; + doesFilterPass(node: any): boolean; + getGui(): any; + isFilterActive(): boolean; + private createTemplate(); + private createGui(); + private setupApply(); + private onTypeChanged(); + private filterChanged(); + private onFilterChanged(); + private createApi(); + private getApi(); + } +} +declare module ag.grid { + interface ColDef { + /** If sorting by default, set it here. Set to 'asc' or 'desc' */ + sort?: string; + /** If sorting more than one column by default, the milliseconds when this column was sorted, so we know what order to sort the columns in. */ + sortedAt?: number; + /** The sort order, provide an array with any of the following in any order ['asc','desc',null] */ + sortingOrder?: string[]; + /** The name to render in the column header */ + headerName: string; + /** The field of the row to get the cells data from */ + field: string; + /** Expression or function to get the cells value. */ + headerValueGetter?: string | Function; + /** The unique ID to give the column. This is optional. If missing, the ID will default to the field. If both field and colId are missing, a unique ID will be generated. + * This ID is used to identify the column in the API for sorting, filtering etc. */ + colId?: string; + /** Set to true for this column to be hidden. Naturally you might think, it would make more sense to call this field 'visible' and mark it false to hide, + * however we want all default values to be false and we want columns to be visible by default. */ + hide?: boolean; + /** Tooltip for the column header */ + headerTooltip?: string; + /** Expression or function to get the cells value. */ + valueGetter?: string | Function; + /** To provide custom rendering to the header. */ + headerCellRenderer?: Function | Object; + /** CSS class for the header */ + headerClass?: string | string[] | ((params: any) => string | string[]); + /** Initial width, in pixels, of the cell */ + width?: number; + /** Min width, in pixels, of the cell */ + minWidth?: number; + /** Max width, in pixels, of the cell */ + maxWidth?: number; + /** Class to use for the cell. Can be string, array of strings, or function. */ + cellClass?: string | string[] | ((cellClassParams: any) => string | string[]); + /** An object of css values. Or a function returning an object of css values. */ + cellStyle?: {} | ((params: any) => {}); + /** A function for rendering a cell. */ + cellRenderer?: Function | {}; + /** A function for rendering a floating cell. */ + floatingCellRenderer?: Function | {}; + /** Name of function to use for aggregation. One of [sum,min,max]. */ + aggFunc?: string; + /** Comparator function for custom sorting. */ + comparator?: Function; + /** Set to true to render a selection checkbox in the column. */ + checkboxSelection?: boolean; + /** Set to true if no menu should be shown for this column header. */ + suppressMenu?: boolean; + /** Set to true if no sorting should be done for this column. */ + suppressSorting?: boolean; + /** Set to true if you want the unsorted icon to be shown when no sort is applied to this column. */ + unSortIcon?: boolean; + /** Set to true if you want this columns width to be fixed during 'size to fit' operation. */ + suppressSizeToFit?: boolean; + /** Set to true if you do not want this column to be resizable by dragging it's edge. */ + suppressResize?: boolean; + /** If grouping columns, the group this column belongs to. */ + headerGroup?: string; + /** Whether to show the column when the group is open / closed. */ + headerGroupShow?: string; + /** Set to true if this col is editable, otherwise false. Can also be a function to have different rows editable. */ + editable?: boolean | (Function); + /** Callbacks for editing.See editing section for further details. */ + newValueHandler?: Function; + /** If true, this cell gets refreshed when api.softRefreshView() gets called. */ + volatile?: boolean; + /** Cell template to use for cell. Useful for AngularJS cells. */ + template?: string; + /** Cell template URL to load template from to use for cell. Useful for AngularJS cells. */ + templateUrl?: string; + /** one of the built in filter names: [set, number, text], or a filter function*/ + filter?: string | Function; + /** The filter params are specific to each filter! */ + filterParams?: SetFilterParameters | TextAndNumberFilterParameters; + /** Rules for applying css classes */ + cellClassRules?: { + [cssClassName: string]: (Function | string); + }; + /** Callbacks for editing.See editing section for further details. */ + onCellValueChanged?: Function; + /** Function callback, gets called when a cell is clicked. */ + onCellClicked?: Function; + /** Function callback, gets called when a cell is double clicked. */ + onCellDoubleClicked?: Function; + /** Function callback, gets called when a cell is right clicked. */ + onCellContextMenu?: Function; + } +} +declare module ag.grid { + class SetFilterModel { + private colDef; + private filterParams; + private rowModel; + private valueGetter; + private allUniqueValues; + private availableUniqueValues; + private displayedValues; + private miniFilter; + private selectedValuesCount; + private selectedValuesMap; + private showingAvailableOnly; + private usingProvidedSet; + private doesRowPassOtherFilters; + constructor(colDef: ColDef, rowModel: any, valueGetter: any, doesRowPassOtherFilters: any); + refreshAfterNewRowsLoaded(keepSelection: any, isSelectAll: boolean): void; + refreshAfterAnyFilterChanged(): void; + private createAllUniqueValues(); + private createAvailableUniqueValues(); + private getUniqueValues(filterOutNotAvailable); + setMiniFilter(newMiniFilter: any): boolean; + getMiniFilter(): any; + private processMiniFilter(); + getDisplayedValueCount(): any; + getDisplayedValue(index: any): any; + selectEverything(): void; + isFilterActive(): boolean; + selectNothing(): void; + getUniqueValueCount(): any; + getUniqueValue(index: any): any; + unselectValue(value: any): void; + selectValue(value: any): void; + isValueSelected(value: any): boolean; + isEverythingSelected(): boolean; + isNothingSelected(): boolean; + getModel(): any; + setModel(model: any, isSelectAll: boolean): void; + } +} +/** The filter parameters for set filter */ +declare module ag.grid { + interface SetFilterParameters { + /** Same as cell renderer for grid (you can use the same one in both locations). Setting it separatly here allows for the value to be rendered differently in the filter. */ + cellRenderer?: Function; + /** The height of the cell. */ + cellHeight?: number; + /** The values to display in the filter. */ + values?: any; + /** What to do when new rows are loaded. The default is to reset the filter, as the set of values to select from can have changed. If you want to keep the selection, then set this value to 'keep'. */ + newRowsAction?: string; + /** If true, the filter will not remove items that are no longer availabe due to other filters. */ + suppressRemoveEntries?: boolean; + } +} +declare module ag.grid { + class SetFilter implements Filter { + private eGui; + private filterParams; + private rowHeight; + private model; + private filterChangedCallback; + private filterModifiedCallback; + private valueGetter; + private rowsInBodyContainer; + private colDef; + private localeTextFunc; + private cellRenderer; + private eListContainer; + private eFilterValueTemplate; + private eSelectAll; + private eListViewport; + private eMiniFilter; + private api; + private applyActive; + private eApplyButton; + init(params: any): void; + afterGuiAttached(): void; + isFilterActive(): boolean; + doesFilterPass(node: any): boolean; + getGui(): any; + onNewRowsLoaded(): void; + onAnyFilterChanged(): void; + private createTemplate(); + private createGui(); + private setupApply(); + private setContainerHeight(); + private drawVirtualRows(); + private ensureRowsRendered(start, finish); + private removeVirtualRows(rowsToRemove); + private insertRow(value, rowIndex); + private onCheckboxClicked(eCheckbox, value); + private filterChanged(); + private onMiniFilterChanged(); + private refreshVirtualRows(); + private clearVirtualRows(); + private onSelectAll(); + private updateAllCheckboxes(checked); + private addScrollListener(); + getApi(): any; + private createApi(); + } +} +declare module ag.grid { + class PopupService { + private ePopupParent; + init(ePopupParent: any): void; + positionPopup(eventSource: any, ePopup: any, minWidth: any): void; + addAsModalPopup(eChild: any, closeOnEsc: boolean): (event: any) => void; + } +} +declare module ag.grid { + interface RowNode { + /** Unique ID for the node. Can be though of as the index of the row in the original list, + * however exceptions apply so don't depend on uniqueness. */ + id?: number; + /** The user provided data */ + data?: any; + /** The parent node to this node, or empty if top level */ + parent?: RowNode; + /** How many levels this node is from the top */ + level?: number; + /** True if this node is a group node (ie has children) */ + group?: boolean; + /** True if this is the first child in this group */ + firstChild?: boolean; + /** True if this is the last child in this group */ + lastChild?: boolean; + /** The index of this node in the group */ + childIndex?: number; + /** True if this row is a floating row */ + floating?: boolean; + /** True if this row is a floating top row */ + floatingTop?: boolean; + /** True if this row is a floating bottom row */ + floatingBottom?: boolean; + /** If using quick filter, stores a string representation of the row for searching against */ + quickFilterAggregateText?: string; + /** Groups only - True if row is a footer. Footers have group = true and footer = true */ + footer?: boolean; + /** Groups only - Children of this group */ + children?: RowNode[]; + /** Groups only - The field we are pivoting on eg Country*/ + field?: string; + /** Groups only - The key for the pivot eg Ireland, UK, USA */ + key?: any; + /** Groups only - Filtered children of this group */ + childrenAfterFilter?: RowNode[]; + /** Groups only - Sorted children of this group */ + childrenAfterSort?: RowNode[]; + /** Groups only - Number of children and grand children */ + allChildrenCount?: number; + /** Groups only - True if group is expanded, otherwise false */ + expanded?: boolean; + /** Groups only - If doing footers, reference to the footer node for this group */ + sibling?: RowNode; + /** Not to be used, internal temporary map used by the grid when creating groups */ + _childrenMap?: {}; + } +} +declare module ag.grid { + class FilterManager { + private $compile; + private $scope; + private gridOptionsWrapper; + private grid; + private allFilters; + private rowModel; + private popupService; + private valueService; + private columnController; + private quickFilter; + private advancedFilterPresent; + private externalFilterPresent; + init(grid: Grid, gridOptionsWrapper: GridOptionsWrapper, $compile: any, $scope: any, columnController: ColumnController, popupService: PopupService, valueService: ValueService): void; + setFilterModel(model: any): void; + private setModelOnFilterWrapper(filter, newModel); + getFilterModel(): any; + setRowModel(rowModel: any): void; + isAdvancedFilterPresent(): boolean; + isAnyFilterPresent(): boolean; + isFilterPresentForCol(colId: any): any; + private doesFilterPass(node, filterToSkip?); + setQuickFilter(newFilter: any): boolean; + onFilterChanged(): void; + isQuickFilterPresent(): boolean; + doesRowPassOtherFilters(filterToSkip: any, node: any): boolean; + doesRowPassFilter(node: any, filterToSkip?: any): boolean; + private aggregateRowForQuickFilter(node); + refreshDisplayedValues(): void; + onNewRowsLoaded(): void; + private createValueGetter(column); + getFilterApi(column: Column): any; + private getOrCreateFilterWrapper(column); + private createFilterWrapper(column); + private assertMethodHasNoParameters(theMethod); + showFilter(column: Column, eventSource: any): void; + } +} +declare module ag.grid { + class TemplateService { + templateCache: any; + waitingCallbacks: any; + $scope: any; + init($scope: any): void; + getTemplate(url: any, callback: any): any; + handleHttpResult(httpResult: any, url: any): void; + } +} +declare module ag.grid { + class SelectionRendererFactory { + private angularGrid; + private selectionController; + init(angularGrid: any, selectionController: any): void; + createSelectionCheckbox(node: any, rowIndex: any): HTMLInputElement; + } +} +declare module ag.vdom { + class VElement { + static idSequence: number; + private id; + private elementAttachedListeners; + constructor(); + getId(): number; + addElementAttachedListener(listener: (element: Element) => void): void; + protected fireElementAttached(element: Element): void; + elementAttached(element: Element): void; + toHtmlString(): string; + } +} +declare module ag.vdom { + class VHtmlElement extends VElement { + private type; + private classes; + private eventListeners; + private attributes; + private children; + private innerHtml; + private style; + private bound; + private element; + constructor(type: string); + getElement(): HTMLElement; + setInnerHtml(innerHtml: string): void; + addStyles(styles: any): void; + private attachEventListeners(node); + addClass(newClass: string): void; + removeClass(oldClass: string): void; + addClasses(classes: string[]): void; + toHtmlString(): string; + private toHtmlStringChildren(); + private toHtmlStringAttributes(); + private toHtmlStringClasses(); + private toHtmlStringStyles(); + appendChild(child: any): void; + setAttribute(key: string, value: string): void; + addEventListener(event: string, listener: EventListener): void; + elementAttached(element: Element): void; + fireElementAttachedToChildren(element: Element): void; + } +} +declare module ag.vdom { + class VWrapperElement extends VElement { + private wrappedElement; + constructor(wrappedElement: Element); + toHtmlString(): string; + elementAttached(element: Element): void; + } +} +declare module ag.grid { + class RenderedCell { + private vGridCell; + private vSpanWithValue; + private vCellWrapper; + private vParentOfValue; + private checkboxOnChangeListener; + private column; + private data; + private node; + private rowIndex; + private editingCell; + private scope; + private isFirstColumn; + private gridOptionsWrapper; + private expressionService; + private selectionRendererFactory; + private rowRenderer; + private selectionController; + private $compile; + private templateService; + private cellRendererMap; + private eCheckbox; + private columnController; + private valueService; + private eventService; + private value; + private checkboxSelection; + constructor(isFirstColumn: any, column: any, $compile: any, rowRenderer: RowRenderer, gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, selectionRendererFactory: SelectionRendererFactory, selectionController: SelectionController, templateService: TemplateService, cellRendererMap: { + [key: string]: any; + }, node: any, rowIndex: number, scope: any, columnController: ColumnController, valueService: ValueService, eventService: EventService); + getColumn(): Column; + private getValue(); + getVGridCell(): ag.vdom.VHtmlElement; + private getDataForRow(); + private setupComponents(); + startEditing(key?: number): void; + focusCell(forceBrowserFocus: boolean): void; + private stopEditing(eInput, blurListener, reset?); + createParams(): any; + createEvent(event: any, eventSource: any): any; + private addCellDoubleClickedHandler(); + private addCellContextMenuHandler(); + isCellEditable(): any; + private addCellClickedHandler(); + private populateCell(); + private addStylesFromCollDef(); + private addClassesFromCollDef(); + private addClassesFromRules(); + private addCellNavigationHandler(); + private isKeycodeForStartEditing(key); + createSelectionCheckbox(): void; + setSelected(state: boolean): void; + private createParentOfValue(); + isVolatile(): boolean; + refreshCell(): void; + private putDataIntoCell(); + private useCellRenderer(cellRenderer); + private addClasses(); + } +} +declare module ag.grid { + class RenderedRow { + vPinnedRow: any; + vBodyRow: any; + private renderedCells; + private scope; + private node; + private rowIndex; + private cellRendererMap; + private gridOptionsWrapper; + private parentScope; + private angularGrid; + private columnController; + private expressionService; + private rowRenderer; + private selectionRendererFactory; + private $compile; + private templateService; + private selectionController; + private pinning; + private eBodyContainer; + private ePinnedContainer; + private valueService; + private eventService; + constructor(gridOptionsWrapper: GridOptionsWrapper, valueService: ValueService, parentScope: any, angularGrid: Grid, columnController: ColumnController, expressionService: ExpressionService, cellRendererMap: { + [key: string]: any; + }, selectionRendererFactory: SelectionRendererFactory, $compile: any, templateService: TemplateService, selectionController: SelectionController, rowRenderer: RowRenderer, eBodyContainer: HTMLElement, ePinnedContainer: HTMLElement, node: any, rowIndex: number, eventService: EventService); + onRowSelected(selected: boolean): void; + softRefresh(): void; + getRenderedCellForColumn(column: Column): RenderedCell; + getCellForCol(column: Column): any; + destroy(): void; + private destroyScope(); + isDataInList(rows: any[]): boolean; + isNodeInList(nodes: RowNode[]): boolean; + isGroup(): boolean; + private drawNormalRow(); + private bindVirtualElement(vElement); + private createGroupRow(); + private createGroupSpanningEntireRowCell(padding); + setMainRowWidth(width: number): void; + private createChildScopeOrNull(data); + private addDynamicStyles(); + private createRowContainer(); + getRowNode(): any; + getRowIndex(): any; + refreshCells(colIds: string[]): void; + private addDynamicClasses(); + } +} +declare module ag.grid { + class SvgFactory { + static theInstance: SvgFactory; + static getInstance(): SvgFactory; + createFilterSvg(): Element; + createColumnShowingSvg(): Element; + createColumnHiddenSvg(): Element; + createMenuSvg(): Element; + createArrowUpSvg(): Element; + createArrowLeftSvg(): Element; + createArrowDownSvg(): Element; + createArrowRightSvg(): Element; + createSmallArrowDownSvg(): Element; + createArrowUpDownSvg(): Element; + } +} +declare module ag.grid { + function groupCellRendererFactory(gridOptionsWrapper: GridOptionsWrapper, selectionRendererFactory: SelectionRendererFactory, expressionService: ExpressionService): (params: any) => HTMLSpanElement; +} +declare module ag.grid { + class RowRenderer { + private columnModel; + private gridOptionsWrapper; + private angularGrid; + private selectionRendererFactory; + private gridPanel; + private $compile; + private $scope; + private selectionController; + private expressionService; + private templateService; + private cellRendererMap; + private rowModel; + private firstVirtualRenderedRow; + private lastVirtualRenderedRow; + private focusedCell; + private valueService; + private eventService; + private renderedRows; + private renderedTopFloatingRows; + private renderedBottomFloatingRows; + private eAllBodyContainers; + private eAllPinnedContainers; + private eBodyContainer; + private eBodyViewport; + private ePinnedColsContainer; + private eFloatingTopContainer; + private eFloatingTopPinnedContainer; + private eFloatingBottomContainer; + private eFloatingBottomPinnedContainer; + private eParentsOfRows; + init(columnModel: any, gridOptionsWrapper: GridOptionsWrapper, gridPanel: GridPanel, angularGrid: Grid, selectionRendererFactory: SelectionRendererFactory, $compile: any, $scope: any, selectionController: SelectionController, expressionService: ExpressionService, templateService: TemplateService, valueService: ValueService, eventService: EventService): void; + setRowModel(rowModel: any): void; + onIndividualColumnResized(column: Column): void; + setMainRowWidths(): void; + private findAllElements(gridPanel); + refreshAllFloatingRows(): void; + private refreshFloatingRows(renderedRows, rowData, pinnedContainer, bodyContainer, isTop); + refreshView(refreshFromIndex?: any): void; + softRefreshView(): void; + refreshRows(rowNodes: RowNode[]): void; + refreshCells(rowNodes: RowNode[], colIds: string[]): void; + rowDataChanged(rows: any): void; + private refreshAllVirtualRows(fromIndex); + refreshGroupRows(): void; + private removeVirtualRow(rowsToRemove, fromIndex?); + private unbindVirtualRow(indexToRemove); + drawVirtualRows(): void; + getFirstVirtualRenderedRow(): number; + getLastVirtualRenderedRow(): number; + private ensureRowsRendered(); + private insertRow(node, rowIndex, mainRowWidth); + getRenderedNodes(): any[]; + getIndexOfRenderedNode(node: any): number; + navigateToNextCell(key: any, rowIndex: number, column: Column): void; + private getNextCellToFocus(key, lastCellToFocus); + onRowSelected(rowIndex: number, selected: boolean): void; + focusCell(eCell: any, rowIndex: number, colIndex: number, colDef: ColDef, forceBrowserFocus: any): void; + getFocusedCell(): any; + setFocusedCell(rowIndex: any, colIndex: any): void; + startEditingNextCell(rowIndex: any, column: any, shiftKey: any): void; + } +} +declare module ag.grid { + class SelectionController { + private eParentsOfRows; + private angularGrid; + private gridOptionsWrapper; + private $scope; + private rowRenderer; + private selectedRows; + private selectedNodesById; + private rowModel; + private eventService; + init(angularGrid: Grid, gridPanel: GridPanel, gridOptionsWrapper: GridOptionsWrapper, $scope: any, rowRenderer: RowRenderer, eventService: EventService): void; + private initSelectedNodesById(); + getSelectedNodesById(): any; + getSelectedRows(): any; + getSelectedNodes(): any; + getBestCostNodeSelection(): any; + setRowModel(rowModel: any): void; + deselectAll(): void; + selectAll(): void; + selectNode(node: any, tryMulti: any, suppressEvents?: any): void; + private recursivelySelectAllChildren(node, suppressEvents?); + private recursivelyDeselectAllChildren(node); + private doWorkOfSelectNode(node, suppressEvents); + private addCssClassForNode_andInformVirtualRowListener(node); + private doWorkOfDeselectAllNodes(nodeToKeepSelected?); + private deselectRealNode(node); + private removeCssClassForNode(node); + deselectIndex(rowIndex: any): void; + deselectNode(node: any): void; + selectIndex(index: any, tryMulti: any, suppressEvents?: any): void; + private syncSelectedRowsAndCallListener(suppressEvents?); + private recursivelyCheckIfSelected(node); + isNodeSelected(node: any): boolean; + private updateGroupParentsIfNeeded(); + } +} +declare module ag.grid { + class RenderedHeaderElement { + private eRoot; + private dragStartX; + constructor(eRoot: HTMLElement); + getERoot(): HTMLElement; + destroy(): void; + refreshFilterIcon(): void; + refreshSortIcon(): void; + onDragStart(): void; + onDragging(dragChange: number): void; + onIndividualColumnResized(column: Column): void; + addDragHandler(eDraggableElement: any): void; + stopDragging(listenersToRemove: any): void; + } +} +declare module ag.grid { + class RenderedHeaderCell extends RenderedHeaderElement { + private static DEFAULT_SORTING_ORDER; + private eHeaderCell; + private eSortAsc; + private eSortDesc; + private eSortNone; + private eFilterIcon; + private column; + private gridOptionsWrapper; + private parentScope; + private childScope; + private filterManager; + private columnController; + private $compile; + private angularGrid; + private parentGroup; + private startWidth; + constructor(column: Column, parentGroup: RenderedHeaderGroupCell, gridOptionsWrapper: GridOptionsWrapper, parentScope: any, filterManager: FilterManager, columnController: ColumnController, $compile: any, angularGrid: Grid, eRoot: HTMLElement); + getGui(): HTMLElement; + destroy(): void; + private createScope(); + private addAttributes(); + private addClasses(); + private addMenu(); + private addSortIcons(headerCellLabel); + private setupComponents(); + private useRenderer(headerNameValue, headerCellRenderer, headerCellLabel); + refreshFilterIcon(): void; + refreshSortIcon(): void; + private getNextSortDirection(); + private addSortHandling(headerCellLabel); + onDragStart(): void; + onDragging(dragChange: number): void; + onIndividualColumnResized(column: Column): void; + private addHeaderClassesFromCollDef(); + } +} +declare module ag.grid { + class RenderedHeaderGroupCell extends RenderedHeaderElement { + private eHeaderGroup; + private eHeaderGroupCell; + private eHeaderCellResize; + private columnGroup; + private gridOptionsWrapper; + private columnController; + private children; + private groupWidthStart; + private childrenWidthStarts; + private minWidth; + private parentScope; + private filterManager; + private $compile; + private angularGrid; + constructor(columnGroup: ColumnGroup, gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, eRoot: HTMLElement, angularGrid: Grid, parentScope: any, filterManager: FilterManager, $compile: any); + getGui(): HTMLElement; + destroy(): void; + refreshFilterIcon(): void; + refreshSortIcon(): void; + onIndividualColumnResized(column: Column): void; + private setupComponents(); + private isColumnInOurDisplayedGroup(column); + private setWidthOfGroupHeaderCell(); + private addGroupExpandIcon(eGroupCellLabel); + onDragStart(): void; + onDragging(dragChange: any): void; + } +} +declare module ag.grid { + class HeaderRenderer { + private gridOptionsWrapper; + private columnController; + private angularGrid; + private filterManager; + private $scope; + private $compile; + private ePinnedHeader; + private eHeaderContainer; + private eRoot; + private headerElements; + init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, gridPanel: GridPanel, angularGrid: Grid, filterManager: FilterManager, $scope: any, $compile: any): void; + private findAllElements(gridPanel); + refreshHeader(): void; + private insertHeadersWithGrouping(); + private insertHeadersWithoutGrouping(); + updateSortIcons(): void; + updateFilterIcons(): void; + onIndividualColumnResized(column: Column): void; + } +} +declare module ag.grid { + class GroupCreator { + private valueService; + init(valueService: ValueService): void; + group(rowNodes: RowNode[], groupedCols: Column[], expandByDefault: any): RowNode[]; + isExpanded(expandByDefault: any, level: any): boolean; + } +} +declare module ag.grid { + class InMemoryRowController { + private gridOptionsWrapper; + private columnController; + private angularGrid; + private filterManager; + private $scope; + private allRows; + private rowsAfterGroup; + private rowsAfterFilter; + private rowsAfterSort; + private rowsAfterMap; + private model; + private groupCreator; + private valueService; + private eventService; + constructor(); + init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, angularGrid: any, filterManager: FilterManager, $scope: any, groupCreator: GroupCreator, valueService: ValueService, eventService: EventService): void; + private createModel(); + getModel(): any; + forEachInMemory(callback: Function): void; + forEachNode(callback: Function): void; + forEachNodeAfterFilter(callback: Function): void; + forEachNodeAfterFilterAndSort(callback: Function): void; + private recursivelyWalkNodesAndCallback(list, callback); + updateModel(step: any): void; + private defaultGroupAggFunctionFactory(valueColumns, valueKeys); + doAggregate(): void; + expandOrCollapseAll(expand: boolean, rowNodes: RowNode[]): void; + private recursivelyClearAggData(nodes); + private recursivelyCreateAggData(nodes, groupAggFunction, level); + private doSort(); + private recursivelyResetSort(rowNodes); + private sortList(nodes, sortOptions); + private updateChildIndexes(nodes); + onPivotChanged(): void; + private doPivoting(); + private doFilter(); + private filterItems(rowNodes); + private recursivelyResetFilter(nodes); + setAllRows(rows: RowNode[], firstId?: number): void; + private recursivelyAddIdToNodes(nodes, index); + private recursivelyCheckUserProvidedNodes(nodes, parent, level); + private getTotalChildCount(rowNodes); + private doGroupMapping(); + private addToMap(mappedData, originalNodes); + private createFooterNode(groupNode); + } +} +declare module ag.grid { + class VirtualPageRowController { + rowRenderer: any; + datasourceVersion: any; + gridOptionsWrapper: any; + angularGrid: any; + datasource: any; + virtualRowCount: any; + foundMaxRow: any; + pageCache: any; + pageCacheSize: any; + pageLoadsInProgress: any; + pageLoadsQueued: any; + pageAccessTimes: any; + accessTime: any; + maxConcurrentDatasourceRequests: any; + maxPagesInCache: any; + pageSize: any; + overflowSize: any; + init(rowRenderer: any, gridOptionsWrapper: any, angularGrid: any): void; + setDatasource(datasource: any): void; + reset(): void; + createNodesFromRows(pageNumber: any, rows: any): any; + removeFromLoading(pageNumber: any): void; + pageLoadFailed(pageNumber: any): void; + pageLoaded(pageNumber: any, rows: any, lastRow: any): void; + putPageIntoCacheAndPurge(pageNumber: any, rows: any): void; + checkMaxRowAndInformRowRenderer(pageNumber: any, lastRow: any): void; + isPageAlreadyLoading(pageNumber: any): boolean; + doLoadOrQueue(pageNumber: any): void; + addToQueueAndPurgeQueue(pageNumber: any): void; + findLeastRecentlyAccessedPage(pageIndexes: any): number; + checkQueueForNextLoad(): void; + loadPage(pageNumber: any): void; + requestIsDaemon(datasourceVersionCopy: any): boolean; + getVirtualRow(rowIndex: any): any; + forEachNode(callback: any): void; + getModel(): { + getVirtualRow: (index: any) => any; + getVirtualRowCount: () => any; + forEachInMemory: (callback: any) => void; + forEachNode: (callback: any) => void; + forEachNodeAfterFilter: (callback: any) => void; + forEachNodeAfterFilterAndSort: (callback: any) => void; + }; + } +} +declare module ag.grid { + class PaginationController { + eGui: any; + btNext: any; + btPrevious: any; + btFirst: any; + btLast: any; + lbCurrent: any; + lbTotal: any; + lbRecordCount: any; + lbFirstRowOnPage: any; + lbLastRowOnPage: any; + ePageRowSummaryPanel: any; + angularGrid: any; + callVersion: any; + gridOptionsWrapper: any; + datasource: any; + pageSize: any; + rowCount: any; + foundMaxRow: any; + totalPages: any; + currentPage: any; + init(angularGrid: any, gridOptionsWrapper: any): void; + setDatasource(datasource: any): void; + reset(): void; + setTotalLabels(): void; + calculateTotalPages(): void; + pageLoaded(rows: any, lastRowIndex: any): void; + updateRowLabels(): void; + loadPage(): void; + isCallDaemon(versionCopy: any): boolean; + onBtNext(): void; + onBtPrevious(): void; + onBtFirst(): void; + onBtLast(): void; + isZeroPagesToDisplay(): boolean; + enableOrDisableButtons(): void; + createTemplate(): string; + getGui(): any; + setupComponents(): void; + } +} +declare module ag.grid { + class BorderLayout { + private eNorthWrapper; + private eSouthWrapper; + private eEastWrapper; + private eWestWrapper; + private eCenterWrapper; + private eOverlayWrapper; + private eCenterRow; + private eNorthChildLayout; + private eSouthChildLayout; + private eEastChildLayout; + private eWestChildLayout; + private eCenterChildLayout; + private isLayoutPanel; + private fullHeight; + private layoutActive; + private eGui; + private id; + private childPanels; + private centerHeightLastTime; + private sizeChangeListners; + constructor(params: any); + addSizeChangeListener(listener: Function): void; + fireSizeChanged(): void; + private setupPanels(params); + private setupPanel(content, ePanel); + getGui(): any; + doLayout(): boolean; + private layoutChild(childPanel); + private layoutHeight(); + private layoutHeightFullHeight(); + private layoutHeightNormal(); + getCentreHeight(): number; + private layoutWidth(); + setEastVisible(visible: any): void; + setOverlayVisible(visible: any): void; + setSouthVisible(visible: any): void; + } +} +declare module ag.grid { + class GridPanel { + private masterSlaveService; + private gridOptionsWrapper; + private columnModel; + private rowRenderer; + private rowModel; + private layout; + private forPrint; + private scrollWidth; + private scrollLagCounter; + private eBodyViewport; + private eRoot; + private eBody; + private eBodyContainer; + private ePinnedColsContainer; + private eHeaderContainer; + private ePinnedHeader; + private eHeader; + private eParentsOfRows; + private eBodyViewportWrapper; + private ePinnedColsViewport; + private eFloatingTop; + private ePinnedFloatingTop; + private eFloatingTopContainer; + private eFloatingBottom; + private ePinnedFloatingBottom; + private eFloatingBottomContainer; + init(gridOptionsWrapper: GridOptionsWrapper, columnModel: ColumnController, rowRenderer: RowRenderer, masterSlaveService: MasterSlaveService): void; + getLayout(): BorderLayout; + private setupComponents(); + getPinnedFloatingTop(): HTMLElement; + getFloatingTopContainer(): HTMLElement; + getPinnedFloatingBottom(): HTMLElement; + getFloatingBottomContainer(): HTMLElement; + private createTemplate(); + ensureIndexVisible(index: any): void; + ensureColIndexVisible(index: any): void; + showLoading(loading: any): void; + getWidthForSizeColsToFit(): number; + setRowModel(rowModel: any): void; + getBodyContainer(): HTMLElement; + getBodyViewport(): HTMLElement; + getPinnedColsContainer(): HTMLElement; + getHeaderContainer(): HTMLElement; + getRoot(): HTMLElement; + getPinnedHeader(): HTMLElement; + getRowsParent(): HTMLElement[]; + private queryHtmlElement(selector); + private findElements(); + private mouseWheelListener(event); + setBodyContainerWidth(): void; + setPinnedColContainerWidth(): void; + showPinnedColContainersIfNeeded(): void; + onBodyHeightChange(): void; + private sizeHeaderAndBody(); + private sizeHeaderAndBodyNormal(); + private sizeHeaderAndBodyForPrint(); + setHorizontalScrollPosition(hScrollPosition: number): void; + private addScrollListener(); + private requestDrawVirtualRows(); + private scrollHeader(bodyLeftPosition); + private scrollPinned(bodyTopPosition); + } +} +declare module ag.grid { + class DragAndDropService { + static theInstance: DragAndDropService; + static getInstance(): DragAndDropService; + dragItem: any; + constructor(); + stopDragging(): void; + setDragCssClasses(eListItem: any, dragging: any): void; + addDragSource(eDragSource: any, dragSourceCallback: any): void; + onMouseDownDragSource(eDragSource: any, dragSourceCallback: any): void; + addDropTarget(eDropTarget: any, dropTargetCallback: any): void; + } +} +declare function require(name: string): any; +declare module ag.grid { + class AgList { + private eGui; + private uniqueId; + private modelChangedListeners; + private itemSelectedListeners; + private beforeDropListeners; + private itemMovedListeners; + private dragSources; + private emptyMessage; + private eFilterValueTemplate; + private eListParent; + private model; + private cellRenderer; + private readOnly; + constructor(); + setReadOnly(readOnly: boolean): void; + setEmptyMessage(emptyMessage: any): void; + getUniqueId(): any; + addStyles(styles: any): void; + addCssClass(cssClass: any): void; + addDragSource(dragSource: any): void; + addModelChangedListener(listener: Function): void; + addItemSelectedListener(listener: any): void; + addItemMovedListener(listener: any): void; + addBeforeDropListener(listener: any): void; + private fireItemMoved(fromIndex, toIndex); + private fireModelChanged(); + private fireItemSelected(item); + private fireBeforeDrop(item); + private setupComponents(); + setModel(model: any): void; + getModel(): any; + setCellRenderer(cellRenderer: any): void; + refreshView(): void; + private insertRows(); + private insertBlankMessage(); + private setupAsDropTarget(); + private externalAcceptDrag(dragEvent); + private externalDrop(dragEvent); + private externalNoDrop(); + private addItemToList(newItem); + private addDragAndDropToListItem(eListItem, item); + private internalAcceptDrag(targetColumn, dragItem, eListItem); + private internalDrop(targetColumn, draggedColumn); + private internalNoDrop(eListItem); + private dragAfterThisItem(targetColumn, draggedColumn); + private setDropCssClasses(eListItem, state); + getGui(): any; + } +} +declare module ag.grid { + class ColumnSelectionPanel { + private gridOptionsWrapper; + private columnController; + private cColumnList; + layout: any; + private eRootPanel; + constructor(columnController: ColumnController, gridOptionsWrapper: GridOptionsWrapper, eventService: EventService); + private columnsChanged(); + getDragSource(): any; + private columnCellRenderer(params); + private setupComponents(); + private onItemMoved(fromIndex, toIndex); + getGui(): any; + } +} +declare module ag.grid { + class GroupSelectionPanel { + gridOptionsWrapper: any; + columnController: ColumnController; + inMemoryRowController: any; + cColumnList: any; + layout: any; + constructor(columnController: ColumnController, inMemoryRowController: any, gridOptionsWrapper: GridOptionsWrapper, eventService: EventService); + private columnsChanged(); + addDragSource(dragSource: any): void; + private columnCellRenderer(params); + private setupComponents(); + private onBeforeDrop(newItem); + private onItemMoved(fromIndex, toIndex); + } +} +declare module ag.grid { + class AgDropdownList { + private itemSelectedListeners; + private eValue; + private agList; + private eGui; + private hidePopupCallback; + private selectedItem; + private cellRenderer; + private popupService; + constructor(popupService: PopupService); + setWidth(width: any): void; + addItemSelectedListener(listener: any): void; + fireItemSelected(item: any): void; + setupComponents(): void; + itemSelected(item: any): void; + onClick(): void; + getGui(): any; + setSelected(item: any): void; + setCellRenderer(cellRenderer: any): void; + refreshView(): void; + setModel(model: any): void; + } +} +declare module ag.grid { + class ValuesSelectionPanel { + private gridOptionsWrapper; + private columnController; + private cColumnList; + private layout; + private popupService; + constructor(columnController: ColumnController, gridOptionsWrapper: GridOptionsWrapper, popupService: PopupService, eventService: EventService); + getLayout(): any; + private columnsChanged(); + addDragSource(dragSource: any): void; + private cellRenderer(params); + private setupComponents(); + private beforeDropListener(newItem); + } +} +declare module ag.grid { + class VerticalStack { + isLayoutPanel: any; + childPanels: any; + eGui: any; + constructor(); + addPanel(panel: any, height: any): void; + getGui(): any; + doLayout(): void; + } +} +declare module ag.grid { + class ToolPanel { + layout: any; + constructor(); + init(columnController: any, inMemoryRowController: any, gridOptionsWrapper: GridOptionsWrapper, popupService: PopupService, eventService: EventService): void; + } +} +declare module ag.grid { + interface GridOptions { + virtualPaging?: boolean; + toolPanelSuppressPivot?: boolean; + toolPanelSuppressValues?: boolean; + rowsAlreadyGrouped?: boolean; + suppressRowClickSelection?: boolean; + suppressCellSelection?: boolean; + sortingOrder?: string[]; + suppressMultiSort?: boolean; + suppressHorizontalScroll?: boolean; + unSortIcon?: boolean; + rowHeight?: number; + rowBuffer?: number; + enableColResize?: boolean; + enableCellExpressions?: boolean; + enableSorting?: boolean; + enableServerSideSorting?: boolean; + enableFilter?: boolean; + enableServerSideFilter?: boolean; + colWidth?: number; + suppressMenuHide?: boolean; + singleClickEdit?: boolean; + debug?: boolean; + icons?: any; + angularCompileRows?: boolean; + angularCompileFilters?: boolean; + angularCompileHeaders?: boolean; + localeText?: any; + localeTextFunc?: Function; + suppressScrollLag?: boolean; + groupSuppressAutoColumn?: boolean; + groupSelectsChildren?: boolean; + groupHidePivotColumns?: boolean; + groupIncludeFooter?: boolean; + groupUseEntireRow?: boolean; + groupSuppressRow?: boolean; + groupSuppressBlankHeader?: boolean; + forPrint?: boolean; + groupColumnDef?: any; + context?: any; + rowStyle?: any; + rowClass?: any; + groupDefaultExpanded?: any; + slaveGrids?: GridOptions[]; + rowSelection?: string; + rowDeselection?: boolean; + rowData?: any[]; + floatingTopRowData?: any[]; + floatingBottomRowData?: any[]; + showToolPanel?: boolean; + groupKeys?: string[]; + groupAggFields?: string[]; + columnDefs?: any[]; + datasource?: any; + pinnedColumnCount?: number; + groupHeaders?: boolean; + headerHeight?: number; + groupRowInnerRenderer?(params: any): void; + groupRowRenderer?: Function | Object; + isScrollLag?(): boolean; + isExternalFilterPresent?(): boolean; + doesExternalFilterPass?(node: RowNode): boolean; + getRowStyle?: any; + getRowClass?: any; + headerCellRenderer?: any; + groupAggFunction?(nodes: any[]): any; + onReady?(api: any): void; + onModelUpdated?(): void; + onCellClicked?(params: any): void; + onCellDoubleClicked?(params: any): void; + onCellContextMenu?(params: any): void; + onCellValueChanged?(params: any): void; + onCellFocused?(params: any): void; + onRowSelected?(params: any): void; + onSelectionChanged?(): void; + onBeforeFilterChanged?(): void; + onAfterFilterChanged?(): void; + onFilterModified?(): void; + onBeforeSortChanged?(): void; + onAfterSortChanged?(): void; + onVirtualRowRemoved?(params: any): void; + onRowClicked?(params: any): void; + api?: GridApi; + columnApi?: ColumnApi; + } +} +declare module ag.grid { + class GridApi { + private grid; + private rowRenderer; + private headerRenderer; + private filterManager; + private columnController; + private inMemoryRowController; + private selectionController; + private gridOptionsWrapper; + private gridPanel; + private valueService; + private masterSlaveService; + private eventService; + private csvCreator; + constructor(grid: Grid, rowRenderer: RowRenderer, headerRenderer: HeaderRenderer, filterManager: FilterManager, columnController: ColumnController, inMemoryRowController: InMemoryRowController, selectionController: SelectionController, gridOptionsWrapper: GridOptionsWrapper, gridPanel: GridPanel, valueService: ValueService, masterSlaveService: MasterSlaveService, eventService: EventService); + /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */ + __getMasterSlaveService(): MasterSlaveService; + getDataAsCsv(params?: CsvExportParams): string; + exportDataAsCsv(params?: CsvExportParams): void; + setDatasource(datasource: any): void; + onNewDatasource(): void; + setRowData(rowData: any): void; + setRows(rows: any): void; + onNewRows(): void; + setFloatingTopRowData(rows: any[]): void; + setFloatingBottomRowData(rows: any[]): void; + onNewCols(): void; + setColumnDefs(colDefs: ColDef[]): void; + unselectAll(): void; + refreshRows(rowNodes: RowNode[]): void; + refreshCells(rowNodes: RowNode[], colIds: string[]): void; + rowDataChanged(rows: any): void; + refreshView(): void; + softRefreshView(): void; + refreshGroupRows(): void; + refreshHeader(): void; + isAnyFilterPresent(): boolean; + isAdvancedFilterPresent(): boolean; + isQuickFilterPresent(): boolean; + getModel(): any; + onGroupExpandedOrCollapsed(refreshFromIndex: any): void; + expandAll(): void; + collapseAll(): void; + addVirtualRowListener(rowIndex: any, callback: any): void; + setQuickFilter(newFilter: any): void; + selectIndex(index: any, tryMulti: any, suppressEvents: any): void; + deselectIndex(index: any): void; + selectNode(node: any, tryMulti: any, suppressEvents: any): void; + deselectNode(node: any): void; + selectAll(): void; + deselectAll(): void; + recomputeAggregates(): void; + sizeColumnsToFit(): void; + showLoading(show: any): void; + isNodeSelected(node: any): boolean; + getSelectedNodesById(): { + [nodeId: number]: RowNode; + }; + getSelectedNodes(): RowNode[]; + getSelectedRows(): any[]; + getBestCostNodeSelection(): any; + getRenderedNodes(): any[]; + ensureColIndexVisible(index: any): void; + ensureIndexVisible(index: any): void; + ensureNodeVisible(comparator: any): void; + forEachInMemory(callback: Function): void; + forEachNode(callback: Function): void; + forEachNodeAfterFilter(callback: Function): void; + forEachNodeAfterFilterAndSort(callback: Function): void; + getFilterApiForColDef(colDef: any): any; + getFilterApi(key: any): any; + getColumnDef(key: any): ColDef; + onFilterChanged(): void; + setSortModel(sortModel: any): void; + getSortModel(): any; + setFilterModel(model: any): void; + getFilterModel(): any; + getFocusedCell(): any; + setFocusedCell(rowIndex: any, colIndex: any): void; + setHeaderHeight(headerHeight: number): void; + setGroupHeaders(groupHeaders: boolean): void; + showToolPanel(show: any): void; + isToolPanelShowing(): boolean; + hideColumn(colId: any, hide: any): void; + hideColumns(colIds: any, hide: any): void; + getColumnState(): [any]; + setColumnState(state: any): void; + doLayout(): void; + getValue(colDef: ColDef, data: any, node: any): any; + addEventListener(eventType: string, listener: Function): void; + addGlobalListener(listener: Function): void; + removeEventListener(eventType: string, listener: Function): void; + removeGlobalListener(listener: Function): void; + refreshPivot(): void; + } +} +declare module ag.grid { + class ValueService { + private gridOptionsWrapper; + private expressionService; + private columnController; + init(gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, columnController: ColumnController): void; + getValue(colDef: ColDef, data: any, node: any): any; + private executeValueGetter(valueGetter, data, colDef, node); + private getValueCallback(data, node, field); + } +} +declare module ag.grid { + class Grid { + private virtualRowCallbacks; + private gridOptions; + private gridOptionsWrapper; + private inMemoryRowController; + private doingVirtualPaging; + private paginationController; + private virtualPageRowController; + private finished; + private selectionController; + private columnController; + private rowRenderer; + private headerRenderer; + private filterManager; + private valueService; + private masterSlaveService; + private eventService; + private toolPanel; + private gridPanel; + private eRootPanel; + private toolPanelShowing; + private doingPagination; + private usingInMemoryModel; + private rowModel; + constructor(eGridDiv: any, gridOptions: any, globalEventListener?: Function, $scope?: any, $compile?: any, quickFilterOnScope?: any); + getRowModel(): any; + private periodicallyDoLayout(); + private setupComponents($scope, $compile, eUserProvidedDiv, globalEventListener); + private onColumnChanged(event); + refreshPivot(): void; + getEventService(): EventService; + private onIndividualColumnResized(column); + showToolPanel(show: any): void; + isToolPanelShowing(): boolean; + isUsingInMemoryModel(): boolean; + setDatasource(datasource?: any): void; + private refreshHeaderAndBody(); + setFinished(): void; + onQuickFilterChanged(newFilter: any): void; + onFilterModified(): void; + onFilterChanged(): void; + onRowClicked(event: any, rowIndex: any, node: any): void; + showLoadingPanel(show: any): void; + private setupColumns(); + updateModelAndRefresh(step: any, refreshFromIndex?: any): void; + setRows(rows?: any, firstId?: any): void; + ensureNodeVisible(comparator: any): void; + getFilterModel(): any; + setFocusedCell(rowIndex: any, colIndex: any): void; + getSortModel(): any; + setSortModel(sortModel: any): void; + onSortingChanged(): void; + addVirtualRowListener(rowIndex: any, callback: any): void; + onVirtualRowSelected(rowIndex: any, selected: any): void; + onVirtualRowRemoved(rowIndex: any): void; + setColumnDefs(colDefs?: ColDef[]): void; + updateBodyContainerWidthAfterColResize(): void; + updatePinnedColContainerWidthAfterColResize(): void; + doLayout(): void; + } +} +declare module ag.grid { + class ComponentUtil { + static SIMPLE_PROPERTIES: string[]; + static SIMPLE_NUMBER_PROPERTIES: string[]; + static SIMPLE_BOOLEAN_PROPERTIES: string[]; + static WITH_IMPACT_NUMBER_PROPERTIES: string[]; + static WITH_IMPACT_BOOLEAN_PROPERTIES: string[]; + static WITH_IMPACT_OTHER_PROPERTIES: string[]; + static CALLBACKS: string[]; + static ALL_PROPERTIES: string[]; + static copyAttributesToGridOptions(gridOptions: GridOptions, component: any): GridOptions; + static processOnChange(changes: any, gridOptions: GridOptions, component: any): void; + static toBoolean(value: any): boolean; + static toNumber(value: any): number; + } +} +declare module ag.grid { + class AgGridNg2 { + private elementDef; + private _agGrid; + private _initialised; + private gridOptions; + private api; + private columnApi; + modelUpdated: any; + cellClicked: any; + cellDoubleClicked: any; + cellContextMenu: any; + cellValueChanged: any; + cellFocused: any; + rowSelected: any; + selectionChanged: any; + beforeFilterChanged: any; + afterFilterChanged: any; + filterModified: any; + beforeSortChanged: any; + afterSortChanged: any; + virtualRowRemoved: any; + rowClicked: any; + ready: any; + columnEverythingChanged: any; + columnPivotChanged: any; + columnValueChanged: any; + columnMoved: any; + columnVisible: any; + columnGroupOpened: any; + columnResized: any; + columnPinnedCountChanged: any; + virtualPaging: boolean; + toolPanelSuppressPivot: boolean; + toolPanelSuppressValues: boolean; + rowsAlreadyGrouped: boolean; + suppressRowClickSelection: boolean; + suppressCellSelection: boolean; + sortingOrder: string[]; + suppressMultiSort: boolean; + suppressHorizontalScroll: boolean; + unSortIcon: boolean; + rowHeight: number; + rowBuffer: number; + enableColResize: boolean; + enableCellExpressions: boolean; + enableSorting: boolean; + enableServerSideSorting: boolean; + enableFilter: boolean; + enableServerSideFilter: boolean; + colWidth: number; + suppressMenuHide: boolean; + debug: boolean; + icons: any; + angularCompileRows: boolean; + angularCompileFilters: boolean; + angularCompileHeaders: boolean; + localeText: any; + localeTextFunc: Function; + groupSuppressAutoColumn: boolean; + groupSelectsChildren: boolean; + groupHidePivotColumns: boolean; + groupIncludeFooter: boolean; + groupUseEntireRow: boolean; + groupSuppressRow: boolean; + groupSuppressBlankHeader: boolean; + groupColumnDef: any; + forPrint: boolean; + context: any; + rowStyle: any; + rowClass: any; + headerCellRenderer: any; + groupDefaultExpanded: any; + slaveGrids: GridOptions[]; + rowSelection: string; + rowDeselection: boolean; + rowData: any[]; + floatingTopRowData: any[]; + floatingBottomRowData: any[]; + showToolPanel: boolean; + groupKeys: string[]; + groupAggFunction: (nodes: any[]) => void; + groupAggFields: string[]; + columnDefs: any[]; + datasource: any; + pinnedColumnCount: number; + quickFilterText: string; + groupHeaders: boolean; + headerHeight: number; + constructor(elementDef: any); + onInit(): void; + onChange(changes: any): void; + private globalEventListener(eventType, event); + } +} +declare module ag.grid { +} +declare var exports: any; +declare var module: any; +declare module ag.grid { + interface Filter { + getGui(): any; + isFilterActive(): boolean; + doesFilterPass(params: any): boolean; + afterGuiAttached?(params?: { + hidePopup?: Function; + }): void; + onNewRowsLoaded?(): void; + } +} diff --git a/ag-grid/ag-grid.d.ts b/ag-grid/ag-grid.d.ts new file mode 100644 index 000000000..cb2fdb5d1 --- /dev/null +++ b/ag-grid/ag-grid.d.ts @@ -0,0 +1,1991 @@ +// Type definitions for ag-grid v2.1.2 +// Project: http://www.ag-grid.com/ +// Definitions by: Niall Crosby +// Definitions: https://github.com/borisyankov/DefinitelyTyped +declare module ag.grid { + class ColumnChangeEvent { + private type; + private column; + private columnGroup; + private fromIndex; + private toIndex; + private pinnedColumnCount; + constructor(type: string); + toString(): string; + withColumn(column: Column): ColumnChangeEvent; + withColumnGroup(columnGroup: ColumnGroup): ColumnChangeEvent; + withFromIndex(fromIndex: number): ColumnChangeEvent; + withPinnedColumnCount(pinnedColumnCount: number): ColumnChangeEvent; + withToIndex(toIndex: number): ColumnChangeEvent; + getFromIndex(): number; + getToIndex(): number; + getPinnedColumnCount(): number; + getType(): string; + getColumn(): Column; + getColumnGroup(): ColumnGroup; + isPivotChanged(): boolean; + isValueChanged(): boolean; + isIndividualColumnResized(): boolean; + } +} +declare module ag.grid { + class Utils { + private static isSafari; + private static isIE; + static iterateObject(object: any, callback: (key: string, value: any) => void): void; + static cloneObject(object: any): any; + static map(array: TItem[], callback: (item: TItem) => TResult): TResult[]; + static forEach(array: T[], callback: (item: T, index: number) => void): void; + static filter(array: T[], callback: (item: T) => boolean): T[]; + static assign(object: any, source: any): void; + static getFunctionParameters(func: any): any; + static find(collection: any, predicate: any, value: any): any; + static toStrings(array: T[]): string[]; + static iterateArray(array: T[], callback: (item: T, index: number) => void): void; + static isNode(o: any): boolean; + static isElement(o: any): boolean; + static isNodeOrElement(o: any): boolean; + static addChangeListener(element: HTMLElement, listener: EventListener): void; + static makeNull(value: any): any; + static removeAllChildren(node: HTMLElement): void; + static removeElement(parent: HTMLElement, cssSelector: string): void; + static removeFromParent(node: Element): void; + static isVisible(element: HTMLElement): boolean; + /** + * loads the template and returns it as an element. makes up for no simple way in + * the dom api to load html directly, eg we cannot do this: document.createElement(template) + */ + static loadTemplate(template: string): Node; + static querySelectorAll_addCssClass(eParent: any, selector: string, cssClass: string): void; + static querySelectorAll_removeCssClass(eParent: any, selector: string, cssClass: string): void; + static querySelectorAll_replaceCssClass(eParent: any, selector: string, cssClassToRemove: string, cssClassToAdd: string): void; + static addOrRemoveCssClass(element: HTMLElement, className: string, addOrRemove: boolean): void; + static addCssClass(element: HTMLElement, className: string): void; + static offsetHeight(element: HTMLElement): number; + static offsetWidth(element: HTMLElement): number; + static removeCssClass(element: HTMLElement, className: string): void; + static removeFromArray(array: T[], object: T): void; + static defaultComparator(valueA: any, valueB: any): number; + static formatWidth(width: number | string): string; + /** + * Tries to use the provided renderer. + */ + static useRenderer(eParent: Element, eRenderer: (params: TParams) => Node | string, params: TParams): void; + /** + * If icon provided, use this (either a string, or a function callback). + * if not, then use the second parameter, which is the svgFactory function + */ + static createIcon(iconName: any, gridOptionsWrapper: any, colDefWrapper: any, svgFactoryFunc: () => Node): HTMLSpanElement; + static addStylesToElement(eElement: any, styles: any): void; + static getScrollbarWidth(): number; + static isKeyPressed(event: KeyboardEvent, keyToCheck: number): boolean; + static setVisible(element: HTMLElement, visible: boolean): void; + static isBrowserIE(): boolean; + static isBrowserSafari(): boolean; + } +} +declare module ag.grid { + class Constants { + static STEP_EVERYTHING: number; + static STEP_FILTER: number; + static STEP_SORT: number; + static STEP_MAP: number; + static ASC: string; + static DESC: string; + static ROW_BUFFER_SIZE: number; + static MIN_COL_WIDTH: number; + static SUM: string; + static MIN: string; + static MAX: string; + static KEY_TAB: number; + static KEY_ENTER: number; + static KEY_BACKSPACE: number; + static KEY_DELETE: number; + static KEY_ESCAPE: number; + static KEY_SPACE: number; + static KEY_DOWN: number; + static KEY_UP: number; + static KEY_LEFT: number; + static KEY_RIGHT: number; + } +} +declare module ag.grid { + class Column { + static colIdSequence: number; + colDef: ColDef; + actualWidth: any; + visible: any; + colId: any; + pinned: boolean; + index: number; + aggFunc: string; + pivotIndex: number; + sort: string; + sortedAt: number; + constructor(colDef: ColDef, actualWidth: any); + isGreaterThanMax(width: number): boolean; + getMinimumWidth(): number; + setMinimum(): void; + } +} +declare module ag.grid { + class ColumnGroup { + pinned: any; + name: any; + allColumns: Column[]; + displayedColumns: Column[]; + expandable: boolean; + expanded: boolean; + actualWidth: number; + constructor(pinned: any, name: any); + getMinimumWidth(): number; + addColumn(column: any): void; + calculateExpandable(): void; + calculateActualWidth(): void; + calculateDisplayedColumns(): void; + addToVisibleColumns(colsToAdd: any): void; + } +} +declare module ag.grid { + class GridOptionsWrapper { + private gridOptions; + private groupHeaders; + private headerHeight; + private rowHeight; + private floatingTopRowData; + private floatingBottomRowData; + init(gridOptions: GridOptions, eventService: EventService): void; + isRowSelection(): boolean; + isRowDeselection(): boolean; + isRowSelectionMulti(): boolean; + getContext(): any; + isVirtualPaging(): boolean; + isShowToolPanel(): boolean; + isToolPanelSuppressPivot(): boolean; + isToolPanelSuppressValues(): boolean; + isRowsAlreadyGrouped(): boolean; + isGroupSelectsChildren(): boolean; + isGroupHidePivotColumns(): boolean; + isGroupIncludeFooter(): boolean; + isGroupSuppressBlankHeader(): boolean; + isSuppressRowClickSelection(): boolean; + isSuppressCellSelection(): boolean; + isSuppressMultiSort(): boolean; + isGroupSuppressAutoColumn(): boolean; + isForPrint(): boolean; + isSuppressHorizontalScroll(): boolean; + isUnSortIcon(): boolean; + isSuppressMenuHide(): boolean; + getRowStyle(): any; + getRowClass(): any; + getRowStyleFunc(): any; + getRowClassFunc(): any; + getHeaderCellRenderer(): any; + getApi(): GridApi; + isEnableColResize(): boolean; + isSingleClickEdit(): boolean; + getGroupDefaultExpanded(): any; + getGroupKeys(): string[]; + getGroupAggFunction(): (nodes: any[]) => any; + getGroupAggFields(): string[]; + getRowData(): any[]; + isGroupUseEntireRow(): boolean; + getGroupColumnDef(): any; + isGroupSuppressRow(): boolean; + isAngularCompileRows(): boolean; + isAngularCompileFilters(): boolean; + isAngularCompileHeaders(): boolean; + isDebug(): boolean; + getColumnDefs(): any[]; + getDatasource(): any; + getRowBuffer(): number; + isEnableSorting(): boolean; + isEnableCellExpressions(): boolean; + isEnableServerSideSorting(): boolean; + isEnableFilter(): boolean; + isEnableServerSideFilter(): boolean; + isSuppressScrollLag(): boolean; + getIcons(): any; + getIsScrollLag(): () => boolean; + getSortingOrder(): string[]; + getSlaveGrids(): GridOptions[]; + getGroupRowRenderer(): Object | Function; + getRowHeight(): number; + getHeaderHeight(): number; + setHeaderHeight(headerHeight: number): void; + isGroupHeaders(): boolean; + setGroupHeaders(groupHeaders: boolean): void; + getFloatingTopRowData(): any[]; + setFloatingTopRowData(rows: any[]): void; + getFloatingBottomRowData(): any[]; + setFloatingBottomRowData(rows: any[]): void; + isExternalFilterPresent(): boolean; + doesExternalFilterPass(node: RowNode): boolean; + getGroupRowInnerRenderer(): (params: any) => void; + getColWidth(): number; + private checkForDeprecated(); + getPinnedColCount(): number; + getLocaleTextFunc(): Function; + globalEventHandler(eventName: string, event?: any): void; + private getCallbackForEvent(eventName); + } +} +declare module ag.grid { + class LoggerFactory { + private logging; + init(gridOptionsWrapper: GridOptionsWrapper): void; + create(name: string): Logger; + } + class Logger { + private logging; + private name; + constructor(name: string, logging: boolean); + log(message: string): void; + } +} +declare module ag.grid { + class Events { + /** A new set of columns has been entered, everything has potentially changed. */ + static EVENT_COLUMN_EVERYTHING_CHANGED: string; + /** A pivot column was added, removed or order changed. */ + static EVENT_COLUMN_PIVOT_CHANGE: string; + /** A value column was added, removed or agg function was changed. */ + static EVENT_COLUMN_VALUE_CHANGE: string; + /** A column was moved */ + static EVENT_COLUMN_MOVED: string; + /** One or more columns was shown / hidden */ + static EVENT_COLUMN_VISIBLE: string; + /** A column group was opened / closed */ + static EVENT_COLUMN_GROUP_OPENED: string; + /** One or more columns was resized. If just one, the column in the event is set. */ + static EVENT_COLUMN_RESIZED: string; + /** One or more columns was resized. If just one, the column in the event is set. */ + static EVENT_COLUMN_PINNED_COUNT_CHANGED: string; + static EVENT_MODEL_UPDATED: string; + static EVENT_CELL_CLICKED: string; + static EVENT_CELL_DOUBLE_CLICKED: string; + static EVENT_CELL_CONTEXT_MENU: string; + static EVENT_CELL_VALUE_CHANGED: string; + static EVENT_CELL_FOCUSED: string; + static EVENT_ROW_SELECTED: string; + static EVENT_SELECTION_CHANGED: string; + static EVENT_BEFORE_FILTER_CHANGED: string; + static EVENT_AFTER_FILTER_CHANGED: string; + static EVENT_FILTER_MODIFIED: string; + static EVENT_BEFORE_SORT_CHANGED: string; + static EVENT_AFTER_SORT_CHANGED: string; + static EVENT_VIRTUAL_ROW_REMOVED: string; + static EVENT_ROW_CLICKED: string; + static EVENT_READY: string; + } +} +declare module ag.grid { + class EventService { + private allListeners; + private globalListeners; + private getListenerList(eventType); + addEventListener(eventType: string, listener: Function): void; + addGlobalListener(listener: Function): void; + removeEventListener(eventType: string, listener: Function): void; + removeGlobalListener(listener: Function): void; + dispatchEvent(eventType: string, event?: any): void; + } +} +declare module ag.grid { + class MasterSlaveService { + private gridOptionsWrapper; + private columnController; + private gridPanel; + private logger; + private eventService; + private consuming; + init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, gridPanel: GridPanel, loggerFactory: LoggerFactory, eventService: EventService): void; + private fireEvent(callback); + private onEvent(callback); + private fireColumnEvent(event); + fireHorizontalScrollEvent(horizontalScroll: number): void; + onScrollEvent(horizontalScroll: number): void; + onColumnEvent(event: ColumnChangeEvent): void; + } +} +declare module ag.grid { + class ColumnApi { + private _columnController; + constructor(_columnController: ColumnController); + sizeColumnsToFit(gridWidth: any): void; + hideColumns(colIds: any, hide: any): void; + columnGroupOpened(group: ColumnGroup, newValue: boolean): void; + getColumnGroup(name: string): ColumnGroup; + getDisplayNameForCol(column: any): string; + getColumn(key: any): Column; + setState(columnState: any): void; + getState(): [any]; + isPinning(): boolean; + getVisibleColAfter(col: Column): Column; + getVisibleColBefore(col: Column): Column; + setColumnVisible(column: Column, visible: boolean): void; + getAllColumns(): Column[]; + getDisplayedColumns(): Column[]; + getPivotedColumns(): Column[]; + getValueColumns(): Column[]; + moveColumn(fromIndex: number, toIndex: number): void; + movePivotColumn(fromIndex: number, toIndex: number): void; + setColumnAggFunction(column: Column, aggFunc: string): void; + setColumnWidth(column: Column, newWidth: number): void; + removeValueColumn(column: Column): void; + addValueColumn(column: Column): void; + removePivotColumn(column: Column): void; + setPinnedColumnCount(count: number): void; + addPivotColumn(column: Column): void; + getHeaderGroups(): ColumnGroup[]; + hideColumn(colId: any, hide: any): void; + } + class ColumnController { + private gridOptionsWrapper; + private angularGrid; + private selectionRendererFactory; + private expressionService; + private masterSlaveController; + private allColumns; + private visibleColumns; + private displayedColumns; + private pivotColumns; + private valueColumns; + private columnGroups; + private setupComplete; + private valueService; + private pinnedColumnCount; + private eventService; + constructor(); + init(angularGrid: Grid, selectionRendererFactory: SelectionRendererFactory, gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, valueService: ValueService, masterSlaveController: MasterSlaveService, eventService: EventService): void; + getColumnApi(): ColumnApi; + isSetupComplete(): boolean; + getHeaderGroups(): ColumnGroup[]; + getPinnedContainerWidth(): number; + addPivotColumn(column: Column): void; + setPinnedColumnCount(count: number): void; + removePivotColumn(column: Column): void; + addValueColumn(column: Column): void; + removeValueColumn(column: Column): void; + private doesColumnExistInGrid(column); + setColumnWidth(column: Column, newWidth: number): void; + private updateGroupWidthsAfterColumnResize(column); + setColumnAggFunction(column: Column, aggFunc: string): void; + movePivotColumn(fromIndex: number, toIndex: number): void; + moveColumn(fromIndex: number, toIndex: number): void; + getBodyContainerWidth(): number; + getValueColumns(): Column[]; + getPivotedColumns(): Column[]; + getDisplayedColumns(): Column[]; + getAllColumns(): Column[]; + setColumnVisible(column: Column, visible: boolean): void; + getVisibleColBefore(col: any): Column; + getVisibleColAfter(col: Column): Column; + isPinning(): boolean; + getState(): [any]; + setState(columnState: any): void; + getColumns(keys: any[]): Column[]; + getColumn(key: any): Column; + getDisplayNameForCol(column: any): string; + getColumnGroup(name: string): ColumnGroup; + onColumnsChanged(): void; + private checkForDeprecatedItems(columnDefs); + columnGroupOpened(group: ColumnGroup, newValue: boolean): void; + hideColumns(colIds: any, hide: any): void; + private updateModel(); + private updateDisplayedColumns(); + sizeColumnsToFit(gridWidth: any): void; + private buildGroups(); + private updateGroups(); + private updateVisibleColumns(); + private updatePinnedColumns(); + private createColumns(colDefs); + private createPivotColumns(); + private createValueColumns(); + private createDummyColumn(field); + private calculateColInitialWidth(colDef); + private getTotalColWidth(includePinned); + } +} +declare module ag.grid { + interface CsvExportParams { + skipHeader?: boolean; + skipFooters?: boolean; + skipGroups?: boolean; + fileName?: string; + } + class CsvCreator { + private rowController; + private columnController; + private grid; + private valueService; + constructor(rowController: InMemoryRowController, columnController: ColumnController, grid: Grid, valueService: ValueService); + exportDataAsCsv(params?: CsvExportParams): void; + getDataAsCsv(params?: CsvExportParams): string; + private createValueForGroupNode(node); + private escape(value); + } +} +declare module ag.grid { + class ExpressionService { + private expressionToFunctionCache; + private logger; + init(loggerFactory: LoggerFactory): void; + evaluate(expression: string, params: any): any; + private createExpressionFunction(expression); + private createFunctionBody(expression); + } +} +declare module ag.grid { + interface TextAndNumberFilterParameters { + /** What to do when new rows are loaded. The default is to reset the filter, to keep it in line with 'set' filters. If you want to keep the selection, then set this value to 'keep'. */ + newRowsAction?: string; + } +} +declare module ag.grid { + class TextFilter implements Filter { + private filterParams; + private filterChangedCallback; + private filterModifiedCallback; + private localeTextFunc; + private valueGetter; + private filterText; + private filterType; + private api; + private eGui; + private eFilterTextField; + private eTypeSelect; + private applyActive; + private eApplyButton; + init(params: any): void; + onNewRowsLoaded(): void; + afterGuiAttached(): void; + doesFilterPass(node: any): boolean; + getGui(): any; + isFilterActive(): boolean; + private createTemplate(); + private createGui(); + private setupApply(); + private onTypeChanged(); + private onFilterChanged(); + private filterChanged(); + private createApi(); + private getApi(); + } +} +declare module ag.grid { + class NumberFilter implements Filter { + private filterParams; + private filterChangedCallback; + private filterModifiedCallback; + private localeTextFunc; + private valueGetter; + private filterNumber; + private filterType; + private api; + private eGui; + private eFilterTextField; + private eTypeSelect; + private applyActive; + private eApplyButton; + init(params: any): void; + onNewRowsLoaded(): void; + afterGuiAttached(): void; + doesFilterPass(node: any): boolean; + getGui(): any; + isFilterActive(): boolean; + private createTemplate(); + private createGui(); + private setupApply(); + private onTypeChanged(); + private filterChanged(); + private onFilterChanged(); + private createApi(); + private getApi(); + } +} +declare module ag.grid { + interface ColDef { + /** If sorting by default, set it here. Set to 'asc' or 'desc' */ + sort?: string; + /** If sorting more than one column by default, the milliseconds when this column was sorted, so we know what order to sort the columns in. */ + sortedAt?: number; + /** The sort order, provide an array with any of the following in any order ['asc','desc',null] */ + sortingOrder?: string[]; + /** The name to render in the column header */ + headerName: string; + /** The field of the row to get the cells data from */ + field: string; + /** Expression or function to get the cells value. */ + headerValueGetter?: string | Function; + /** The unique ID to give the column. This is optional. If missing, the ID will default to the field. If both field and colId are missing, a unique ID will be generated. + * This ID is used to identify the column in the API for sorting, filtering etc. */ + colId?: string; + /** Set to true for this column to be hidden. Naturally you might think, it would make more sense to call this field 'visible' and mark it false to hide, + * however we want all default values to be false and we want columns to be visible by default. */ + hide?: boolean; + /** Tooltip for the column header */ + headerTooltip?: string; + /** Expression or function to get the cells value. */ + valueGetter?: string | Function; + /** To provide custom rendering to the header. */ + headerCellRenderer?: Function | Object; + /** CSS class for the header */ + headerClass?: string | string[] | ((params: any) => string | string[]); + /** Initial width, in pixels, of the cell */ + width?: number; + /** Min width, in pixels, of the cell */ + minWidth?: number; + /** Max width, in pixels, of the cell */ + maxWidth?: number; + /** Class to use for the cell. Can be string, array of strings, or function. */ + cellClass?: string | string[] | ((cellClassParams: any) => string | string[]); + /** An object of css values. Or a function returning an object of css values. */ + cellStyle?: {} | ((params: any) => {}); + /** A function for rendering a cell. */ + cellRenderer?: Function | {}; + /** A function for rendering a floating cell. */ + floatingCellRenderer?: Function | {}; + /** Name of function to use for aggregation. One of [sum,min,max]. */ + aggFunc?: string; + /** Comparator function for custom sorting. */ + comparator?: Function; + /** Set to true to render a selection checkbox in the column. */ + checkboxSelection?: boolean; + /** Set to true if no menu should be shown for this column header. */ + suppressMenu?: boolean; + /** Set to true if no sorting should be done for this column. */ + suppressSorting?: boolean; + /** Set to true if you want the unsorted icon to be shown when no sort is applied to this column. */ + unSortIcon?: boolean; + /** Set to true if you want this columns width to be fixed during 'size to fit' operation. */ + suppressSizeToFit?: boolean; + /** Set to true if you do not want this column to be resizable by dragging it's edge. */ + suppressResize?: boolean; + /** If grouping columns, the group this column belongs to. */ + headerGroup?: string; + /** Whether to show the column when the group is open / closed. */ + headerGroupShow?: string; + /** Set to true if this col is editable, otherwise false. Can also be a function to have different rows editable. */ + editable?: boolean | (Function); + /** Callbacks for editing.See editing section for further details. */ + newValueHandler?: Function; + /** If true, this cell gets refreshed when api.softRefreshView() gets called. */ + volatile?: boolean; + /** Cell template to use for cell. Useful for AngularJS cells. */ + template?: string; + /** Cell template URL to load template from to use for cell. Useful for AngularJS cells. */ + templateUrl?: string; + /** one of the built in filter names: [set, number, text], or a filter function*/ + filter?: string | Function; + /** The filter params are specific to each filter! */ + filterParams?: SetFilterParameters | TextAndNumberFilterParameters; + /** Rules for applying css classes */ + cellClassRules?: { + [cssClassName: string]: (Function | string); + }; + /** Callbacks for editing.See editing section for further details. */ + onCellValueChanged?: Function; + /** Function callback, gets called when a cell is clicked. */ + onCellClicked?: Function; + /** Function callback, gets called when a cell is double clicked. */ + onCellDoubleClicked?: Function; + /** Function callback, gets called when a cell is right clicked. */ + onCellContextMenu?: Function; + } +} +declare module ag.grid { + class SetFilterModel { + private colDef; + private filterParams; + private rowModel; + private valueGetter; + private allUniqueValues; + private availableUniqueValues; + private displayedValues; + private miniFilter; + private selectedValuesCount; + private selectedValuesMap; + private showingAvailableOnly; + private usingProvidedSet; + private doesRowPassOtherFilters; + constructor(colDef: ColDef, rowModel: any, valueGetter: any, doesRowPassOtherFilters: any); + refreshAfterNewRowsLoaded(keepSelection: any, isSelectAll: boolean): void; + refreshAfterAnyFilterChanged(): void; + private createAllUniqueValues(); + private createAvailableUniqueValues(); + private getUniqueValues(filterOutNotAvailable); + setMiniFilter(newMiniFilter: any): boolean; + getMiniFilter(): any; + private processMiniFilter(); + getDisplayedValueCount(): any; + getDisplayedValue(index: any): any; + selectEverything(): void; + isFilterActive(): boolean; + selectNothing(): void; + getUniqueValueCount(): any; + getUniqueValue(index: any): any; + unselectValue(value: any): void; + selectValue(value: any): void; + isValueSelected(value: any): boolean; + isEverythingSelected(): boolean; + isNothingSelected(): boolean; + getModel(): any; + setModel(model: any, isSelectAll: boolean): void; + } +} +/** The filter parameters for set filter */ +declare module ag.grid { + interface SetFilterParameters { + /** Same as cell renderer for grid (you can use the same one in both locations). Setting it separatly here allows for the value to be rendered differently in the filter. */ + cellRenderer?: Function; + /** The height of the cell. */ + cellHeight?: number; + /** The values to display in the filter. */ + values?: any; + /** What to do when new rows are loaded. The default is to reset the filter, as the set of values to select from can have changed. If you want to keep the selection, then set this value to 'keep'. */ + newRowsAction?: string; + /** If true, the filter will not remove items that are no longer availabe due to other filters. */ + suppressRemoveEntries?: boolean; + } +} +declare module ag.grid { + class SetFilter implements Filter { + private eGui; + private filterParams; + private rowHeight; + private model; + private filterChangedCallback; + private filterModifiedCallback; + private valueGetter; + private rowsInBodyContainer; + private colDef; + private localeTextFunc; + private cellRenderer; + private eListContainer; + private eFilterValueTemplate; + private eSelectAll; + private eListViewport; + private eMiniFilter; + private api; + private applyActive; + private eApplyButton; + init(params: any): void; + afterGuiAttached(): void; + isFilterActive(): boolean; + doesFilterPass(node: any): boolean; + getGui(): any; + onNewRowsLoaded(): void; + onAnyFilterChanged(): void; + private createTemplate(); + private createGui(); + private setupApply(); + private setContainerHeight(); + private drawVirtualRows(); + private ensureRowsRendered(start, finish); + private removeVirtualRows(rowsToRemove); + private insertRow(value, rowIndex); + private onCheckboxClicked(eCheckbox, value); + private filterChanged(); + private onMiniFilterChanged(); + private refreshVirtualRows(); + private clearVirtualRows(); + private onSelectAll(); + private updateAllCheckboxes(checked); + private addScrollListener(); + getApi(): any; + private createApi(); + } +} +declare module ag.grid { + class PopupService { + private ePopupParent; + init(ePopupParent: any): void; + positionPopup(eventSource: any, ePopup: any, minWidth: any): void; + addAsModalPopup(eChild: any, closeOnEsc: boolean): (event: any) => void; + } +} +declare module ag.grid { + interface RowNode { + /** Unique ID for the node. Can be though of as the index of the row in the original list, + * however exceptions apply so don't depend on uniqueness. */ + id?: number; + /** The user provided data */ + data?: any; + /** The parent node to this node, or empty if top level */ + parent?: RowNode; + /** How many levels this node is from the top */ + level?: number; + /** True if this node is a group node (ie has children) */ + group?: boolean; + /** True if this is the first child in this group */ + firstChild?: boolean; + /** True if this is the last child in this group */ + lastChild?: boolean; + /** The index of this node in the group */ + childIndex?: number; + /** True if this row is a floating row */ + floating?: boolean; + /** True if this row is a floating top row */ + floatingTop?: boolean; + /** True if this row is a floating bottom row */ + floatingBottom?: boolean; + /** If using quick filter, stores a string representation of the row for searching against */ + quickFilterAggregateText?: string; + /** Groups only - True if row is a footer. Footers have group = true and footer = true */ + footer?: boolean; + /** Groups only - Children of this group */ + children?: RowNode[]; + /** Groups only - The field we are pivoting on eg Country*/ + field?: string; + /** Groups only - The key for the pivot eg Ireland, UK, USA */ + key?: any; + /** Groups only - Filtered children of this group */ + childrenAfterFilter?: RowNode[]; + /** Groups only - Sorted children of this group */ + childrenAfterSort?: RowNode[]; + /** Groups only - Number of children and grand children */ + allChildrenCount?: number; + /** Groups only - True if group is expanded, otherwise false */ + expanded?: boolean; + /** Groups only - If doing footers, reference to the footer node for this group */ + sibling?: RowNode; + /** Not to be used, internal temporary map used by the grid when creating groups */ + _childrenMap?: {}; + } +} +declare module ag.grid { + class FilterManager { + private $compile; + private $scope; + private gridOptionsWrapper; + private grid; + private allFilters; + private rowModel; + private popupService; + private valueService; + private columnController; + private quickFilter; + private advancedFilterPresent; + private externalFilterPresent; + init(grid: Grid, gridOptionsWrapper: GridOptionsWrapper, $compile: any, $scope: any, columnController: ColumnController, popupService: PopupService, valueService: ValueService): void; + setFilterModel(model: any): void; + private setModelOnFilterWrapper(filter, newModel); + getFilterModel(): any; + setRowModel(rowModel: any): void; + isAdvancedFilterPresent(): boolean; + isAnyFilterPresent(): boolean; + isFilterPresentForCol(colId: any): any; + private doesFilterPass(node, filterToSkip?); + setQuickFilter(newFilter: any): boolean; + onFilterChanged(): void; + isQuickFilterPresent(): boolean; + doesRowPassOtherFilters(filterToSkip: any, node: any): boolean; + doesRowPassFilter(node: any, filterToSkip?: any): boolean; + private aggregateRowForQuickFilter(node); + refreshDisplayedValues(): void; + onNewRowsLoaded(): void; + private createValueGetter(column); + getFilterApi(column: Column): any; + private getOrCreateFilterWrapper(column); + private createFilterWrapper(column); + private assertMethodHasNoParameters(theMethod); + showFilter(column: Column, eventSource: any): void; + } +} +declare module ag.grid { + class TemplateService { + templateCache: any; + waitingCallbacks: any; + $scope: any; + init($scope: any): void; + getTemplate(url: any, callback: any): any; + handleHttpResult(httpResult: any, url: any): void; + } +} +declare module ag.grid { + class SelectionRendererFactory { + private angularGrid; + private selectionController; + init(angularGrid: any, selectionController: any): void; + createSelectionCheckbox(node: any, rowIndex: any): HTMLInputElement; + } +} +declare module ag.vdom { + class VElement { + static idSequence: number; + private id; + private elementAttachedListeners; + constructor(); + getId(): number; + addElementAttachedListener(listener: (element: Element) => void): void; + protected fireElementAttached(element: Element): void; + elementAttached(element: Element): void; + toHtmlString(): string; + } +} +declare module ag.vdom { + class VHtmlElement extends VElement { + private type; + private classes; + private eventListeners; + private attributes; + private children; + private innerHtml; + private style; + private bound; + private element; + constructor(type: string); + getElement(): HTMLElement; + setInnerHtml(innerHtml: string): void; + addStyles(styles: any): void; + private attachEventListeners(node); + addClass(newClass: string): void; + removeClass(oldClass: string): void; + addClasses(classes: string[]): void; + toHtmlString(): string; + private toHtmlStringChildren(); + private toHtmlStringAttributes(); + private toHtmlStringClasses(); + private toHtmlStringStyles(); + appendChild(child: any): void; + setAttribute(key: string, value: string): void; + addEventListener(event: string, listener: EventListener): void; + elementAttached(element: Element): void; + fireElementAttachedToChildren(element: Element): void; + } +} +declare module ag.vdom { + class VWrapperElement extends VElement { + private wrappedElement; + constructor(wrappedElement: Element); + toHtmlString(): string; + elementAttached(element: Element): void; + } +} +declare module ag.grid { + class RenderedCell { + private vGridCell; + private vSpanWithValue; + private vCellWrapper; + private vParentOfValue; + private checkboxOnChangeListener; + private column; + private data; + private node; + private rowIndex; + private editingCell; + private scope; + private isFirstColumn; + private gridOptionsWrapper; + private expressionService; + private selectionRendererFactory; + private rowRenderer; + private selectionController; + private $compile; + private templateService; + private cellRendererMap; + private eCheckbox; + private columnController; + private valueService; + private eventService; + private value; + private checkboxSelection; + constructor(isFirstColumn: any, column: any, $compile: any, rowRenderer: RowRenderer, gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, selectionRendererFactory: SelectionRendererFactory, selectionController: SelectionController, templateService: TemplateService, cellRendererMap: { + [key: string]: any; + }, node: any, rowIndex: number, scope: any, columnController: ColumnController, valueService: ValueService, eventService: EventService); + getColumn(): Column; + private getValue(); + getVGridCell(): ag.vdom.VHtmlElement; + private getDataForRow(); + private setupComponents(); + startEditing(key?: number): void; + focusCell(forceBrowserFocus: boolean): void; + private stopEditing(eInput, blurListener, reset?); + createParams(): any; + createEvent(event: any, eventSource: any): any; + private addCellDoubleClickedHandler(); + private addCellContextMenuHandler(); + isCellEditable(): any; + private addCellClickedHandler(); + private populateCell(); + private addStylesFromCollDef(); + private addClassesFromCollDef(); + private addClassesFromRules(); + private addCellNavigationHandler(); + private isKeycodeForStartEditing(key); + createSelectionCheckbox(): void; + setSelected(state: boolean): void; + private createParentOfValue(); + isVolatile(): boolean; + refreshCell(): void; + private putDataIntoCell(); + private useCellRenderer(cellRenderer); + private addClasses(); + } +} +declare module ag.grid { + class RenderedRow { + vPinnedRow: any; + vBodyRow: any; + private renderedCells; + private scope; + private node; + private rowIndex; + private cellRendererMap; + private gridOptionsWrapper; + private parentScope; + private angularGrid; + private columnController; + private expressionService; + private rowRenderer; + private selectionRendererFactory; + private $compile; + private templateService; + private selectionController; + private pinning; + private eBodyContainer; + private ePinnedContainer; + private valueService; + private eventService; + constructor(gridOptionsWrapper: GridOptionsWrapper, valueService: ValueService, parentScope: any, angularGrid: Grid, columnController: ColumnController, expressionService: ExpressionService, cellRendererMap: { + [key: string]: any; + }, selectionRendererFactory: SelectionRendererFactory, $compile: any, templateService: TemplateService, selectionController: SelectionController, rowRenderer: RowRenderer, eBodyContainer: HTMLElement, ePinnedContainer: HTMLElement, node: any, rowIndex: number, eventService: EventService); + onRowSelected(selected: boolean): void; + softRefresh(): void; + getRenderedCellForColumn(column: Column): RenderedCell; + getCellForCol(column: Column): any; + destroy(): void; + private destroyScope(); + isDataInList(rows: any[]): boolean; + isNodeInList(nodes: RowNode[]): boolean; + isGroup(): boolean; + private drawNormalRow(); + private bindVirtualElement(vElement); + private createGroupRow(); + private createGroupSpanningEntireRowCell(padding); + setMainRowWidth(width: number): void; + private createChildScopeOrNull(data); + private addDynamicStyles(); + private createRowContainer(); + getRowNode(): any; + getRowIndex(): any; + refreshCells(colIds: string[]): void; + private addDynamicClasses(); + } +} +declare module ag.grid { + class SvgFactory { + static theInstance: SvgFactory; + static getInstance(): SvgFactory; + createFilterSvg(): Element; + createColumnShowingSvg(): Element; + createColumnHiddenSvg(): Element; + createMenuSvg(): Element; + createArrowUpSvg(): Element; + createArrowLeftSvg(): Element; + createArrowDownSvg(): Element; + createArrowRightSvg(): Element; + createSmallArrowDownSvg(): Element; + createArrowUpDownSvg(): Element; + } +} +declare module ag.grid { + function groupCellRendererFactory(gridOptionsWrapper: GridOptionsWrapper, selectionRendererFactory: SelectionRendererFactory, expressionService: ExpressionService): (params: any) => HTMLSpanElement; +} +declare module ag.grid { + class RowRenderer { + private columnModel; + private gridOptionsWrapper; + private angularGrid; + private selectionRendererFactory; + private gridPanel; + private $compile; + private $scope; + private selectionController; + private expressionService; + private templateService; + private cellRendererMap; + private rowModel; + private firstVirtualRenderedRow; + private lastVirtualRenderedRow; + private focusedCell; + private valueService; + private eventService; + private renderedRows; + private renderedTopFloatingRows; + private renderedBottomFloatingRows; + private eAllBodyContainers; + private eAllPinnedContainers; + private eBodyContainer; + private eBodyViewport; + private ePinnedColsContainer; + private eFloatingTopContainer; + private eFloatingTopPinnedContainer; + private eFloatingBottomContainer; + private eFloatingBottomPinnedContainer; + private eParentsOfRows; + init(columnModel: any, gridOptionsWrapper: GridOptionsWrapper, gridPanel: GridPanel, angularGrid: Grid, selectionRendererFactory: SelectionRendererFactory, $compile: any, $scope: any, selectionController: SelectionController, expressionService: ExpressionService, templateService: TemplateService, valueService: ValueService, eventService: EventService): void; + setRowModel(rowModel: any): void; + onIndividualColumnResized(column: Column): void; + setMainRowWidths(): void; + private findAllElements(gridPanel); + refreshAllFloatingRows(): void; + private refreshFloatingRows(renderedRows, rowData, pinnedContainer, bodyContainer, isTop); + refreshView(refreshFromIndex?: any): void; + softRefreshView(): void; + refreshRows(rowNodes: RowNode[]): void; + refreshCells(rowNodes: RowNode[], colIds: string[]): void; + rowDataChanged(rows: any): void; + private refreshAllVirtualRows(fromIndex); + refreshGroupRows(): void; + private removeVirtualRow(rowsToRemove, fromIndex?); + private unbindVirtualRow(indexToRemove); + drawVirtualRows(): void; + getFirstVirtualRenderedRow(): number; + getLastVirtualRenderedRow(): number; + private ensureRowsRendered(); + private insertRow(node, rowIndex, mainRowWidth); + getRenderedNodes(): any[]; + getIndexOfRenderedNode(node: any): number; + navigateToNextCell(key: any, rowIndex: number, column: Column): void; + private getNextCellToFocus(key, lastCellToFocus); + onRowSelected(rowIndex: number, selected: boolean): void; + focusCell(eCell: any, rowIndex: number, colIndex: number, colDef: ColDef, forceBrowserFocus: any): void; + getFocusedCell(): any; + setFocusedCell(rowIndex: any, colIndex: any): void; + startEditingNextCell(rowIndex: any, column: any, shiftKey: any): void; + } +} +declare module ag.grid { + class SelectionController { + private eParentsOfRows; + private angularGrid; + private gridOptionsWrapper; + private $scope; + private rowRenderer; + private selectedRows; + private selectedNodesById; + private rowModel; + private eventService; + init(angularGrid: Grid, gridPanel: GridPanel, gridOptionsWrapper: GridOptionsWrapper, $scope: any, rowRenderer: RowRenderer, eventService: EventService): void; + private initSelectedNodesById(); + getSelectedNodesById(): any; + getSelectedRows(): any; + getSelectedNodes(): any; + getBestCostNodeSelection(): any; + setRowModel(rowModel: any): void; + deselectAll(): void; + selectAll(): void; + selectNode(node: any, tryMulti: any, suppressEvents?: any): void; + private recursivelySelectAllChildren(node, suppressEvents?); + private recursivelyDeselectAllChildren(node); + private doWorkOfSelectNode(node, suppressEvents); + private addCssClassForNode_andInformVirtualRowListener(node); + private doWorkOfDeselectAllNodes(nodeToKeepSelected?); + private deselectRealNode(node); + private removeCssClassForNode(node); + deselectIndex(rowIndex: any): void; + deselectNode(node: any): void; + selectIndex(index: any, tryMulti: any, suppressEvents?: any): void; + private syncSelectedRowsAndCallListener(suppressEvents?); + private recursivelyCheckIfSelected(node); + isNodeSelected(node: any): boolean; + private updateGroupParentsIfNeeded(); + } +} +declare module ag.grid { + class RenderedHeaderElement { + private eRoot; + private dragStartX; + constructor(eRoot: HTMLElement); + getERoot(): HTMLElement; + destroy(): void; + refreshFilterIcon(): void; + refreshSortIcon(): void; + onDragStart(): void; + onDragging(dragChange: number): void; + onIndividualColumnResized(column: Column): void; + addDragHandler(eDraggableElement: any): void; + stopDragging(listenersToRemove: any): void; + } +} +declare module ag.grid { + class RenderedHeaderCell extends RenderedHeaderElement { + private static DEFAULT_SORTING_ORDER; + private eHeaderCell; + private eSortAsc; + private eSortDesc; + private eSortNone; + private eFilterIcon; + private column; + private gridOptionsWrapper; + private parentScope; + private childScope; + private filterManager; + private columnController; + private $compile; + private angularGrid; + private parentGroup; + private startWidth; + constructor(column: Column, parentGroup: RenderedHeaderGroupCell, gridOptionsWrapper: GridOptionsWrapper, parentScope: any, filterManager: FilterManager, columnController: ColumnController, $compile: any, angularGrid: Grid, eRoot: HTMLElement); + getGui(): HTMLElement; + destroy(): void; + private createScope(); + private addAttributes(); + private addClasses(); + private addMenu(); + private addSortIcons(headerCellLabel); + private setupComponents(); + private useRenderer(headerNameValue, headerCellRenderer, headerCellLabel); + refreshFilterIcon(): void; + refreshSortIcon(): void; + private getNextSortDirection(); + private addSortHandling(headerCellLabel); + onDragStart(): void; + onDragging(dragChange: number): void; + onIndividualColumnResized(column: Column): void; + private addHeaderClassesFromCollDef(); + } +} +declare module ag.grid { + class RenderedHeaderGroupCell extends RenderedHeaderElement { + private eHeaderGroup; + private eHeaderGroupCell; + private eHeaderCellResize; + private columnGroup; + private gridOptionsWrapper; + private columnController; + private children; + private groupWidthStart; + private childrenWidthStarts; + private minWidth; + private parentScope; + private filterManager; + private $compile; + private angularGrid; + constructor(columnGroup: ColumnGroup, gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, eRoot: HTMLElement, angularGrid: Grid, parentScope: any, filterManager: FilterManager, $compile: any); + getGui(): HTMLElement; + destroy(): void; + refreshFilterIcon(): void; + refreshSortIcon(): void; + onIndividualColumnResized(column: Column): void; + private setupComponents(); + private isColumnInOurDisplayedGroup(column); + private setWidthOfGroupHeaderCell(); + private addGroupExpandIcon(eGroupCellLabel); + onDragStart(): void; + onDragging(dragChange: any): void; + } +} +declare module ag.grid { + class HeaderRenderer { + private gridOptionsWrapper; + private columnController; + private angularGrid; + private filterManager; + private $scope; + private $compile; + private ePinnedHeader; + private eHeaderContainer; + private eRoot; + private headerElements; + init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, gridPanel: GridPanel, angularGrid: Grid, filterManager: FilterManager, $scope: any, $compile: any): void; + private findAllElements(gridPanel); + refreshHeader(): void; + private insertHeadersWithGrouping(); + private insertHeadersWithoutGrouping(); + updateSortIcons(): void; + updateFilterIcons(): void; + onIndividualColumnResized(column: Column): void; + } +} +declare module ag.grid { + class GroupCreator { + private valueService; + init(valueService: ValueService): void; + group(rowNodes: RowNode[], groupedCols: Column[], expandByDefault: any): RowNode[]; + isExpanded(expandByDefault: any, level: any): boolean; + } +} +declare module ag.grid { + class InMemoryRowController { + private gridOptionsWrapper; + private columnController; + private angularGrid; + private filterManager; + private $scope; + private allRows; + private rowsAfterGroup; + private rowsAfterFilter; + private rowsAfterSort; + private rowsAfterMap; + private model; + private groupCreator; + private valueService; + private eventService; + constructor(); + init(gridOptionsWrapper: GridOptionsWrapper, columnController: ColumnController, angularGrid: any, filterManager: FilterManager, $scope: any, groupCreator: GroupCreator, valueService: ValueService, eventService: EventService): void; + private createModel(); + getModel(): any; + forEachInMemory(callback: Function): void; + forEachNode(callback: Function): void; + forEachNodeAfterFilter(callback: Function): void; + forEachNodeAfterFilterAndSort(callback: Function): void; + private recursivelyWalkNodesAndCallback(list, callback); + updateModel(step: any): void; + private defaultGroupAggFunctionFactory(valueColumns, valueKeys); + doAggregate(): void; + expandOrCollapseAll(expand: boolean, rowNodes: RowNode[]): void; + private recursivelyClearAggData(nodes); + private recursivelyCreateAggData(nodes, groupAggFunction, level); + private doSort(); + private recursivelyResetSort(rowNodes); + private sortList(nodes, sortOptions); + private updateChildIndexes(nodes); + onPivotChanged(): void; + private doPivoting(); + private doFilter(); + private filterItems(rowNodes); + private recursivelyResetFilter(nodes); + setAllRows(rows: RowNode[], firstId?: number): void; + private recursivelyAddIdToNodes(nodes, index); + private recursivelyCheckUserProvidedNodes(nodes, parent, level); + private getTotalChildCount(rowNodes); + private doGroupMapping(); + private addToMap(mappedData, originalNodes); + private createFooterNode(groupNode); + } +} +declare module ag.grid { + class VirtualPageRowController { + rowRenderer: any; + datasourceVersion: any; + gridOptionsWrapper: any; + angularGrid: any; + datasource: any; + virtualRowCount: any; + foundMaxRow: any; + pageCache: any; + pageCacheSize: any; + pageLoadsInProgress: any; + pageLoadsQueued: any; + pageAccessTimes: any; + accessTime: any; + maxConcurrentDatasourceRequests: any; + maxPagesInCache: any; + pageSize: any; + overflowSize: any; + init(rowRenderer: any, gridOptionsWrapper: any, angularGrid: any): void; + setDatasource(datasource: any): void; + reset(): void; + createNodesFromRows(pageNumber: any, rows: any): any; + removeFromLoading(pageNumber: any): void; + pageLoadFailed(pageNumber: any): void; + pageLoaded(pageNumber: any, rows: any, lastRow: any): void; + putPageIntoCacheAndPurge(pageNumber: any, rows: any): void; + checkMaxRowAndInformRowRenderer(pageNumber: any, lastRow: any): void; + isPageAlreadyLoading(pageNumber: any): boolean; + doLoadOrQueue(pageNumber: any): void; + addToQueueAndPurgeQueue(pageNumber: any): void; + findLeastRecentlyAccessedPage(pageIndexes: any): number; + checkQueueForNextLoad(): void; + loadPage(pageNumber: any): void; + requestIsDaemon(datasourceVersionCopy: any): boolean; + getVirtualRow(rowIndex: any): any; + forEachNode(callback: any): void; + getModel(): { + getVirtualRow: (index: any) => any; + getVirtualRowCount: () => any; + forEachInMemory: (callback: any) => void; + forEachNode: (callback: any) => void; + forEachNodeAfterFilter: (callback: any) => void; + forEachNodeAfterFilterAndSort: (callback: any) => void; + }; + } +} +declare module ag.grid { + class PaginationController { + eGui: any; + btNext: any; + btPrevious: any; + btFirst: any; + btLast: any; + lbCurrent: any; + lbTotal: any; + lbRecordCount: any; + lbFirstRowOnPage: any; + lbLastRowOnPage: any; + ePageRowSummaryPanel: any; + angularGrid: any; + callVersion: any; + gridOptionsWrapper: any; + datasource: any; + pageSize: any; + rowCount: any; + foundMaxRow: any; + totalPages: any; + currentPage: any; + init(angularGrid: any, gridOptionsWrapper: any): void; + setDatasource(datasource: any): void; + reset(): void; + setTotalLabels(): void; + calculateTotalPages(): void; + pageLoaded(rows: any, lastRowIndex: any): void; + updateRowLabels(): void; + loadPage(): void; + isCallDaemon(versionCopy: any): boolean; + onBtNext(): void; + onBtPrevious(): void; + onBtFirst(): void; + onBtLast(): void; + isZeroPagesToDisplay(): boolean; + enableOrDisableButtons(): void; + createTemplate(): string; + getGui(): any; + setupComponents(): void; + } +} +declare module ag.grid { + class BorderLayout { + private eNorthWrapper; + private eSouthWrapper; + private eEastWrapper; + private eWestWrapper; + private eCenterWrapper; + private eOverlayWrapper; + private eCenterRow; + private eNorthChildLayout; + private eSouthChildLayout; + private eEastChildLayout; + private eWestChildLayout; + private eCenterChildLayout; + private isLayoutPanel; + private fullHeight; + private layoutActive; + private eGui; + private id; + private childPanels; + private centerHeightLastTime; + private sizeChangeListners; + constructor(params: any); + addSizeChangeListener(listener: Function): void; + fireSizeChanged(): void; + private setupPanels(params); + private setupPanel(content, ePanel); + getGui(): any; + doLayout(): boolean; + private layoutChild(childPanel); + private layoutHeight(); + private layoutHeightFullHeight(); + private layoutHeightNormal(); + getCentreHeight(): number; + private layoutWidth(); + setEastVisible(visible: any): void; + setOverlayVisible(visible: any): void; + setSouthVisible(visible: any): void; + } +} +declare module ag.grid { + class GridPanel { + private masterSlaveService; + private gridOptionsWrapper; + private columnModel; + private rowRenderer; + private rowModel; + private layout; + private forPrint; + private scrollWidth; + private scrollLagCounter; + private eBodyViewport; + private eRoot; + private eBody; + private eBodyContainer; + private ePinnedColsContainer; + private eHeaderContainer; + private ePinnedHeader; + private eHeader; + private eParentsOfRows; + private eBodyViewportWrapper; + private ePinnedColsViewport; + private eFloatingTop; + private ePinnedFloatingTop; + private eFloatingTopContainer; + private eFloatingBottom; + private ePinnedFloatingBottom; + private eFloatingBottomContainer; + init(gridOptionsWrapper: GridOptionsWrapper, columnModel: ColumnController, rowRenderer: RowRenderer, masterSlaveService: MasterSlaveService): void; + getLayout(): BorderLayout; + private setupComponents(); + getPinnedFloatingTop(): HTMLElement; + getFloatingTopContainer(): HTMLElement; + getPinnedFloatingBottom(): HTMLElement; + getFloatingBottomContainer(): HTMLElement; + private createTemplate(); + ensureIndexVisible(index: any): void; + ensureColIndexVisible(index: any): void; + showLoading(loading: any): void; + getWidthForSizeColsToFit(): number; + setRowModel(rowModel: any): void; + getBodyContainer(): HTMLElement; + getBodyViewport(): HTMLElement; + getPinnedColsContainer(): HTMLElement; + getHeaderContainer(): HTMLElement; + getRoot(): HTMLElement; + getPinnedHeader(): HTMLElement; + getRowsParent(): HTMLElement[]; + private queryHtmlElement(selector); + private findElements(); + private mouseWheelListener(event); + setBodyContainerWidth(): void; + setPinnedColContainerWidth(): void; + showPinnedColContainersIfNeeded(): void; + onBodyHeightChange(): void; + private sizeHeaderAndBody(); + private sizeHeaderAndBodyNormal(); + private sizeHeaderAndBodyForPrint(); + setHorizontalScrollPosition(hScrollPosition: number): void; + private addScrollListener(); + private requestDrawVirtualRows(); + private scrollHeader(bodyLeftPosition); + private scrollPinned(bodyTopPosition); + } +} +declare module ag.grid { + class DragAndDropService { + static theInstance: DragAndDropService; + static getInstance(): DragAndDropService; + dragItem: any; + constructor(); + stopDragging(): void; + setDragCssClasses(eListItem: any, dragging: any): void; + addDragSource(eDragSource: any, dragSourceCallback: any): void; + onMouseDownDragSource(eDragSource: any, dragSourceCallback: any): void; + addDropTarget(eDropTarget: any, dropTargetCallback: any): void; + } +} +declare function require(name: string): any; +declare module ag.grid { + class AgList { + private eGui; + private uniqueId; + private modelChangedListeners; + private itemSelectedListeners; + private beforeDropListeners; + private itemMovedListeners; + private dragSources; + private emptyMessage; + private eFilterValueTemplate; + private eListParent; + private model; + private cellRenderer; + private readOnly; + constructor(); + setReadOnly(readOnly: boolean): void; + setEmptyMessage(emptyMessage: any): void; + getUniqueId(): any; + addStyles(styles: any): void; + addCssClass(cssClass: any): void; + addDragSource(dragSource: any): void; + addModelChangedListener(listener: Function): void; + addItemSelectedListener(listener: any): void; + addItemMovedListener(listener: any): void; + addBeforeDropListener(listener: any): void; + private fireItemMoved(fromIndex, toIndex); + private fireModelChanged(); + private fireItemSelected(item); + private fireBeforeDrop(item); + private setupComponents(); + setModel(model: any): void; + getModel(): any; + setCellRenderer(cellRenderer: any): void; + refreshView(): void; + private insertRows(); + private insertBlankMessage(); + private setupAsDropTarget(); + private externalAcceptDrag(dragEvent); + private externalDrop(dragEvent); + private externalNoDrop(); + private addItemToList(newItem); + private addDragAndDropToListItem(eListItem, item); + private internalAcceptDrag(targetColumn, dragItem, eListItem); + private internalDrop(targetColumn, draggedColumn); + private internalNoDrop(eListItem); + private dragAfterThisItem(targetColumn, draggedColumn); + private setDropCssClasses(eListItem, state); + getGui(): any; + } +} +declare module ag.grid { + class ColumnSelectionPanel { + private gridOptionsWrapper; + private columnController; + private cColumnList; + layout: any; + private eRootPanel; + constructor(columnController: ColumnController, gridOptionsWrapper: GridOptionsWrapper, eventService: EventService); + private columnsChanged(); + getDragSource(): any; + private columnCellRenderer(params); + private setupComponents(); + private onItemMoved(fromIndex, toIndex); + getGui(): any; + } +} +declare module ag.grid { + class GroupSelectionPanel { + gridOptionsWrapper: any; + columnController: ColumnController; + inMemoryRowController: any; + cColumnList: any; + layout: any; + constructor(columnController: ColumnController, inMemoryRowController: any, gridOptionsWrapper: GridOptionsWrapper, eventService: EventService); + private columnsChanged(); + addDragSource(dragSource: any): void; + private columnCellRenderer(params); + private setupComponents(); + private onBeforeDrop(newItem); + private onItemMoved(fromIndex, toIndex); + } +} +declare module ag.grid { + class AgDropdownList { + private itemSelectedListeners; + private eValue; + private agList; + private eGui; + private hidePopupCallback; + private selectedItem; + private cellRenderer; + private popupService; + constructor(popupService: PopupService); + setWidth(width: any): void; + addItemSelectedListener(listener: any): void; + fireItemSelected(item: any): void; + setupComponents(): void; + itemSelected(item: any): void; + onClick(): void; + getGui(): any; + setSelected(item: any): void; + setCellRenderer(cellRenderer: any): void; + refreshView(): void; + setModel(model: any): void; + } +} +declare module ag.grid { + class ValuesSelectionPanel { + private gridOptionsWrapper; + private columnController; + private cColumnList; + private layout; + private popupService; + constructor(columnController: ColumnController, gridOptionsWrapper: GridOptionsWrapper, popupService: PopupService, eventService: EventService); + getLayout(): any; + private columnsChanged(); + addDragSource(dragSource: any): void; + private cellRenderer(params); + private setupComponents(); + private beforeDropListener(newItem); + } +} +declare module ag.grid { + class VerticalStack { + isLayoutPanel: any; + childPanels: any; + eGui: any; + constructor(); + addPanel(panel: any, height: any): void; + getGui(): any; + doLayout(): void; + } +} +declare module ag.grid { + class ToolPanel { + layout: any; + constructor(); + init(columnController: any, inMemoryRowController: any, gridOptionsWrapper: GridOptionsWrapper, popupService: PopupService, eventService: EventService): void; + } +} +declare module ag.grid { + interface GridOptions { + virtualPaging?: boolean; + toolPanelSuppressPivot?: boolean; + toolPanelSuppressValues?: boolean; + rowsAlreadyGrouped?: boolean; + suppressRowClickSelection?: boolean; + suppressCellSelection?: boolean; + sortingOrder?: string[]; + suppressMultiSort?: boolean; + suppressHorizontalScroll?: boolean; + unSortIcon?: boolean; + rowHeight?: number; + rowBuffer?: number; + enableColResize?: boolean; + enableCellExpressions?: boolean; + enableSorting?: boolean; + enableServerSideSorting?: boolean; + enableFilter?: boolean; + enableServerSideFilter?: boolean; + colWidth?: number; + suppressMenuHide?: boolean; + singleClickEdit?: boolean; + debug?: boolean; + icons?: any; + angularCompileRows?: boolean; + angularCompileFilters?: boolean; + angularCompileHeaders?: boolean; + localeText?: any; + localeTextFunc?: Function; + suppressScrollLag?: boolean; + groupSuppressAutoColumn?: boolean; + groupSelectsChildren?: boolean; + groupHidePivotColumns?: boolean; + groupIncludeFooter?: boolean; + groupUseEntireRow?: boolean; + groupSuppressRow?: boolean; + groupSuppressBlankHeader?: boolean; + forPrint?: boolean; + groupColumnDef?: any; + context?: any; + rowStyle?: any; + rowClass?: any; + groupDefaultExpanded?: any; + slaveGrids?: GridOptions[]; + rowSelection?: string; + rowDeselection?: boolean; + rowData?: any[]; + floatingTopRowData?: any[]; + floatingBottomRowData?: any[]; + showToolPanel?: boolean; + groupKeys?: string[]; + groupAggFields?: string[]; + columnDefs?: any[]; + datasource?: any; + pinnedColumnCount?: number; + groupHeaders?: boolean; + headerHeight?: number; + groupRowInnerRenderer?(params: any): void; + groupRowRenderer?: Function | Object; + isScrollLag?(): boolean; + isExternalFilterPresent?(): boolean; + doesExternalFilterPass?(node: RowNode): boolean; + getRowStyle?: any; + getRowClass?: any; + headerCellRenderer?: any; + groupAggFunction?(nodes: any[]): any; + onReady?(api: any): void; + onModelUpdated?(): void; + onCellClicked?(params: any): void; + onCellDoubleClicked?(params: any): void; + onCellContextMenu?(params: any): void; + onCellValueChanged?(params: any): void; + onCellFocused?(params: any): void; + onRowSelected?(params: any): void; + onSelectionChanged?(): void; + onBeforeFilterChanged?(): void; + onAfterFilterChanged?(): void; + onFilterModified?(): void; + onBeforeSortChanged?(): void; + onAfterSortChanged?(): void; + onVirtualRowRemoved?(params: any): void; + onRowClicked?(params: any): void; + api?: GridApi; + columnApi?: ColumnApi; + } +} +declare module ag.grid { + class GridApi { + private grid; + private rowRenderer; + private headerRenderer; + private filterManager; + private columnController; + private inMemoryRowController; + private selectionController; + private gridOptionsWrapper; + private gridPanel; + private valueService; + private masterSlaveService; + private eventService; + private csvCreator; + constructor(grid: Grid, rowRenderer: RowRenderer, headerRenderer: HeaderRenderer, filterManager: FilterManager, columnController: ColumnController, inMemoryRowController: InMemoryRowController, selectionController: SelectionController, gridOptionsWrapper: GridOptionsWrapper, gridPanel: GridPanel, valueService: ValueService, masterSlaveService: MasterSlaveService, eventService: EventService); + /** Used internally by grid. Not intended to be used by the client. Interface may change between releases. */ + __getMasterSlaveService(): MasterSlaveService; + getDataAsCsv(params?: CsvExportParams): string; + exportDataAsCsv(params?: CsvExportParams): void; + setDatasource(datasource: any): void; + onNewDatasource(): void; + setRowData(rowData: any): void; + setRows(rows: any): void; + onNewRows(): void; + setFloatingTopRowData(rows: any[]): void; + setFloatingBottomRowData(rows: any[]): void; + onNewCols(): void; + setColumnDefs(colDefs: ColDef[]): void; + unselectAll(): void; + refreshRows(rowNodes: RowNode[]): void; + refreshCells(rowNodes: RowNode[], colIds: string[]): void; + rowDataChanged(rows: any): void; + refreshView(): void; + softRefreshView(): void; + refreshGroupRows(): void; + refreshHeader(): void; + isAnyFilterPresent(): boolean; + isAdvancedFilterPresent(): boolean; + isQuickFilterPresent(): boolean; + getModel(): any; + onGroupExpandedOrCollapsed(refreshFromIndex: any): void; + expandAll(): void; + collapseAll(): void; + addVirtualRowListener(rowIndex: any, callback: any): void; + setQuickFilter(newFilter: any): void; + selectIndex(index: any, tryMulti: any, suppressEvents: any): void; + deselectIndex(index: any): void; + selectNode(node: any, tryMulti: any, suppressEvents: any): void; + deselectNode(node: any): void; + selectAll(): void; + deselectAll(): void; + recomputeAggregates(): void; + sizeColumnsToFit(): void; + showLoading(show: any): void; + isNodeSelected(node: any): boolean; + getSelectedNodesById(): { + [nodeId: number]: RowNode; + }; + getSelectedNodes(): RowNode[]; + getSelectedRows(): any[]; + getBestCostNodeSelection(): any; + getRenderedNodes(): any[]; + ensureColIndexVisible(index: any): void; + ensureIndexVisible(index: any): void; + ensureNodeVisible(comparator: any): void; + forEachInMemory(callback: Function): void; + forEachNode(callback: Function): void; + forEachNodeAfterFilter(callback: Function): void; + forEachNodeAfterFilterAndSort(callback: Function): void; + getFilterApiForColDef(colDef: any): any; + getFilterApi(key: any): any; + getColumnDef(key: any): ColDef; + onFilterChanged(): void; + setSortModel(sortModel: any): void; + getSortModel(): any; + setFilterModel(model: any): void; + getFilterModel(): any; + getFocusedCell(): any; + setFocusedCell(rowIndex: any, colIndex: any): void; + setHeaderHeight(headerHeight: number): void; + setGroupHeaders(groupHeaders: boolean): void; + showToolPanel(show: any): void; + isToolPanelShowing(): boolean; + hideColumn(colId: any, hide: any): void; + hideColumns(colIds: any, hide: any): void; + getColumnState(): [any]; + setColumnState(state: any): void; + doLayout(): void; + getValue(colDef: ColDef, data: any, node: any): any; + addEventListener(eventType: string, listener: Function): void; + addGlobalListener(listener: Function): void; + removeEventListener(eventType: string, listener: Function): void; + removeGlobalListener(listener: Function): void; + refreshPivot(): void; + } +} +declare module ag.grid { + class ValueService { + private gridOptionsWrapper; + private expressionService; + private columnController; + init(gridOptionsWrapper: GridOptionsWrapper, expressionService: ExpressionService, columnController: ColumnController): void; + getValue(colDef: ColDef, data: any, node: any): any; + private executeValueGetter(valueGetter, data, colDef, node); + private getValueCallback(data, node, field); + } +} +declare module ag.grid { + class Grid { + private virtualRowCallbacks; + private gridOptions; + private gridOptionsWrapper; + private inMemoryRowController; + private doingVirtualPaging; + private paginationController; + private virtualPageRowController; + private finished; + private selectionController; + private columnController; + private rowRenderer; + private headerRenderer; + private filterManager; + private valueService; + private masterSlaveService; + private eventService; + private toolPanel; + private gridPanel; + private eRootPanel; + private toolPanelShowing; + private doingPagination; + private usingInMemoryModel; + private rowModel; + constructor(eGridDiv: any, gridOptions: any, globalEventListener?: Function, $scope?: any, $compile?: any, quickFilterOnScope?: any); + getRowModel(): any; + private periodicallyDoLayout(); + private setupComponents($scope, $compile, eUserProvidedDiv, globalEventListener); + private onColumnChanged(event); + refreshPivot(): void; + getEventService(): EventService; + private onIndividualColumnResized(column); + showToolPanel(show: any): void; + isToolPanelShowing(): boolean; + isUsingInMemoryModel(): boolean; + setDatasource(datasource?: any): void; + private refreshHeaderAndBody(); + setFinished(): void; + onQuickFilterChanged(newFilter: any): void; + onFilterModified(): void; + onFilterChanged(): void; + onRowClicked(event: any, rowIndex: any, node: any): void; + showLoadingPanel(show: any): void; + private setupColumns(); + updateModelAndRefresh(step: any, refreshFromIndex?: any): void; + setRows(rows?: any, firstId?: any): void; + ensureNodeVisible(comparator: any): void; + getFilterModel(): any; + setFocusedCell(rowIndex: any, colIndex: any): void; + getSortModel(): any; + setSortModel(sortModel: any): void; + onSortingChanged(): void; + addVirtualRowListener(rowIndex: any, callback: any): void; + onVirtualRowSelected(rowIndex: any, selected: any): void; + onVirtualRowRemoved(rowIndex: any): void; + setColumnDefs(colDefs?: ColDef[]): void; + updateBodyContainerWidthAfterColResize(): void; + updatePinnedColContainerWidthAfterColResize(): void; + doLayout(): void; + } +} +declare module ag.grid { + class ComponentUtil { + static SIMPLE_PROPERTIES: string[]; + static SIMPLE_NUMBER_PROPERTIES: string[]; + static SIMPLE_BOOLEAN_PROPERTIES: string[]; + static WITH_IMPACT_NUMBER_PROPERTIES: string[]; + static WITH_IMPACT_BOOLEAN_PROPERTIES: string[]; + static WITH_IMPACT_OTHER_PROPERTIES: string[]; + static CALLBACKS: string[]; + static ALL_PROPERTIES: string[]; + static copyAttributesToGridOptions(gridOptions: GridOptions, component: any): GridOptions; + static processOnChange(changes: any, gridOptions: GridOptions, component: any): void; + static toBoolean(value: any): boolean; + static toNumber(value: any): number; + } +} +declare module ag.grid { + class AgGridNg2 { + private elementDef; + private _agGrid; + private _initialised; + private gridOptions; + private api; + private columnApi; + modelUpdated: any; + cellClicked: any; + cellDoubleClicked: any; + cellContextMenu: any; + cellValueChanged: any; + cellFocused: any; + rowSelected: any; + selectionChanged: any; + beforeFilterChanged: any; + afterFilterChanged: any; + filterModified: any; + beforeSortChanged: any; + afterSortChanged: any; + virtualRowRemoved: any; + rowClicked: any; + ready: any; + columnEverythingChanged: any; + columnPivotChanged: any; + columnValueChanged: any; + columnMoved: any; + columnVisible: any; + columnGroupOpened: any; + columnResized: any; + columnPinnedCountChanged: any; + virtualPaging: boolean; + toolPanelSuppressPivot: boolean; + toolPanelSuppressValues: boolean; + rowsAlreadyGrouped: boolean; + suppressRowClickSelection: boolean; + suppressCellSelection: boolean; + sortingOrder: string[]; + suppressMultiSort: boolean; + suppressHorizontalScroll: boolean; + unSortIcon: boolean; + rowHeight: number; + rowBuffer: number; + enableColResize: boolean; + enableCellExpressions: boolean; + enableSorting: boolean; + enableServerSideSorting: boolean; + enableFilter: boolean; + enableServerSideFilter: boolean; + colWidth: number; + suppressMenuHide: boolean; + debug: boolean; + icons: any; + angularCompileRows: boolean; + angularCompileFilters: boolean; + angularCompileHeaders: boolean; + localeText: any; + localeTextFunc: Function; + groupSuppressAutoColumn: boolean; + groupSelectsChildren: boolean; + groupHidePivotColumns: boolean; + groupIncludeFooter: boolean; + groupUseEntireRow: boolean; + groupSuppressRow: boolean; + groupSuppressBlankHeader: boolean; + groupColumnDef: any; + forPrint: boolean; + context: any; + rowStyle: any; + rowClass: any; + headerCellRenderer: any; + groupDefaultExpanded: any; + slaveGrids: GridOptions[]; + rowSelection: string; + rowDeselection: boolean; + rowData: any[]; + floatingTopRowData: any[]; + floatingBottomRowData: any[]; + showToolPanel: boolean; + groupKeys: string[]; + groupAggFunction: (nodes: any[]) => void; + groupAggFields: string[]; + columnDefs: any[]; + datasource: any; + pinnedColumnCount: number; + quickFilterText: string; + groupHeaders: boolean; + headerHeight: number; + constructor(elementDef: any); + onInit(): void; + onChange(changes: any): void; + private globalEventListener(eventType, event); + } +} +declare module ag.grid { +} +declare var exports: any; +declare var module: any; +declare module ag.grid { + interface Filter { + getGui(): any; + isFilterActive(): boolean; + doesFilterPass(params: any): boolean; + afterGuiAttached?(params?: { + hidePopup?: Function; + }): void; + onNewRowsLoaded?(): void; + } +} From e04d45a547abb2c083b9f9126fec8adb364a1f9d Mon Sep 17 00:00:00 2001 From: Niall Crosby Date: Thu, 1 Oct 2015 11:31:06 +0100 Subject: [PATCH 07/30] added types of project ag-Grid --- ag-grid/ag-grid.d-2.1.2.ts | 2 +- ag-grid/ag-grid.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ag-grid/ag-grid.d-2.1.2.ts b/ag-grid/ag-grid.d-2.1.2.ts index cb2fdb5d1..f385a90f4 100644 --- a/ag-grid/ag-grid.d-2.1.2.ts +++ b/ag-grid/ag-grid.d-2.1.2.ts @@ -1,7 +1,7 @@ // Type definitions for ag-grid v2.1.2 // Project: http://www.ag-grid.com/ // Definitions by: Niall Crosby -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare module ag.grid { class ColumnChangeEvent { private type; diff --git a/ag-grid/ag-grid.d.ts b/ag-grid/ag-grid.d.ts index cb2fdb5d1..f385a90f4 100644 --- a/ag-grid/ag-grid.d.ts +++ b/ag-grid/ag-grid.d.ts @@ -1,7 +1,7 @@ // Type definitions for ag-grid v2.1.2 // Project: http://www.ag-grid.com/ // Definitions by: Niall Crosby -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped declare module ag.grid { class ColumnChangeEvent { private type; From e30c8706759c7a187ebdaa02498acc7e774c7a36 Mon Sep 17 00:00:00 2001 From: Blake Doss Date: Sat, 3 Oct 2015 10:46:58 -0400 Subject: [PATCH 08/30] Added ambient external module for bloodhound. --- typeahead/typeahead.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/typeahead/typeahead.d.ts b/typeahead/typeahead.d.ts index 7317aa4c7..901bd8192 100644 --- a/typeahead/typeahead.d.ts +++ b/typeahead/typeahead.d.ts @@ -411,3 +411,7 @@ declare class Bloodhound { */ public static tokenizers: Bloodhound.Tokenizers; } + +declare module "bloodhound" { + export = Bloodhound; +} From bc5a757e7111e7dfab1f96d8cbd6377c3c55a985 Mon Sep 17 00:00:00 2001 From: Blake Doss Date: Sat, 3 Oct 2015 11:00:11 -0400 Subject: [PATCH 09/30] Added prepare function to RemoteOptions interface. This method appears to have been added to Bloodhound in the 0.11.1 release that rolled out at the end of April. --- typeahead/typeahead.d.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/typeahead/typeahead.d.ts b/typeahead/typeahead.d.ts index 901bd8192..a8b139937 100644 --- a/typeahead/typeahead.d.ts +++ b/typeahead/typeahead.d.ts @@ -316,6 +316,19 @@ declare module Bloodhound * The ajax settings object passed to jQuery.ajax. */ ajax?: JQueryAjaxSettings; + + /** + * A function that provides a hook to allow you to prepare the settings object passed to transport + * when a request is about to be made. The function signature should be prepare(query, settings), + * where query is the query #search was called with and settings is the default settings object + * created internally by the Bloodhound instance. The prepare function should return a settings object. + * [Note: Added in 0.11.1] + * + * @param query The query #search was called with. + * @param settings The default settings object created internally by Bloodhound. + * @returns A JqueryAjaxSettings object. + */ + prepare?: (query: string, settings: JQueryAjaxSettings) => JQueryAjaxSettings; } /** From 170bd06de4b98fec4e676cc8cec2588746a4461c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 6 Oct 2015 22:09:12 +1300 Subject: [PATCH 10/30] Fix del typings - Return promise rather instead of taking in a callback. #5908 --- del/del-tests.ts | 17 +++++++++-------- del/del.d.ts | 17 +++++++---------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/del/del-tests.ts b/del/del-tests.ts index b0dd98434..867781d63 100644 --- a/del/del-tests.ts +++ b/del/del-tests.ts @@ -7,11 +7,11 @@ del(["tmp/*.js", "!tmp/unicorn.js"]); del(["tmp/*.js", "!tmp/unicorn.js"], {force: true}); -del(["tmp/*.js", "!tmp/unicorn.js"], (err, paths) => { +del(["tmp/*.js", "!tmp/unicorn.js"]).then((paths: string[]) => { console.log('Deleted files/folders:\n', paths.join('\n')); }); -del(["tmp/*.js", "!tmp/unicorn.js"], {force: true}, (err, paths) => { +del(["tmp/*.js", "!tmp/unicorn.js"], {force: true}).then((paths: string[]) => { console.log('Deleted files/folders:\n', paths.join('\n')); }); @@ -19,18 +19,19 @@ del("tmp/*.js"); del("tmp/*.js", {force: true}); -del("tmp/*.js", (err, paths) => { +del("tmp/*.js").then((paths: string[]) => { console.log('Deleted files/folders:\n', paths.join('\n')); }); -del("tmp/*.js", {force: true}, (err, paths) => { +del("tmp/*.js", {force: true}).then((paths: string[]) => { console.log('Deleted files/folders:\n', paths.join('\n')); }); -del.sync(["tmp/*.js", "!tmp/unicorn.js"]); +var paths: string[]; +paths = del.sync(["tmp/*.js", "!tmp/unicorn.js"]); -del.sync(["tmp/*.js", "!tmp/unicorn.js"], {force: true}); +paths = del.sync(["tmp/*.js", "!tmp/unicorn.js"], {force: true}); -del.sync("tmp/*.js"); +paths = del.sync("tmp/*.js"); -del.sync("tmp/*.js", {force: true}); +paths = del.sync("tmp/*.js", {force: true}); diff --git a/del/del.d.ts b/del/del.d.ts index b20bac92c..060861d8a 100644 --- a/del/del.d.ts +++ b/del/del.d.ts @@ -4,23 +4,20 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped /// +/// declare module "del" { import glob = require("glob"); - function Del(pattern: string): void; - function Del(pattern: string, options: Del.Options): void; - function Del(pattern: string, callback: (err: Error, deletedFiles: string[]) => any): void; - function Del(pattern: string, options: Del.Options, callback: (err: Error, deletedFiles: string[]) => any): void; + function Del(pattern: string): Promise; + function Del(pattern: string, options: Del.Options): Promise; - function Del(patterns: string[]): void; - function Del(patterns: string[], options: Del.Options): void; - function Del(patterns: string[], callback: (err: Error, deletedFiles: string[]) => any): void; - function Del(patterns: string[], options: Del.Options, callback: (err: Error, deletedFiles: string[]) => any): void; + function Del(patterns: string[]): Promise; + function Del(patterns: string[], options: Del.Options): Promise; module Del { - function sync(pattern: string, options?: Options): void; - function sync(patterns: string[], options?: Options): void; + function sync(pattern: string, options?: Options): string[]; + function sync(patterns: string[], options?: Options): string[]; interface Options extends glob.IOptions { force?: boolean From 4ae40d711d22819c4ded9f88532608c109bd35d1 Mon Sep 17 00:00:00 2001 From: Dave Allen Date: Tue, 6 Oct 2015 12:10:09 -0700 Subject: [PATCH 11/30] Overwrote lodash.d.ts with latest from DefinitelyTyped repo --- lodash/lodash.d.ts | 53 +++++++--------------------------------------- 1 file changed, 8 insertions(+), 45 deletions(-) diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 5f5c669b0..e18e5f6b3 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -2422,7 +2422,7 @@ declare module _ { ): LoDashArrayWrapper; } - //_.includes + //_.contains interface LoDashStatic { /** * Checks if a given value is present in a collection using strict equality for comparisons, @@ -2432,49 +2432,13 @@ declare module _ { * @param fromIndex The index to search from. * @return True if the target element is found, else false. **/ - includes( - collection: Array, - target: T, - fromIndex?: number): boolean; - - /** - * @see _.includes - **/ - includes( - collection: List, - target: T, - fromIndex?: number): boolean; - - /** - * @see _.includes - * @param dictionary The dictionary to iterate over. - * @param key The key in the dictionary to search for. - **/ - includes( - dictionary: Dictionary, - key: string, - fromIndex?: number): boolean; - - /** - * @see _.includes - * @param searchString the string to search - * @param targetString the string to search for - **/ - includes( - searchString: string, - targetString: string, - fromIndex?: number): boolean; - - /** - * @see _.includes - **/ contains( collection: Array, target: T, fromIndex?: number): boolean; /** - * @see _.includes + * @see _.contains **/ contains( collection: List, @@ -2482,7 +2446,7 @@ declare module _ { fromIndex?: number): boolean; /** - * @see _.includes + * @see _.contains * @param dictionary The dictionary to iterate over. * @param value The value in the dictionary to search for. **/ @@ -2492,7 +2456,7 @@ declare module _ { fromIndex?: number): boolean; /** - * @see _.includes + * @see _.contains * @param searchString the string to search * @param targetString the string to search for **/ @@ -2501,9 +2465,8 @@ declare module _ { targetString: string, fromIndex?: number): boolean; - /** - * @see _.includes + * @see _.contains **/ include( collection: Array, @@ -2511,7 +2474,7 @@ declare module _ { fromIndex?: number): boolean; /** - * @see _.includes + * @see _.contains **/ include( collection: List, @@ -2519,7 +2482,7 @@ declare module _ { fromIndex?: number): boolean; /** - * @see _.includes + * @see _.contains **/ include( dictionary: Dictionary, @@ -2527,7 +2490,7 @@ declare module _ { fromIndex?: number): boolean; /** - * @see _.includes + * @see _.contains **/ include( searchString: string, From fd7aa0a879f424749d3e808e099a3ad92072df66 Mon Sep 17 00:00:00 2001 From: Moes Date: Wed, 7 Oct 2015 14:26:14 +1000 Subject: [PATCH 12/30] Update Knockout.d.ts add `objectForEach` and `setPrototypeOf` to `KnockoutUtils` interface --- knockout/knockout.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index 94964950c..0fbe8cbad 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -338,6 +338,10 @@ interface KnockoutUtils { isIe6: boolean; isIe7: boolean; + + objectForEach(obj: any, action: Function): void; + + setPrototypeOf(obj: any, proto: any): void; } interface KnockoutArrayChange { From af73a334c85d6dcd18eef5397f42904a7e0854d0 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Tue, 22 Sep 2015 04:26:45 +0500 Subject: [PATCH 13/30] lodash: changed _.rest() method (alias _.tail()) --- lodash/lodash-tests.ts | 36 +++++--- lodash/lodash.d.ts | 183 +++++++++-------------------------------- 2 files changed, 63 insertions(+), 156 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index db15ebc4a..3f2cb04f6 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -276,18 +276,6 @@ module TestDropWhile { result = _(list).dropWhile<{a: number;}, TResult>({a: 42}).value(); } -result = _.rest([1, 2, 3]); -result = _.rest([1, 2, 3], 2); -result = _.rest([1, 2, 3], (num) => num < 3) -result = _.rest(foodsOrganic, 'test'); -result = _.rest(foodsType, { 'type': 'value' }); - -result = _.tail([1, 2, 3]) -result = _.tail([1, 2, 3], 2) -result = _.tail([1, 2, 3], (num) => num < 3) -result = _.tail(foodsOrganic, 'test') -result = _.tail(foodsType, { 'type': 'value' }) - // _.fill var testFillArray = [1, 2, 3]; var testFillList: _.List = {0: 1, 1: 2, 2: 3, length: 3}; @@ -584,6 +572,18 @@ module TestRemove { result = _(list).remove<{a: number}, TResult>({a: 42}).value(); } +// _.rest +module TestRest { + let array: TResult[]; + let list: _.List; + let result: TResult[]; + + result = _.rest(array); + result = _.rest(list); + result = _(array).rest().value(); + result = _(list).rest().value(); +} + // _.slice { let testSliceArray: TResult[]; @@ -608,6 +608,18 @@ result = _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function return this.wordToNumber[word]; }, sortedIndexDict); +// _.tail +module TestTail { + let array: TResult[]; + let list: _.List; + let result: TResult[]; + + result = _.tail(array); + result = _.tail(list); + result = _(array).tail().value(); + result = _(list).tail().value(); +} + // _.take module TestTake { let array: TResult[]; diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 5a3e0df9e..d8282d954 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -1165,155 +1165,28 @@ declare module _ { //_.rest interface LoDashStatic { /** - * The opposite of _.initial this method gets all but the first element or first n elements of - * an array. If a callback function is provided elements at the beginning of the array are excluded - * from the result as long as the callback returns truey. The callback is bound to thisArg and - * invoked with three arguments; (value, index, array). - * - * If a property name is provided for callback the created "_.pluck" style callback will return - * the property value of the given element. - * - * If an object is provided for callback the created "_.where" style callback will return true - * for elements that have the properties of the given object, else false. - * @param array The array to query. - * @param {(Function|Object|number|string)} [callback=1] The function called per element or the number - * of elements to exclude. If a property name or object is provided it will be used to create a - * ".pluck" or ".where" style callback, respectively. - * @param {*} [thisArg] The this binding of callback. - * @return Returns a slice of array. - **/ - rest(array: Array): T[]; - - /** - * @see _.rest - **/ + * Gets all but the first element of array. + * + * @alias _.tail + * + * @param array The array to query. + * @return Returns the slice of array. + */ rest(array: List): T[]; + } + interface LoDashArrayWrapper { /** - * @see _.rest - **/ - rest( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; + * @see _.rest + */ + rest(): LoDashArrayWrapper; + } + interface LoDashObjectWrapper { /** - * @see _.rest - **/ - rest( - array: List, - callback: ListIterator, - thisArg?: any): T[]; - - /** - * @see _.rest - **/ - rest( - array: Array, - n: number): T[]; - - /** - * @see _.rest - **/ - rest( - array: List, - n: number): T[]; - - /** - * @see _.rest - **/ - rest( - array: Array, - pluckValue: string): T[]; - - /** - * @see _.rest - **/ - rest( - array: List, - pluckValue: string): T[]; - - /** - * @see _.rest - **/ - rest( - array: Array, - whereValue: W): T[]; - - /** - * @see _.rest - **/ - rest( - array: List, - whereValue: W): T[]; - - /** - * @see _.rest - **/ - tail(array: Array): T[]; - - /** - * @see _.rest - **/ - tail(array: List): T[]; - - /** - * @see _.rest - **/ - tail( - array: Array, - callback: ListIterator, - thisArg?: any): T[]; - - /** - * @see _.rest - **/ - tail( - array: List, - callback: ListIterator, - thisArg?: any): T[]; - - /** - * @see _.rest - **/ - tail( - array: Array, - n: number): T[]; - - /** - * @see _.rest - **/ - tail( - array: List, - n: number): T[]; - - /** - * @see _.rest - **/ - tail( - array: Array, - pluckValue: string): T[]; - - /** - * @see _.rest - **/ - tail( - array: List, - pluckValue: string): T[]; - - /** - * @see _.rest - **/ - tail( - array: Array, - whereValue: W): T[]; - - /** - * @see _.rest - **/ - tail( - array: List, - whereValue: W): T[]; + * @see _.rest + */ + rest(): LoDashArrayWrapper; } //_.slice @@ -1413,6 +1286,28 @@ declare module _ { whereValue: W): number; } + //_.tail + interface LoDashStatic { + /** + * @see _.rest + */ + tail(array: List): T[]; + } + + interface LoDashArrayWrapper { + /** + * @see _.rest + */ + tail(): LoDashArrayWrapper; + } + + interface LoDashObjectWrapper { + /** + * @see _.rest + */ + tail(): LoDashArrayWrapper; + } + //_.take interface LoDashStatic { /** From b65a2663e9758a5e17e8a3ee4dba8434f21d53a1 Mon Sep 17 00:00:00 2001 From: Igor Kriklivetc Date: Wed, 7 Oct 2015 16:25:03 +0300 Subject: [PATCH 14/30] Update to 15.1.7 --- devextreme/dx.devextreme-15.1.6.d.ts | 6621 ++++++++++++++++++++++++++ devextreme/dx.devextreme.d.ts | 334 +- 2 files changed, 6762 insertions(+), 193 deletions(-) create mode 100644 devextreme/dx.devextreme-15.1.6.d.ts diff --git a/devextreme/dx.devextreme-15.1.6.d.ts b/devextreme/dx.devextreme-15.1.6.d.ts new file mode 100644 index 000000000..fdb7df96c --- /dev/null +++ b/devextreme/dx.devextreme-15.1.6.d.ts @@ -0,0 +1,6621 @@ +// Type definitions for DevExtreme 15.1.6 +// Project: http://js.devexpress.com/ +// Definitions by: DevExpress Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module DevExpress { + /** A mixin that provides a capability to fire and subscribe to events. */ + export interface EventsMixin { + /** Subscribes to a specified event. */ + on(eventName: string, eventHandler: Function): T; + /** Subscribes to the specified events. */ + on(events: { [eventName: string]: Function; }): T; + /** Detaches all event handlers from the specified event. */ + off(eventName: string): Object; + /** Detaches a particular event handler from the specified event. */ + off(eventName: string, eventHandler: Function): T; + } + /** An object that serves as a namespace for the methods required to perform validation. */ + export module validationEngine { + export interface IValidator { + validate(): ValidatorValidationResult; + reset(): void; + } + export interface ValidatorValidationResult { + isValid: boolean; + name?: string; + value: any; + brokenRule: any; + validationRules: any[]; + } + export interface ValidationGroupValidationResult { + isValid: boolean; + brokenRules: any[]; + validators: IValidator[]; + } + export interface GroupConfig extends EventsMixin { + group: any; + validators: IValidator[]; + validate(): ValidationGroupValidationResult; + reset(): void; + } + /** Provides access to the object that represents the specified validation group. */ + export function getGroupConfig(group: any): GroupConfig + /** Provides access to the object that represents the default validation group. */ + export function getGroupConfig(): GroupConfig + /** Validates rules of the validators that belong to the specified validation group. */ + export function validateGroup(group: any): ValidationGroupValidationResult; + /** Validates rules of the validators that belong to the default validation group. */ + export function validateGroup(): ValidationGroupValidationResult; + /** Resets the values and validation result of the editors that belong to the specified validation group. */ + export function resetGroup(group: any): void; + /** Resets the values and validation result of the editors that belong to the default validation group. */ + export function resetGroup(): void; + /** Validates the rules that are defined within the dxValidator objects that are registered for the specified ViewModel. */ + export function validateModel(model: Object): ValidationGroupValidationResult; + /** Registers all the dxValidator objects by which the fields of the specified ViewModel are extended. */ + export function registerModelForValidation(model: Object): void; + } + export var hardwareBackButton: JQueryCallback; + /** Processes the hardware back button click. */ + export function processHardwareBackButton(): void; + /** Specifies whether or not the entire application/site supports right-to-left representation. */ + export var rtlEnabled: boolean; + /** Registers a new component in the DevExpress.ui namespace as a jQuery plugin, Angular directive and Knockout binding. */ + export function registerComponent(name: string, componentClass: Object): void; + /** Registers a new component in the specified namespace as a jQuery plugin, Angular directive and Knockout binding. */ + export function registerComponent(name: string, namespace: Object, componentClass: Object): void; + /** Requests that the browser call a specified function to update animation before the next repaint. */ + export function requestAnimationFrame(callback: Function): number; + /** Cancels an animation frame request scheduled with the requestAnimationFrame method. */ + export function cancelAnimationFrame(requestID: number): void; + /** Custom Knockout binding that links an HTML element with a specific action. */ + export class Action { } + /** Used to get URLs that vary in a locally running application and the application running on production. */ + export class EndpointSelector { + constructor(options: { + [key: string]: { + local?: string; + production?: string; + } + }); + /** Returns a local or a productional URL depending on how the application is currently running. */ + urlFor(key: string): string; + } + /** An object that serves as a namespace for the methods that are used to animate UI elements. */ + export module fx { + /** Defines animation options. */ + export interface AnimationOptions { + /** A function called after animation is completed. */ + complete?: (element: JQuery, config: AnimationOptions) => void; + /** A number specifying wait time before animation execution. */ + delay?: number; + /** A number specifying the time period to wait before the animation of the next stagger item starts. */ + staggerDelay?: number; + /** A number specifying the time in milliseconds spent on animation. */ + duration?: number; + /** A string specifying the type of an easing function used for animation. */ + easing?: string; + /** Specifies the initial animation state. */ + from?: any; + /** A function called before animation is started. */ + start?: (element: JQuery, config: AnimationOptions) => void; + /** Specifies a final animation state. */ + to?: any; + /** A string value specifying the animation type. */ + type?: string; + /** Specifies the animation direction for the "slideIn" and "slideOut" animation types. */ + direction?: string; + } + /** Animates the specified element. */ + export function animate(element: HTMLElement, config: AnimationOptions): Object; + /** Returns a value indicating whether the specified element is being animated. */ + export function isAnimating(element: HTMLElement): boolean; + /** Stops the animation. */ + export function stop(element: HTMLElement, jumpToEnd: boolean): void; + } + /** The manager that performs several specified animations at a time. */ + export class TransitionExecutor { + /** Deletes all the animations registered in the Transition Executor by using the enter(elements, animation) and leave(elements, animation) methods. */ + reset(): void; + /** Registers a set of elements that should be animated as "entering" using the specified animation configuration. */ + enter(elements: JQuery, animation: any): void; + /** Registers a set of elements that should be animated as "leaving" using the specified animation configuration. */ + leave(elements: JQuery, animation: any): void; + /** Starts all the animations registered using the enter(elements, animation) and leave(elements, animation) methods beforehand. */ + start(config: Object): JQueryPromise; + } + export class AnimationPresetCollection { + /** Resets all the changes made in the animation repository. */ + resetToDefaults(): void; + /** Deletes the specified animation or clears all the animation repository, if an animation name is not passed. */ + clear(name: string): void; + /** Adds the specified animation preset to the animation repository by the specified name. */ + registerPreset(name: string, config: any): void; + /** Applies the changes made in the animation repository. */ + applyChanges(): void; + /** Returns the configuration of the animation found in the animation repository by the specified name for the current device. */ + getPreset(name: string): void; + /** Registers predefined animations in the animation repository. */ + registerDefaultPresets(): void; + } + /** A repository of animations. */ + export var animationPresets: AnimationPresetCollection; + /** The device object defines the device on which the application is running. */ + export interface Device { + /** Indicates whether or not the device platform is Android. */ + android?: boolean; + /** Specifies the type of the device on which the application is running. */ + deviceType?: string; + /** Indicates whether or not the device platform is generic, which means that the application will look and behave according to a generic "light" or "dark" theme. */ + generic?: boolean; + /** Indicates whether or not the device platform is iOS. */ + ios?: boolean; + /** Indicates whether or not the device type is 'phone'. */ + phone?: boolean; + /** Specifies the platform of the device on which the application is running. */ + platform?: string; + /** Indicates whether or not the device type is 'tablet'. */ + tablet?: boolean; + /** Specifies an array with the major and minor versions of the device platform. */ + version?: Array; + /** Indicates whether or not the device platform is Windows8. */ + win8?: boolean; + /** Specifies a performance grade of the current device. */ + grade?: string; + } + export class Devices implements EventsMixin { + constructor(options: { window: Window }); + /** Overrides actual device information to force the application to operate as if it was running on the specified device. */ + current(deviceName: any): void; + /** Returns information about the current device. */ + current(): Device; + orientationChanged: JQueryCallback; + /** Returns the current device orientation. */ + orientation(): string; + /** Returns real information about the current device regardless of the value passed to the devices.current(deviceName) method. */ + real(): Device; + on(eventName: "orientationChanged", eventHandler: (e: { orientation: string }) => void): Devices; + on(eventName: string, eventHandler: Function): Devices; + on(events: { [eventName: string]: Function; }): Devices; + off(eventName: "orientationChanged"): Devices; + off(eventName: string): Devices; + off(eventName: "orientationChanged", eventHandler: (e: { orientation: string }) => void): Devices; + off(eventName: string, eventHandler: Function): Devices; + } + /** An object that serves as a namespace for the methods and events specifying information on the current device. */ + export var devices: Devices; + /** The position object specifies the widget positioning options. */ + export interface PositionOptions { + /** The target element position that the widget is positioned against. */ + at?: string; + /** The element within which the widget is positioned. */ + boundary?: Element; + /** A string value holding horizontal and vertical offset from the window's boundaries. */ + boundaryOffset?: string; + /** Specifies how to move the widget if it overflows the screen. */ + collision?: any; + /** The position of the widget to align against the target element. */ + my?: string; + /** The target element that the widget is positioned against. */ + of?: HTMLElement; + /** A string value holding horizontal and vertical offset in pixels, separated by a space (e.g., "5 -10"). */ + offset?: string; + } + export interface ComponentOptions { + /** A handler for the initialized event. */ + onInitialized?: Function; + /** A handler for the optionChanged event. */ + onOptionChanged?: Function; + /** A handler for the disposing event. */ + onDisposing?: Function; + } + /** A base class for all components and widgets. */ + export class Component { + constructor(options?: ComponentOptions) + /** Prevents the component from refreshing until the endUpdate method is called. */ + beginUpdate(): void; + /** Enables the component to refresh after the beginUpdate method call. */ + endUpdate(): void; + /** Returns an instance of this component class. */ + instance(): Component; + /** Sets one or more options of this component. */ + option(options: Object): void; + /** Returns the configuration options of this component. */ + option(): Object; + /** Gets the value of the specified configuration option of this component. */ + option(optionName: string): any; + /** Sets a value to the specified configuration option of this component. */ + option(optionName: string, optionValue: any): void; + } + export interface DOMComponentOptions extends ComponentOptions { + /** Specifies whether or not the current component supports a right-to-left representation. */ + rtlEnabled?: boolean; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies the width of the widget. */ + width?: any; + } + /** A base class for all components. */ + export class DOMComponent extends Component { + constructor(element: JQuery, options?: DOMComponentOptions); + constructor(element: HTMLElement, options?: DOMComponentOptions); + /** Returns the root HTML element of the widget. */ + element(): JQuery; + /** Specifies the device-dependent default configuration options for this component. */ + static defaultOptions(rule: { + device?: any; + options?: any; + }): void; + } + export module data { + export interface ODataError extends Error { + httpStatus?: number; + errorDetails?: any; + } + export interface StoreOptions { + inserted?: (values: Object, key: any) => void; + inserting?: (values: Object) => void; + loaded?: (result: Array) => void; + loading?: (loadOptions: LoadOptions) => void; + modified?: () => void; + modifying?: () => void; + removed?: (key: any) => void; + removing?: (key: any) => void; + updated?: (key: any, values: Object) => void; + updating?: (key: any, values: Object) => void; + /** A handler for the modified event. */ + onModified?: () => void; + /** A handler for the modifying event. */ + onModifying?: () => void; + /** A handler for the removed event. */ + onRemoved?: (key: any) => void; + /** A handler for the removing event. */ + onRemoving?: (key: any) => void; + /** A handler for the updated event. */ + onUpdated?: (key: any, values: Object) => void; + /** A handler for the updating event. */ + onUpdating?: (key: any, values: Object) => void; + /** A handler for the loaded event. */ + onLoaded?: (result: Array) => void; + /** A handler for the loading event. */ + onLoading?: (loadOptions: LoadOptions) => void; + /** A handler for the inserted event. */ + onInserted?: (values: Object, key: any) => void; + /** A handler for the inserting event. */ + onInserting?: (values: Object) => void; + /** Specifies the function called when the Store causes an error. */ + errorHandler?: (e: Error) => void; + /** Specifies the key properties within the data associated with the Store. */ + key?: any; + } + export interface LoadOptions { + filter?: Object; + sort?: Object; + select?: Object; + expand?: Object; + group?: Object; + skip?: number; + take?: number; + userData?: Object; + requireTotalCount?: boolean; + } + /** The base class for all Stores. */ + export class Store implements EventsMixin { + inserted: JQueryCallback; + inserting: JQueryCallback; + loaded: JQueryCallback; + loading: JQueryCallback; + modified: JQueryCallback; + modifying: JQueryCallback; + removed: JQueryCallback; + removing: JQueryCallback; + updated: JQueryCallback; + updating: JQueryCallback; + constructor(options?: StoreOptions); + /** Returns the data item specified by the key. */ + byKey(key: any): JQueryPromise; + /** Adds an item to the data associated with this Store. */ + insert(values: Object): JQueryPromise; + /** Returns the key expression specified via the key configuration option. */ + key(): any; + /** Returns the key of the Store item that matches the specified object. */ + keyOf(obj: Object): any; + /** Starts loading data. */ + load(obj?: LoadOptions): JQueryPromise; + /** Removes the data item specified by the key. */ + remove(key: any): JQueryPromise; + /** Obtains the total count of items that will be returned by the load() function. */ + totalCount(obj?: { + filter?: Object; + select?: Object; + group?: Object; + sort?: Object; + }): JQueryPromise; + /** Updates the data item specified by the key. */ + update(key: any, values: Object): JQueryPromise; + on(eventName: "removing", eventHandler: (key: any) => void): Store; + on(eventName: "removed", eventHandler: (key: any) => void): Store; + on(eventName: "updating", eventHandler: (key: any, values: Object) => void): Store; + on(eventName: "updated", eventHandler: (key: any, values: Object) => void): Store; + on(eventName: "inserting", eventHandler: (values: Object) => void): Store; + on(eventName: "inserted", eventHandler: (values: Object, key: any) => void): Store; + on(eventName: "modifying", eventHandler: () => void): Store; + on(eventName: "modified", eventHandler: () => void): Store; + on(eventName: "loading", eventHandler: (loadOptions: LoadOptions) => void): Store; + on(eventName: "loaded", eventHandler: (result: Array) => void): Store; + on(eventName: string, eventHandler: Function): Store; + on(events: { [eventName: string]: Function; }): Store; + off(eventName: "removing"): Store; + off(eventName: "removed"): Store; + off(eventName: "updating"): Store; + off(eventName: "updated"): Store; + off(eventName: "inserting"): Store; + off(eventName: "inserted"): Store; + off(eventName: "modifying"): Store; + off(eventName: "modified"): Store; + off(eventName: "loading"): Store; + off(eventName: "loaded"): Store; + off(eventName: string): Store; + off(eventName: "removing", eventHandler: (key: any) => void): Store; + off(eventName: "removed", eventHandler: (key: any) => void): Store; + off(eventName: "updating", eventHandler: (key: any, values: Object) => void): Store; + off(eventName: "updated", eventHandler: (key: any, values: Object) => void): Store; + off(eventName: "inserting", eventHandler: (values: Object) => void): Store; + off(eventName: "inserted", eventHandler: (values: Object, key: any) => void): Store; + off(eventName: "modifying", eventHandler: () => void): Store; + off(eventName: "modified", eventHandler: () => void): Store; + off(eventName: "loading", eventHandler: (loadOptions: LoadOptions) => void): Store; + off(eventName: "loaded", eventHandler: (result: Array) => void): Store; + off(eventName: string, eventHandler: Function): Store; + } + export interface ArrayStoreOptions extends StoreOptions { + /** Specifies the array associated with this Store. */ + data?: Array; + } + /** A Store accessing an in-memory array. */ + export class ArrayStore extends Store { + constructor(options?: ArrayStoreOptions); + /** Clears all data associated with the current ArrayStore. */ + clear(): void; + /** Creates the Query object for the underlying array. */ + createQuery(): Query; + } + interface Promise { + then(doneFn?: Function, failFn?: Function, progressFn?: Function): Promise; + } + export interface CustomStoreOptions extends StoreOptions { + /** The user implementation of the byKey(key, extraOptions) method. */ + byKey?: (key: any) => Promise; + /** The user implementation of the insert(values) method. */ + insert?: (values: Object) => Promise; + /** The user implementation of the load(options) method. */ + load?: (options?: LoadOptions) => Promise; + /** The user implementation of the remove(key) method. */ + remove?: (key: any) => Promise; + /** The user implementation of the totalCount(options) method. */ + totalCount?: () => Promise; + /** The user implementation of the update(key, values) method. */ + update?: (key: any, values: Object) => Promise; + } + /** A Store object that enables you to implement your own data access logic. */ + export class CustomStore extends Store { + constructor(options: CustomStoreOptions); + } + export interface DataSourceOptions { + /** Specifies data filtering conditions. */ + filter?: Object; + /** Specifies data grouping conditions. */ + group?: Object; + /** The item mapping function. */ + map?: (record: any) => any; + /** Specifies the maximum number of items the page can contain. */ + pageSize?: number; + /** Specifies whether a DataSource loads data by pages, or all items at once. */ + paginate?: boolean; + /** The data post processing function. */ + postProcess?: (data: any[]) => any[]; + /** Specifies a value by which the required items are searched. */ + searchExpr?: Object; + /** Specifies the comparison operation used to search for the required items. */ + searchOperation?: string; + /** Specifies the value to which the search expression is compared. */ + searchValue?: Object; + /** Specifies the initial select option value. */ + select?: Object; + /** An array of the strings that represent the names of the navigation properties to be loaded simultaneously with the OData store's entity. */ + expand?: Object; + /** Specifies whether or not the DataSource instance requests the total count of items available in the storage. */ + requireTotalCount?: boolean; + /** Specifies the initial sort option value. */ + sort?: Object; + /** Specifies the underlying Store instance used to access data. */ + store?: any; + /** A handler for the changed event. */ + onChanged?: () => void; + /** A handler for the loadingChanged event. */ + onLoadingChanged?: (isLoading: boolean) => void; + /** A handler for the loadError event. */ + onLoadError?: (e?: Error) => void; + } + /** An object that provides access to a data web service or local data storage for collection container widgets. */ + export class DataSource implements EventsMixin { + constructor(options?: DataSourceOptions); + changed: JQueryCallback; + loadError: JQueryCallback; + loadingChanged: JQueryCallback; + /** Disposes all resources associated with this DataSource. */ + dispose(): void; + /** Returns the current filter option value. */ + filter(): Object; + /** Sets the filter option value. */ + filter(filterExpr: Object): void; + /** Returns the current group option value. */ + group(): Object; + /** Sets the group option value. */ + group(groupExpr: Object): void; + /** Indicates whether or not the current page contains fewer items than the number of items specified by the pageSize configuration option. */ + isLastPage(): boolean; + /** Indicates whether or not at least one load() method execution has successfully finished. */ + isLoaded(): boolean; + /** Indicates whether or not the DataSource is currently being loaded. */ + isLoading(): boolean; + /** Returns the array of items currently operated by the DataSource. */ + items(): Array; + /** Returns the key expression. */ + key(): any; + /** Starts loading data. */ + load(): JQueryPromise>; + /** Returns an object that would be passed to the load() method of the underlying Store according to the current data shaping option values of the current DataSource instance. */ + loadOptions(): Object; + /** Returns the current pageSize option value. */ + pageSize(): number; + /** Sets the pageSize option value. */ + pageSize(value: number): void; + /** Specifies the index of the currently loaded page. */ + pageIndex(): number; + /** Specifies the index of the page to be loaded during the next load() method execution. */ + pageIndex(newIndex: number): void; + /** Returns the current paginate option value. */ + paginate(): boolean; + /** Sets the paginate option value. */ + paginate(value: boolean): void; + /** Returns the searchExpr option value. */ + searchExpr(): Object; + /** Sets the searchExpr option value. */ + searchExpr(expr: Object): void; + /** Returns the currently specified search operation. */ + searchOperation(): string; + /** Sets the current search operation. */ + searchOperation(op: string): void; + /** Returns the searchValue option value. */ + searchValue(): Object; + /** Sets the searchValue option value. */ + searchValue(value: Object): void; + /** Returns the current select option value. */ + select(): Object; + /** Sets the select option value. */ + select(expr: Object): void; + /** Returns the current requireTotalCount option value. */ + requireTotalCount(): boolean; + /** Sets the requireTotalCount option value. */ + requireTotalCount(value: boolean): void; + /** Returns the current sort option value. */ + sort(): Object; + /** Sets the sort option value. */ + sort(sortExpr: Object): void; + /** Returns the underlying Store instance. */ + store(): Store; + /** Returns the number of data items available in an underlying Store after the last load() operation without paging. */ + totalCount(): number; + on(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; + on(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; + on(eventName: "changed", eventHandler: () => void): DataSource; + on(eventName: string, eventHandler: Function): DataSource; + on(events: { [eventName: string]: Function; }): DataSource; + off(eventName: "loadingChanged"): DataSource; + off(eventName: "loadError"): DataSource; + off(eventName: "changed"): DataSource; + off(eventName: string): DataSource; + off(eventName: "loadingChanged", eventHandler: (isLoading: boolean) => void): DataSource; + off(eventName: "loadError", eventHandler: (e?: Error) => void): DataSource; + off(eventName: "changed", eventHandler: () => void): DataSource; + off(eventName: string, eventHandler: Function): DataSource; + } + /** An object used to work with primitive data types not supported by JavaScript when accessing an OData web service. */ + export class EdmLiteral { + /** Creates an EdmLiteral instance and assigns the specified value to it. */ + constructor(value: string); + /** Returns a string representation of the value associated with this EdmLiteral object. */ + valueOf(): string; + } + /** An object used to generate and hold the GUID. */ + export class Guid { + /** Creates a new Guid instance that holds the specified GUID. */ + constructor(value: string); + /** Creates a new Guid instance holding the generated GUID. */ + constructor(); + /** Returns a string representation of the Guid instance. */ + toString(): string; + /** Returns a string representation of the Guid instance. */ + valueOf(): string; + } + export interface LocalStoreOptions extends ArrayStoreOptions { + /** Specifies the time (in miliseconds) after the change operation, before the data is flushed. */ + flushInterval?: number; + /** Specifies whether the data is flushed immediatelly after each change operation, or after the delay specified via the flushInterval option. */ + immediate?: boolean; + /** The unique identifier used to distinguish the data within the HTML5 Web Storage. */ + name?: string; + } + /** A Store providing access to the HTML5 Web Storage. */ + export class LocalStore extends ArrayStore { + constructor(options?: LocalStoreOptions); + /** Removes all data associated with this Store. */ + clear(): void; + } + export interface ODataContextOptions extends ODataStoreOptions { + /** Specifies the list of entities to be accessed via the ODataContext. */ + entities?: Object; + /** Specifies the function called if the ODataContext causes an error. */ + errorHandler?: (e: Error) => void; + } + /** Provides access to the entire OData service. */ + export class ODataContext { + constructor(options?: ODataContextOptions); + /** Initiates the specified WebGet service operation that returns a value. For the information on service operations, refer to the OData documentation. */ + get(operationName: string, params: Object): JQueryPromise; + /** Initiates the specified WebGet service operation that returns nothing. For the information on service operations, refer to the OData documentation. */ + invoke(operationName: string, params: Object, httpMethod: Object): JQueryPromise; + /** Return a special proxy object to describe the entity link. */ + objectLink(entityAlias: string, key: any): Object; + } + export interface ODataStoreOptions extends StoreOptions { + /** A function used to customize a web request before it is sent. */ + beforeSend?: (request: { + url: string; + method: string; + timeout: number; + params: Object; + payload: Object; + headers: Object; + }) => void; + /** Specifies whether the ODataStore uses the JSONP approach to access non-CORS-compatible remote services. */ + jsonp?: boolean; + /** Specifies the type of the ODataStore key property. The following key types are supported out of the box: String, Int32, Int64, and Guid. */ + keyType?: any; + /** Specifies the URL of the data service being accessed via the current ODataContext. */ + url?: string; + /** Specifies the version of the OData protocol used to interact with the data service. */ + version?: number; + /** Specifies the value of the withCredentials field of the underlying jqXHR object. */ + withCredentials?: boolean; + } + /** A Store providing access to a separate OData web service entity. */ + export class ODataStore extends Store { + constructor(options?: ODataStoreOptions); + /** Creates the Query object for the OData endpoint. */ + createQuery(loadOptions: Object): Object; + /** Returns the data item specified by the key. */ + byKey(key: any, extraOptions?: { expand?: Object }): JQueryPromise; + } + /** An universal chainable data query interface object. */ + export interface Query { + /** Calculates a custom summary for the items in the current Query. */ + aggregate(step: (accumulator: any, value: any) => any): JQueryPromise; + /** Calculates a custom summary for the items in the current Query. */ + aggregate(seed: any, step: (accumulator: any, value: any) => any, finalize: (result: any) => any): JQueryPromise; + /** Calculates the average item value for the current Query. */ + avg(getter: Object): JQueryPromise; + /** Finds the item with the maximum getter value. */ + max(getter: Object): JQueryPromise; + /** Finds the item with the maximum value in the Query. */ + max(): JQueryPromise; + /** Finds the item with the minimum value in the Query. */ + min(): JQueryPromise; + /** Finds the item with the minimum getter value. */ + min(getter: Object): JQueryPromise; + /** Calculates the average item value for the current Query, if each Query item has a numeric type. */ + avg(): JQueryPromise; + /** Returns the total count of items in the current Query. */ + count(): JQueryPromise; + /** Executes the Query. */ + enumerate(): JQueryPromise; + /** Filters the current Query data. */ + filter(criteria: Array): Query; + /** Groups the current Query data. */ + groupBy(getter: Object): Query; + /** Applies the specified transformation to each item. */ + select(getter: Object): Query; + /** Limits the data item count. */ + slice(skip: number, take?: number): Query; + /** Sorts current Query data. */ + sortBy(getter: Object, desc: boolean): Query; + /** Sorts current Query data. */ + sortBy(getter: Object): Query; + /** Calculates the sum of item getter values in the current Query. */ + sum(getter: Object): JQueryPromise; + /** Calculates the sum of item values in the current Query. */ + sum(): JQueryPromise; + /** Adds one more sorting condition to the current Query. */ + thenBy(getter: Object): Query; + /** Adds one more sorting condition to the current Query. */ + thenBy(getter: Object, desc: boolean): Query; + /** Returns the array of current Query items. */ + toArray(): Array; + } + /** The global data layer error handler. */ + export var errorHandler: (e: Error) => void; + /** Encodes the specified string or array of bytes to base64 encoding. */ + export function base64_encode(input: any): string; + /** Creates a Query instance. */ + export function query(array: Array): Query; + /** Creates a Query instance for accessing the remote service specified by a URL. */ + export function query(url: string, queryOptions: Object): Query; + /** This section describes the utility objects provided by the DevExtreme data layer. */ + export var utils: { + /** Compiles a getter function from the getter expression. */ + compileGetter(expr: any): Function; + /** Compiles a setter function from the setter expression. */ + compileSetter(expr: any): Function; + odata: { + /** Holds key value converters for OData. */ + keyConverters: { + String(value: any): string; + Int32(value: any): number; + Int64(value: any): EdmLiteral; + Guid(value: any): Guid; + Boolean(value: any): boolean; + Single(value: any): EdmLiteral; + Decimal(value: any): EdmLiteral; + }; + } + } + } + /** An object that serves as a namespace for DevExtreme UI widgets as well as for methods implementing UI logic in DevExtreme sites/applications. */ + export module ui { + export interface WidgetOptions extends DOMComponentOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** A Boolean value specifying whether or not the widget can respond to user interaction. */ + disabled?: boolean; + /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ + hoverStateEnabled?: boolean; + /** Specifies whether or not the widget can be focused. */ + focusStateEnabled?: boolean; + /** Specifies a shortcut key that sets focus on the widget element. */ + accessKey?: string; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + /** Specifies the widget tab index. */ + tabIndex?: number; + /** Specifies the text of the hint displayed for the widget. */ + hint?: string; + } + /** The base class for widgets. */ + export class Widget extends DOMComponent { + constructor(options?: WidgetOptions); + /** Redraws the widget. */ + repaint(): void; + /** Sets focus on the widget. */ + focus(): void; + /** Registers a handler for pressing of the specified key. */ + registerKeyHandler(key: string, handler: Function): void; + } + export interface CollectionWidgetOptions extends WidgetOptions { + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + itemClickAction?: any; + itemHoldAction?: Function; + /** The time period in milliseconds before the onItemHold event is raised. */ + itemHoldTimeout?: number; + itemRender?: any; + itemRenderedAction?: Function; + /** An array of items displayed by the widget. */ + items?: Array; + /** + * A function performed when a widget item is selected. + * @deprecated onSelectionChanged.md + */ + itemSelectAction?: Function; + /** The template to be used for rendering items. */ + itemTemplate?: any; + loopItemFocus?: boolean; + /** The text or HTML markup displayed by the widget if the item collection is empty. */ + noDataText?: string; + onContentReady?: any; + contentReadyAction?: any; + /** A handler for the itemClick event. */ + onItemClick?: any; + /** A handler for the itemContextMenu event. */ + onItemContextMenu?: Function; + /** A handler for the itemHold event. */ + onItemHold?: Function; + /** A handler for the itemRendered event. */ + onItemRendered?: Function; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: Function; + /** The index of the currently selected widget item. */ + selectedIndex?: number; + /** The selected item object. */ + selectedItem?: Object; + /** An array of currently selected item objects. */ + selectedItems?: Array; + /** A handler for the itemDeleting event. */ + onItemDeleting?: Function; + /** A handler for the itemDeleted event. */ + onItemDeleted?: Function; + /** A handler for the itemReordered event. */ + onItemReordered?: Function; + } + /** The base class for widgets containing an item collection. */ + export class CollectionWidget extends Widget { + constructor(element: JQuery, options?: CollectionWidgetOptions); + constructor(element: HTMLElement, options?: CollectionWidgetOptions); + selectItem(itemElement: any): void; + unselectItem(itemElement: any): void; + deleteItem(itemElement: any): JQueryPromise; + isItemSelected(itemElement: any): boolean; + reorderItem(itemElement: any, toItemElement: any): JQueryPromise; + } + export interface DataExpressionMixinOptions { + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** Specifies the name of the data source item field whose value is displayed by the widget. */ + displayExpr?: any; + /** Specifies the name of a data source item field whose value is held in the value configuration option. */ + valueExpr?: any; + itemRender?: any; + /** An array of items displayed by the widget. */ + items?: Array; + /** The template to be used for rendering items. */ + itemTemplate?: any; + /** The currently selected value in the widget. */ + value?: Object; + } + export interface EditorOptions extends WidgetOptions { + /** The currently specified value. */ + value?: Object; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + valueChangeAction?: Function; + /** A Boolean value specifying whether or not the widget is read-only. */ + readOnly?: boolean; + /** Holds the object that defines the error that occurred during validation. */ + validationError?: Object; + /** Specifies whether the editor's value is valid. */ + isValid?: boolean; + /** Specifies how the message about the validation rules that are not satisfied by this editor's value is displayed. */ + validationMessageMode?: string; + } + /** A base class for editors. */ + export class Editor extends Widget { + /** Resets the editor's value to undefined. */ + reset(): void; + } + /** An object that serves as a namespace for methods displaying a message in an application/site. */ + export var dialog: { + /** Creates an alert dialog message containing a single "OK" button. */ + alert(message: string, title: string): JQueryPromise; + /** Creates a confirm dialog that contains "Yes" and "No" buttons. */ + confirm(message: string, title: string): JQueryPromise; + /** Creates a custom dialog using the options specified by the passed configuration object. */ + custom(options: { title?: string; message?: string; buttons?: Array; }): { + show(): JQueryPromise; + hide(): void; + hide(value: any): void; + }; + }; + /** Creates a toast message. */ + export function notify(message: any, type: string, displayTime: number): void; + /** Creates a toast message. */ + export function notify(options: Object): void; + /** An object that serves as a namespace for the methods that work with DevExtreme CSS Themes. */ + export var themes: { + /** Returns the name of the currently applied theme. */ + current(): string; + /** Changes the current theme to the specified one. */ + current(themeName: string): void; + }; + /** Sets a specified template engine. */ + export function setTemplateEngine(name: string): void; + /** Sets a custom template engine defined via custom compile and render functions. */ + export function setTemplateEngine(options: Object): void; + } + /** An object that serves as a namespace for utility methods that can be helpful when working with the DevExtreme framework and UI widgets. */ + export var utils: { + /** Sets parameters for the viewport meta tag. */ + initMobileViewport(options: { allowZoom?: boolean; allowPan?: boolean; allowSelection?: boolean }): void; + }; + /** An object that serves as a namespace for DevExtreme Data Visualization Widgets. */ + export module viz { + /** Applies a theme for the entire page with several DevExtreme visualization widgets. */ + export function currentTheme(theme: string): void; + /** Applies a new theme (with the color scheme defined separately) for the entire page with several DevExtreme visualization widgets. */ + export function currentTheme(platform: string, colorScheme: string): void; + /** Registers a new theme based on the existing one. */ + export function registerTheme(customTheme: Object, baseTheme: string): void; + /** Applies a predefined or registered custom palette to all visualization widgets at once. */ + export function currentPalette(paletteName: string): void; + /** Obtains the color sets of a predefined or registered palette. */ + export function getPalette(paletteName: string): Object; + /** Registers a new palette. */ + export function registerPalette(paletteName: string, palette: Object): void; + } +} +declare module DevExpress.ui { + export interface dxValidatorOptions extends DOMComponentOptions { + /** An array of validation rules to be checked for the editor with which the dxValidator object is associated. */ + validationRules?: Array; + /** Specifies the editor name to be used in the validation default messages. */ + name?: string; + /** An object that specifies what and when to validate and how to apply the validation result. */ + adapter?: Object; + /** Specifies the validation group the editor will be related to. */ + validationGroup?: string; + /** A handler for the validated event. */ + onValidated?: (params: validationEngine.ValidatorValidationResult) => void; + } + /** A widget that is used to validate the associated DevExtreme editors against the defined validation rules. */ + export class dxValidator extends DOMComponent implements validationEngine.IValidator { + constructor(element: JQuery, options?: dxValidatorOptions); + constructor(element: Element, options?: dxValidatorOptions); + /** Validates the value of the editor that is controlled by the current dxValidator object against the list of the specified validation rules. */ + validate(): validationEngine.ValidatorValidationResult; + /** Resets the value and validation result of the editor associated with the current dxValidator object. */ + reset(): void; + } + /** The widget that is used in the Knockout and Angular approaches to combine the editors to be validated. */ + export class dxValidationGroup extends DOMComponent { + constructor(element: JQuery); + constructor(element: Element); + /** Validates rules of the validators that belong to the current validation group. */ + validate(): validationEngine.ValidationGroupValidationResult; + /** Resets the value and validation result of the editors that are included to the current validation group. */ + reset(): void; + } + export interface dxValidationSummaryOptions extends CollectionWidgetOptions { + /** Specifies the validation group for which summary should be generated. */ + validationGroup?: string; + } + /** A widget for displaying the result of checking validation rules for editors. */ + export class dxValidationSummary extends CollectionWidget { + constructor(element: JQuery, options?: dxValidationSummaryOptions); + constructor(element: Element, options?: dxValidationSummaryOptions); + } + export interface dxResizableOptions extends DOMComponentOptions { + /** Specifies which borders of the widget element are used as a handle. */ + handles?: string; + /** Specifies the lower width boundary for resizing. */ + minWidth?: number; + /** Specifies the upper width boundary for resizing. */ + maxWidth?: number; + /** Specifies the lower height boundary for resizing. */ + minHeight?: number; + /** Specifies the upper height boundary for resizing. */ + maxHeight?: number; + /** A handler for the resizeStart event. */ + onResizeStart?: Function; + /** A handler for the resize event. */ + onResize?: Function; + /** A handler for the resizeEnd event. */ + onResizeEnd?: Function; + } + /** A widget that displays required content in a resizable element. */ + export class dxResizable extends DOMComponent { + constructor(element: JQuery, options?: dxResizableOptions); + constructor(element: Element, options?: dxResizableOptions); + } + export interface dxTooltipOptions extends dxPopoverOptions { + } + /** A tooltip widget. */ + export class dxTooltip extends dxPopover { + constructor(element: JQuery, options?: dxTooltipOptions); + constructor(element: Element, options?: dxTooltipOptions); + } + export interface dxDropDownListOptions extends dxDropDownEditorOptions, DataExpressionMixinOptions { + /** Returns the value currently displayed by the widget. */ + displayValue?: string; + /** The minimum number of characters that must be entered into the text box to begin a search. */ + minSearchLength?: number; + /** Specifies the name of a data source item field or an expression whose value is compared to the search criterion. */ + searchExpr?: Object; + /** Specifies the binary operation used to filter data. */ + searchMode?: string; + /** Specifies the time delay, in milliseconds, after the last character has been typed in, before a search is executed. */ + searchTimeout?: number; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + /** Specifies DOM event names that update a widget's value. */ + valueChangeEvent?: string; + /** Specifies whether or not the widget supports searching. */ + searchEnabled?: boolean; + /** + * Specifies whether or not the widget displays items by pages. + * @deprecated dataSource.paginate.md + */ + pagingEnabled?: boolean; + /** The text or HTML markup displayed by the widget if the item collection is empty. */ + noDataText?: string; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: Function; + /** A handler for the itemClick event. */ + onItemClick?: Function; + onContentReady?: Function; + } + /** A base class for drop-down list widgets. */ + export class dxDropDownList extends dxDropDownEditor { + constructor(element: JQuery, options?: dxDropDownListOptions); + constructor(element: Element, options?: dxDropDownListOptions); + } + export interface dxToolbarOptions extends CollectionWidgetOptions { + menuItemRender?: any; + /** The template used to render menu items. */ + menuItemTemplate?: any; + /** Informs the widget about its location in a view HTML markup. */ + renderAs?: string; + } + /** A toolbar widget. */ + export class dxToolbar extends CollectionWidget { + constructor(element: JQuery, options?: dxToolbarOptions); + constructor(element: Element, options?: dxToolbarOptions); + } + export interface dxToastOptions extends dxOverlayOptions { + animation?: fx.AnimationOptions; + /** The time span in milliseconds during which the dxToast widget is visible. */ + displayTime?: number; + height?: any; + /** The dxToast message text. */ + message?: string; + position?: PositionOptions; + shading?: boolean; + /** Specifies the dxToast widget type. */ + type?: string; + width?: any; + closeOnBackButton?: boolean; + } + /** The toast message widget. */ + export class dxToast extends dxOverlay { + constructor(element: JQuery, options?: dxToastOptions); + constructor(element: Element, options?: dxToastOptions); + } + export interface dxTextEditorOptions extends EditorOptions { + /** A handler for the change event. */ + onChange?: Function; + changeAction?: Function; + /** A handler for the copy event. */ + onCopy?: Function; + copyAction?: Function; + /** A handler for the cut event. */ + onCut?: Function; + cutAction?: Function; + /** A handler for the enterKey event. */ + onEnterKey?: Function; + enterKeyAction?: Function; + /** A handler for the focusIn event. */ + onFocusIn?: Function; + focusInAction?: Function; + /** A handler for the focusOut event. */ + onFocusOut?: Function; + focusOutAction?: Function; + /** A handler for the input event. */ + onInput?: Function; + inputAction?: Function; + /** A handler for the keyDown event. */ + onKeyDown?: Function; + keyDownAction?: Function; + /** A handler for the keyPress event. */ + onKeyPress?: Function; + keyPressAction?: Function; + /** A handler for the keyUp event. */ + onKeyUp?: Function; + keyUpAction?: Function; + /** A handler for the paste event. */ + onPaste?: Function; + pasteAction?: Function; + /** The text displayed by the widget when the widget value is empty. */ + placeholder?: string; + /** Specifies whether to display the Clear button in the widget. */ + showClearButton?: boolean; + /** Specifies the current value displayed by the widget. */ + value?: any; + /** Specifies DOM event names that update a widget's value. */ + valueChangeEvent?: string; + /** Specifies whether or not the widget checks the inner text for spelling mistakes. */ + spellcheck?: boolean; + /** Specifies HTML attributes applied to the inner input element of the widget. */ + attr?: Object; + /** The read-only option that holds the text displayed by the widget input element. */ + text?: string; + /** Specifies whether or not the widget supports the focused state and keyboard navigation. */ + focusStateEnabled?: boolean; + /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ + hoverStateEnabled?: boolean; + /** The editor mask, which specifies the format of the entered string. */ + mask?: string; + /** Specifies a mask placeholder character. */ + maskChar?: string; + /** Specifies custom mask rules. */ + maskRules?: Object; + /** A message displayed when the entered text does not match the specified pattern. */ + maskInvalidMessage?: string; + } + /** A base class for text editing widgets. */ + export class dxTextEditor extends Editor { + constructor(element: JQuery, options?: dxTextEditorOptions); + constructor(element: Element, options?: dxTextEditorOptions); + /** Removes focus from the input element. */ + blur(): void; + /** Sets focus to the input element representing the widget. */ + focus(): void; + } + export interface dxTextBoxOptions extends dxTextEditorOptions { + /** Specifies the maximum number of characters you can enter into the textbox. */ + maxLength?: any; + /** The "mode" attribute value of the actual HTML input element representing the text box. */ + mode?: string; + } + /** A single-line text box widget. */ + export class dxTextBox extends dxTextEditor { + constructor(element: JQuery, options?: dxTextBoxOptions); + constructor(element: Element, options?: dxTextBoxOptions); + } + export interface dxTextAreaOptions extends dxTextBoxOptions { + /** Specifies whether or not the widget checks the inner text for spelling mistakes. */ + spellcheck?: boolean; + } + /** A widget used to display and edit multi-line text. */ + export class dxTextArea extends dxTextBox { + constructor(element: JQuery, options?: dxTextAreaOptions); + constructor(element: Element, options?: dxTextAreaOptions); + } + export interface dxTabsOptions extends CollectionWidgetOptions { + /** Specifies whether the widget enables an end-user to select only a single item or multiple items. */ + selectionMode?: string; + /** Specifies whether or not an end-user can scroll tabs by swiping. */ + scrollByContent?: boolean; + /** Specifies whether or not an end-user can scroll tabs. */ + scrollingEnabled?: boolean; + /** A Boolean value that specifies the availability of navigation buttons. */ + showNavButtons?: boolean; + } + /** A tab strip used to switch between pages. */ + export class dxTabs extends CollectionWidget { + constructor(element: JQuery, options?: dxTabsOptions); + constructor(element: Element, options?: dxTabsOptions); + } + export interface dxTabPanelOptions extends dxMultiViewOptions { + /** A handler for the titleClick event. */ + onTitleClick?: any; + /** A handler for the titleHold event. */ + onTitleHold?: Function; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + titleTemplate?: any; + /** The template to be used for rendering an item title. */ + itemTitleTemplate?: any; + } + /** A widget used to display a view and to switch between several views by clicking the appropriate tabs. */ + export class dxTabPanel extends dxMultiView { + constructor(element: JQuery, options?: dxTabPanelOptions); + constructor(element: Element, options?: dxTabPanelOptions); + } + export interface dxSelectBoxOptions extends dxDropDownListOptions { + /** The template to be used for rendering the widget text field. */ + fieldTemplate?: any; + /** The text that is provided as a hint in the select box editor. */ + placeholder?: string; + /** Specifies whether or not the widget allows an end-user to enter a custom value. */ + fieldEditEnabled?: boolean; + } + /** A widget that allows you to select an item in a dropdown list. */ + export class dxSelectBox extends dxDropDownList { + constructor(element: JQuery, options?: dxSelectBoxOptions); + constructor(element: Element, options?: dxSelectBoxOptions); + } + export interface dxTagBoxOptions extends dxSelectBoxOptions { + /** Holds the list of selected values. */ + values?: Array; + } + /** A widget that allows you to select multiple items from a dropdown list. */ + export class dxTagBox extends dxSelectBox { + constructor(element: JQuery, options?: dxTagBoxOptions); + constructor(element: Element, options?: dxTagBoxOptions); + } + export interface dxScrollViewOptions extends dxScrollableOptions { + /** A handler for the pullDown event. */ + onPullDown?: Function; + pullDownAction?: Function; + /** Specifies the text shown in the pullDown panel when pulling the content down lowers the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while pulling the content down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the reachBottom event. */ + onReachBottom?: Function; + reachBottomAction?: Function; + /** Specifies the text shown in the pullDown panel displayed when content is scrolled to the bottom. */ + reachBottomText?: string; + /** Specifies the text shown in the pullDown panel displayed when the content is being refreshed. */ + refreshingText?: string; + /** Returns a value indicating if the scrollView content is larger then the widget container. */ + isFull(): boolean; + /** Locks the widget until the release(preventScrollBottom) method is called and executes the function passed to the onPullDown option and the handler assigned to the pullDown event. */ + refresh(): void; + /** Notifies the scroll view that data loading is finished. */ + release(preventScrollBottom: boolean): JQueryPromise; + /** Toggles the loading state of the widget. */ + toggleLoading(showOrHide: boolean): void; + } + /** A widget used to display scrollable content. */ + export class dxScrollView extends dxScrollable { + constructor(element: JQuery, options?: dxScrollViewOptions); + constructor(element: Element, options?: dxScrollViewOptions); + } + export interface dxScrollableLocation { + top?: number; + left?: number; + } + export interface dxScrollableOptions extends DOMComponentOptions { + /** A string value specifying the available scrolling directions. */ + direction?: string; + /** A Boolean value specifying whether or not the widget can respond to user interaction. */ + disabled?: boolean; + /** A handler for the scroll event. */ + onScroll?: Function; + scrollAction?: Function; + /** Specifies when the widget shows the scrollbar. */ + showScrollbar?: string; + /** A handler for the update event. */ + onUpdated?: Function; + updateAction?: Function; + /** Indicates whether to use native or simulated scrolling. */ + useNative?: boolean; + /** A Boolean value specifying whether to enable or disable the bounce-back effect. */ + bounceEnabled?: boolean; + /** A Boolean value specifying whether or not an end-user can scroll the widget content swiping it up or down. */ + scrollByContent?: boolean; + /** A Boolean value specifying whether or not an end-user can scroll the widget content using the scrollbar. */ + scrollByThumb?: boolean; + } + /** A widget used to display scrollable content. */ + export class dxScrollable extends DOMComponent { + constructor(element: JQuery, options?: dxScrollableOptions); + constructor(element: Element, options?: dxScrollableOptions); + /** Returns the height of the scrollable widget in pixels. */ + clientHeight(): number; + /** Returns the width of the scrollable widget in pixels. */ + clientWidth(): number; + /** Returns an HTML element of the widget. */ + content(): JQuery; + /** Scrolls the widget content by the specified number of pixels. */ + scrollBy(distance: number): void; + /** Scrolls widget content by the specified number of pixels in horizontal and vertical directions. */ + scrollBy(distanceObject: dxScrollableLocation): void; + /** Returns the height of the scrollable content in pixels. */ + scrollHeight(): number; + /** Returns the current scroll position against the leftmost position. */ + scrollLeft(): number; + /** Returns how far the scrollable content is scrolled from the top and from the left. */ + scrollOffset(): dxScrollableLocation; + /** Scrolls widget content to the specified position. */ + scrollTo(targetLocation: number): void; + /** Scrolls widget content to a specified position. */ + scrollTo(targetLocation: dxScrollableLocation): void; + /** Scrolls widget content to the specified element. */ + scrollToElement(element: Element): void; + /** Returns the current scroll position against the topmost position. */ + scrollTop(): number; + /** Returns the width of the scrollable content in pixels. */ + scrollWidth(): number; + /** Updates the dimensions of the scrollable contents. */ + update(): void; + } + export interface dxRadioGroupOptions extends CollectionWidgetOptions, DataExpressionMixinOptions { + /** Specifies the radio group layout. */ + layout?: string; + } + /** A widget that enables a user to select one item within a list of items represented by radio buttons. */ + export class dxRadioGroup extends CollectionWidget { + constructor(element: JQuery, options?: dxRadioGroupOptions); + constructor(element: Element, options?: dxRadioGroupOptions); + } + export interface dxPopupOptions extends dxOverlayOptions { + animation?: fx.AnimationOptions; + /** Specifies whether or not to allow a user to drag the popup window. */ + dragEnabled?: boolean; + /** A Boolean value specifying whether or not to display the widget in full-screen mode. */ + fullScreen?: boolean; + position?: PositionOptions; + /** A Boolean value specifying whether or not to display the title in the popup window. */ + showTitle?: boolean; + /** The title in the overlay window. */ + title?: string; + /** A template to be used for rendering the widget title. */ + titleTemplate?: any; + width?: any; + /** Specifies items displayed on the top or bottom toolbar of the popup window. */ + buttons?: Array; + /** Specifies whether or not the widget displays the Close button. */ + showCloseButton?: boolean; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + } + /** A widget that displays required content in a popup window. */ + export class dxPopup extends dxOverlay { + constructor(element: JQuery, options?: dxPopupOptions); + constructor(element: Element, options?: dxPopupOptions); + } + export interface dxPopoverOptions extends dxPopupOptions { + /** An object defining animation options of the widget. */ + animation?: fx.AnimationOptions; + /** Specifies the height of the widget. */ + height?: any; + /** An object defining widget positioning options. */ + position?: PositionOptions; + shading?: boolean; + /** A Boolean value specifying whether or not to display the title in the overlay window. */ + showTitle?: boolean; + /** The target element associated with a popover. */ + target?: any; + /** Specifies the width of the widget. */ + width?: any; + } + /** A widget that displays the required content in a popup window. */ + export class dxPopover extends dxPopup { + constructor(element: JQuery, options?: dxPopoverOptions); + constructor(element: Element, options?: dxPopoverOptions); + /** Displays the widget for the specified target element. */ + show(target?: any): JQueryPromise; + } + export interface dxOverlayOptions extends WidgetOptions { + /** An object that defines the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** A Boolean value specifying whether or not the widget is closed if a user presses the Back hardware button. */ + closeOnBackButton?: boolean; + /** A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlapping window. */ + closeOnOutsideClick?: any; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; + /** Specifies whether or not an end-user can drag the widget. */ + dragEnabled?: boolean; + /** Specifies whether or not an end user can resize the widget. */ + resizeEnabled?: boolean; + /** The height of the widget in pixels. */ + height?: any; + /** A handler for the hidden event. */ + onHidden?: Function; + hiddenAction?: Function; + /** A handler for the hiding event. */ + onHiding?: Function; + hidingAction?: Function; + /** An object defining widget positioning options. */ + position?: PositionOptions; + /** A Boolean value specifying whether or not the main screen is inactive while the widget is active. */ + shading?: boolean; + /** Specifies the shading color. */ + shadingColor?: string; + /** A handler for the showing event. */ + onShowing?: Function; + showingAction?: Function; + /** A handler for the shown event. */ + onShown?: Function; + shownAction?: Function; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + /** The widget width in pixels. */ + width?: any; + } + /** A widget displaying the required content in an overlay window. */ + export class dxOverlay extends Widget { + constructor(element: JQuery, options?: dxOverlayOptions); + constructor(element: Element, options?: dxOverlayOptions); + /** An HTML element of the widget. */ + content(): JQuery; + /** Hides the widget. */ + hide(): JQueryPromise; + /** Recalculates the overlay's size and position. */ + repaint(): void; + /** Shows the widget. */ + show(): JQueryPromise; + /** Toggles the visibility of the widget. */ + toggle(showing: boolean): JQueryPromise; + /** A static method that specifies the base z-index for all overlay widgets. */ + static baseZIndex(zIndex: number): void; + } + export interface dxNumberBoxOptions extends dxTextEditorOptions { + /** The maximum value accepted by the number box. */ + max?: number; + /** The minimum value accepted by the number box. */ + min?: number; + /** Specifies whether or not to show spin buttons. */ + showSpinButtons?: boolean; + useTouchSpinButtons?: boolean; + /** Specifies by which value the widget value changes when a spin button is clicked. */ + step?: number; + /** The current number box value. */ + value?: number; + } + /** A textbox widget that enables a user to enter numeric values. */ + export class dxNumberBox extends dxTextEditor { + constructor(element: JQuery, options?: dxNumberBoxOptions); + constructor(element: Element, options?: dxNumberBoxOptions); + } + export interface dxNavBarOptions extends dxTabsOptions { + scrollingEnabled?: boolean; + } + /** A widget that contains items used to navigate through application views. */ + export class dxNavBar extends dxTabs { + constructor(element: JQuery, options?: dxNavBarOptions); + constructor(element: Element, options?: dxNavBarOptions); + } + export interface dxMultiViewOptions extends CollectionWidgetOptions { + /** Specifies whether or not to animate the displayed item change. */ + animationEnabled?: boolean; + /** A Boolean value specifying whether or not to scroll back to the first item after the last item is swiped. */ + loop?: boolean; + /** The index of the currently displayed item. */ + selectedIndex?: number; + /** A Boolean value specifying whether or not to allow users to change the selected index by swiping. */ + swipeEnabled?: boolean; + } + /** A widget used to display a view and to switch between several views. */ + export class dxMultiView extends CollectionWidget { + constructor(element: JQuery, options?: dxMultiViewOptions); + constructor(element: Element, options?: dxMultiViewOptions); + } + export interface dxMapOptions extends WidgetOptions { + /** Specifies whether or not the widget automatically adjusts center and zoom option values when adding a new marker or route. */ + autoAdjust?: boolean; + bounds?: { + northEast?: { + lat?: number; + lng?: number; + }; + southWest?: { + lat?: number; + lng?: number; + }; + /** An object, a string, or an array specifying the location displayed at the center of the widget. */ + center?: { + /** The latitude location displayed in the center of the widget. */ + lat?: number; + /** The longitude location displayed in the center of the widget. */ + lng?: number; + }; + /** A handler for the click event. */ + onClick?: any; + clickAction?: any; + /** Specifies whether or not map widget controls are available. */ + controls?: boolean; + /** Specifies the height of the widget. */ + height?: number; + /** A key used to authenticate the application within the required map provider. */ + key?: { + /** A key used to authenticate the application within the "Bing" map provider. */ + bing?: string; + /** A key used to authenticate the application within the "Google" map provider. */ + google?: string; + /** A key used to authenticate the application within the "Google Static" map provider. */ + googleStatic?: string; + } + /** A handler for the markerAdded event. */ + onMarkerAdded?: Function; + markerAddedAction?: Function; + /** A URL pointing to the custom icon to be used for map markers. */ + markerIconSrc?: string; + /** A handler for the markerRemoved event. */ + onMarkerRemoved?: Function; + markerRemovedAction?: Function; + /** An array of markers displayed on a map. */ + markers?: Array; + /** The name of the current map data provider. */ + provider?: string; + /** A handler for the ready event. */ + onReady?: Function; + readyAction?: Function; + /** A handler for the routeAdded event. */ + onRouteAdded?: Function; + routeAddedAction?: Function; + /** A handler for the routeRemoved event. */ + onRouteRemoved?: Function; + routeRemovedAction?: Function; + /** An array of routes shown on the map. */ + routes?: Array; + /** The type of a map to display. */ + type?: string; + /** Specifies the width of the widget. */ + width?: number; + /** The zoom level of the map. */ + zoom?: number; + /** Adds a marker to the map. */ + addMarker(markerOptions: Object): JQueryPromise; + /** Adds a route to the map. */ + addRoute(options: Object): JQueryPromise; + /** Removes a marker from the map. */ + removeMarker(marker: Object): JQueryPromise; + /** Removes a route from the map. */ + removeRoute(route: any): JQueryPromise; + }; + } + /** An interactive map widget. */ + export class dxMap extends Widget { + constructor(element: JQuery, options?: dxMapOptions); + constructor(element: Element, options?: dxMapOptions); + } + export interface dxLookupOptions extends dxDropDownListOptions { + /** An object defining widget animation options. */ + animation?: fx.AnimationOptions; + /** The text displayed on the Cancel button. */ + cancelButtonText?: string; + /** The text displayed on the Clear button. */ + clearButtonText?: string; + /** Specifies whether or not the widget cleans the search box when the popup window is displayed. */ + cleanSearchOnOpening?: boolean; + /** A Boolean value specifying whether or not the widget is closed if a user clicks outside of the overlaying window. */ + closeOnOutsideClick?: any; + /** The text displayed on the Apply button. */ + applyButtonText?: string; + /** A Boolean value specifying whether or not to display the lookup in full-screen mode. */ + fullScreen?: boolean; + focusStateEnabled?: boolean; + /** A Boolean value specifying whether or not to group widget items. */ + grouped?: boolean; + groupRender?: any; + /** The name of the template used to display a group header. */ + groupTemplate?: any; + /** The text displayed on the button used to load the next page from the data source. */ + nextButtonText?: string; + /** A handler for the pageLoading event. */ + onPageLoading?: Function; + /** Specifies whether the next page is loaded when a user scrolls the widget to the bottom or when the "next" button is clicked. */ + pageLoadMode?: string; + pageLoadingAction?: Function; + /** Specifies the text shown in the pullDown panel, which is displayed when the widget is scrolled to the bottom. */ + pageLoadingText?: string; + /** The text displayed by the widget when nothing is selected. */ + placeholder?: string; + /** The height of the widget popup element. */ + popupHeight?: any; + /** The width of the widget popup element. */ + popupWidth?: any; + /** An object defining widget positioning options. */ + position?: PositionOptions; + /** Specifies the text displayed in the pullDown panel when the widget is pulled below the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while the list is being pulled down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the pullRefresh event. */ + onPullRefresh?: Function; + pullRefreshAction?: Function; + /** A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture. */ + pullRefreshEnabled?: boolean; + /** Specifies the text displayed in the pullDown panel while the widget is being refreshed. */ + refreshingText?: string; + /** A handler for the scroll event. */ + onScroll?: Function; + scrollAction?: Function; + /** A Boolean value specifying whether or not the search bar is visible. */ + searchEnabled?: boolean; + /** The text that is provided as a hint in the lookup's search bar. */ + searchPlaceholder?: string; + /** A Boolean value specifying whether or not the main screen is inactive while the lookup is active. */ + shading?: boolean; + /** Specifies whether to display the Cancel button in the lookup window. */ + showCancelButton?: boolean; + /** + * A Boolean value specifying whether the widget loads the next page automatically when you reach the bottom of the list or when a button is clicked. + * @deprecated pageLoadMode.md + */ + showNextButton?: boolean; + /** The title of the lookup window. */ + title?: string; + /** A template to be used for rendering the widget title. */ + titleTemplate?: any; + /** Specifies whether or not the widget uses native scrolling. */ + useNativeScrolling?: boolean; + /** Specifies whether or not to show lookup contents in a dxPopover widget. */ + usePopover?: boolean; + /** A handler for the valueChanged event. */ + onValueChanged?: Function; + contentReadyAction?: Function; + titleRender?: any; + /** A handler for the titleRendered event. */ + onTitleRendered?: Function; + /** A Boolean value specifying whether or not to display the title in the popup window. */ + showPopupTitle?: boolean; + } + /** A widget that allows a user to select predefined values from a lookup window. */ + export class dxLookup extends dxDropDownList { + constructor(element: JQuery, options?: dxLookupOptions); + constructor(element: Element, options?: dxLookupOptions); + /** This section lists the data source fields that are used in a default template for lookup drop-down items. */ + } + export interface dxLoadPanelOptions extends dxOverlayOptions { + /** An object defining the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** The delay in milliseconds after which the load panel is displayed. */ + delay?: number; + /** The height of the widget. */ + height?: number; + /** A URL pointing to an image to be used as a load indicator. */ + indicatorSrc?: string; + /** The text displayed in the load panel. */ + message?: string; + /** A Boolean value specifying whether or not to show a load indicator. */ + showIndicator?: boolean; + /** A Boolean value specifying whether or not to show the pane behind the load indicator. */ + showPane?: boolean; + /** The width of the widget. */ + width?: number; + } + /** A widget used to indicate whether or not an element is loading. */ + export class dxLoadPanel extends dxOverlay { + constructor(element: JQuery, options?: dxLoadPanelOptions); + constructor(element: Element, options?: dxLoadPanelOptions); + } + export interface dxLoadIndicatorOptions extends WidgetOptions { + /** Specifies the path to an image used as the indicator. */ + indicatorSrc?: string; + } + /** The widget used to indicate the loading process. */ + export class dxLoadIndicator extends Widget { + constructor(element: JQuery, options?: dxLoadIndicatorOptions); + constructor(element: Element, options?: dxLoadIndicatorOptions); + } + export interface dxListOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not to display a grouped list. */ + grouped?: boolean; + groupRender?: any; + /** The template to be used for rendering item groups. */ + groupTemplate?: any; + onItemDeleting?: Function; + /** A handler for the itemDeleted event. */ + onItemDeleted?: Function; + /** A handler for the groupRendered event. */ + onGroupRendered?: Function; + itemDeleteAction?: Function; + /** A handler for the itemReordered event. */ + onItemReordered?: Function; + itemReorderAction?: Function; + /** A handler for the itemClick event. */ + onItemClick?: any; + /** A handler for the itemSwipe event. */ + onItemSwipe?: Function; + itemSwipeAction?: Function; + /** The text displayed on the button used to load the next page from the data source. */ + nextButtonText?: string; + /** A handler for the pageLoading event. */ + onPageLoading?: Function; + pageLoadingAction?: Function; + /** Specifies the text shown in the pullDown panel, which is displayed when the list is scrolled to the bottom. */ + pageLoadingText?: string; + /** Specifies the text displayed in the pullDown panel when the list is pulled below the refresh threshold. */ + pulledDownText?: string; + /** Specifies the text shown in the pullDown panel while the list is being pulled down to the refresh threshold. */ + pullingDownText?: string; + /** A handler for the pullRefresh event. */ + onPullRefresh?: Function; + pullRefreshAction?: Function; + /** A Boolean value specifying whether or not the widget supports the "pull down to refresh" gesture. */ + pullRefreshEnabled?: boolean; + /** Specifies the text displayed in the pullDown panel while the list is being refreshed. */ + refreshingText?: string; + /** A handler for the scroll event. */ + onScroll?: Function; + scrollAction?: Function; + /** A Boolean value specifying whether to enable or disable list scrolling. */ + scrollingEnabled?: boolean; + /** Specifies when the widget shows the scrollbar. */ + showScrollbar?: string; + /** Specifies whether or not the widget uses native scrolling. */ + useNativeScrolling?: boolean; + /** A Boolean value specifying whether to enable or disable the bounce-back effect. */ + bounceEnabled?: boolean; + /** A Boolean value specifying if the list is scrolled by content. */ + scrollByContent?: boolean; + /** A Boolean value specifying if the list is scrolled using the scrollbar. */ + scrollByThumb?: boolean; + itemUnselectAction?: Function; + onItemContextMenu?: Function; + onItemHold?: Function; + /** Specifies whether or not an end-user can collapse groups. */ + collapsibleGroups?: boolean; + /** Specifies whether the next page is loaded when a user scrolls the widget to the bottom or when the "next" button is clicked. */ + pageLoadMode?: string; + /** Specifies whether or not to display controls used to select list items. */ + showSelectionControls?: boolean; + /** Specifies whether the list supports single item selection or multi-selection. */ + selectionMode?: string; + selectAllText?: string; + /** Specifies the array of items for a context menu called for a list item. */ + menuItems?: Array; + /** Specifies whether an item context menu is shown when a user holds or swipes an item. */ + menuMode?: string; + /** Specifies whether or not an end user can delete list items. */ + allowItemDeleting?: boolean; + /** Specifies the way a user can delete items from the list. */ + itemDeleteMode?: string; + /** Specifies whether or not an end user can reorder list items. */ + allowItemReordering?: boolean; + /** Specifies whether or not to show the loading panel when the DataSource bound to the widget is loading data. */ + indicateLoading?: boolean; + } + /** A list widget. */ + export class dxList extends CollectionWidget { + constructor(element: JQuery, options?: dxListOptions); + constructor(element: Element, options?: dxListOptions); + /** Returns the height of the widget in pixels. */ + clientHeight(): number; + /** Removes the specified item from the list. */ + deleteItem(itemIndex: any): JQueryPromise; + /** Removes the specified item from the list. */ + deleteItem(itemElement: Element): JQueryPromise; + /** Returns a Boolean value that indicates whether or not the specified item is selected. */ + isItemSelected(itemIndex: any): boolean; + /** Returns a Boolean value that indicates whether or not the specified item is selected. */ + isItemSelected(itemElement: Element): boolean; + /** Reloads list data. */ + reload(): void; + /** Moves the specified item to the specified position in the list. */ + reorderItem(itemElement: Element, toItemElement: Element): JQueryPromise; + /** Moves the specified item to the specified position in the list. */ + reorderItem(itemIndex: any, toItemIndex: any): JQueryPromise; + /** Scrolls the list content by the specified number of pixels. */ + scrollBy(distance: number): void; + /** Returns the height of the list content in pixels. */ + scrollHeight(): number; + /** Scrolls list content to the specified position. */ + scrollTo(location: number): void; + /** Scrolls the list to the specified item. */ + scrollToItem(itemElement: Element): void; + /** Scrolls the list to the specified item. */ + scrollToItem(itemIndex: any): void; + /** Returns how far the list content is scrolled from the top. */ + scrollTop(): number; + /** Selects the specified item from the list. */ + selectItem(itemElement: Element): void; + /** Selects the specified item from the list. */ + selectItem(itemIndex: any): void; + /** Deselects the specified item from the list. */ + unselectItem(itemElement: Element): void; + /** Unselects the specified item from the list. */ + unselectItem(itemIndex: any): void; + /** Updates the widget scrollbar according to widget content size. */ + updateDimensions(): JQueryPromise; + /** Expands the specified group. */ + expandGroup(groupIndex: number): JQueryPromise; + /** Collapses the specified group. */ + collapseGroup(groupIndex: number): JQueryPromise; + } + export interface dxGalleryOptions extends CollectionWidgetOptions { + /** The time, in milliseconds, spent on slide animation. */ + animationDuration?: number; + /** Specifies whether or not to animate the displayed item change. */ + animationEnabled?: boolean; + /** A Boolean value specifying whether or not to allow users to switch between items by clicking an indicator. */ + indicatorEnabled?: boolean; + /** A Boolean value specifying whether or not to scroll back to the first item after the last item is swiped. */ + loop?: boolean; + /** The index of the currently active gallery item. */ + selectedIndex?: number; + /** A Boolean value specifying whether or not to display an indicator that points to the selected gallery item. */ + showIndicator?: boolean; + /** A Boolean value that specifies the availability of the "Forward" and "Back" navigation buttons. */ + showNavButtons?: boolean; + /** The time interval in milliseconds, after which the gallery switches to the next item. */ + slideshowDelay?: number; + /** A Boolean value specifying whether or not to allow users to switch between items by swiping. */ + swipeEnabled?: boolean; + /** Specifies whether or not to display parts of previous and next images along the sides of the current image. */ + wrapAround?: boolean; + /** Specifies if the widget stretches images to fit the total gallery width. */ + stretchImages?: boolean; + /** Specifies the width of an area used to display a single image. */ + initialItemWidth?: number; + } + /** An image gallery widget. */ + export class dxGallery extends CollectionWidget { + constructor(element: JQuery, options?: dxGalleryOptions); + constructor(element: Element, options?: dxGalleryOptions); + /** Shows the specified gallery item. */ + goToItem(itemIndex: number, animation: boolean): JQueryPromise; + /** Shows the next gallery item. */ + nextItem(animation: boolean): JQueryPromise; + /** Shows the previous gallery item. */ + prevItem(animation: boolean): JQueryPromise; + } + export interface dxDropDownEditorOptions extends dxTextBoxOptions { + /** Specifies the current value displayed by the widget. */ + value?: Object; + /** A handler for the closed event. */ + onClosed?: Function; + /** A handler for the opened event. */ + onOpened?: Function; + /** Specifies whether or not the drop-down editor is displayed. */ + opened?: boolean; + closeAction?: Function; + openAction?: Function; + shownAction?: Function; + hiddenAction?: Function; + /** Specifies whether or not the widget allows an end-user to enter a custom value. */ + fieldEditEnabled?: boolean; + editEnabled?: boolean; + /** Specifies the way an end-user applies the selected value. */ + applyValueMode?: string; + } + /** A drop-down editor widget. */ + export class dxDropDownEditor extends dxTextBox { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + /** Closes the drop-down editor. */ + close(): void; + /** Opens the drop-down editor. */ + open(): void; + /** Resets the widget's value to null. */ + reset(): void; + /** Returns an <input> element of the widget. */ + field(): JQuery; + /** Returns an HTML element of the popup window content. */ + content(): JQuery; + } + export interface dxDateBoxOptions extends dxTextEditorOptions { + /** A format used to display date/time information. */ + format?: string; + /** A Globalize format string specifying the date display format. */ + formatString?: string; + /** The last date that can be selected within the widget. */ + max?: any; + /** The minimum date that can be selected within the widget. */ + min?: any; + /** The text displayed by the widget when the widget value is not yet specified. This text is also used as a title of the date picker. */ + placeholder?: string; + /** + * Specifies whether or not a user can pick out a date using the drop-down calendar. + * @deprecated Use 'pickerType' option instead. + */ + useCalendar?: boolean; + /** An object or a value, specifying the date and time currently selected using the date box. */ + value?: any; + /** + * Specifies whether or not the widget uses the native HTML input element. + * @deprecated Use 'pickerType' option instead. + */ + useNative?: boolean; + /** Specifies the interval between neighboring values in the popup list in minutes. */ + interval?: number; + /** Specifies the maximum zoom level of a calendar, which is used to pick the date. */ + maxZoomLevel?: string; + /** Specifies the minimal zoom level of a calendar, which is used to pick the date. */ + minZoomLevel?: string; + /** Specifies the type of date/time picker. */ + pickerType?: string; + } + /** A date box widget. */ + export class dxDateBox extends dxDropDownEditor { + constructor(element: JQuery, options?: dxDateBoxOptions); + constructor(element: Element, options?: dxDateBoxOptions); + } + export interface dxCheckBoxOptions extends EditorOptions { + /** Specifies the widget state. */ + value?: boolean; + /** Specifies the text displayed by the check box. */ + text?: string; + } + /** A check box widget. */ + export class dxCheckBox extends Editor { + constructor(element: JQuery, options?: dxCheckBoxOptions); + constructor(element: Element, options?: dxCheckBoxOptions); + } + export interface dxCalendarOptions extends EditorOptions { + /** Specifies a date displayed on the current calendar page. */ + currentDate?: Date; + /** Specifies the first day of a week. */ + firstDayOfWeek?: number; + /** The latest date the widget allows to select. */ + max?: Date; + /** The earliest date the widget allows to select. */ + min?: Date; + /** Specifies whether or not the widget displays a button that selects the current date. */ + showTodayButton?: boolean; + /** Specifies the current calendar zoom level. */ + zoomLevel?: string; + /** Specifies the maximum zoom level of the calendar. */ + maxZoomLevel?: string; + /** Specifies the minimum zoom level of the calendar. */ + minZoomLevel?: string; + /** The template to be used for rendering calendar cells. */ + cellTemplate?: any; + } + /** A calendar widget. */ + export class dxCalendar extends Editor { + constructor(element: JQuery, options?: dxCalendarOptions); + constructor(element: Element, options?: dxCalendarOptions); + } + export interface dxButtonOptions extends WidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** A handler for the click event. */ + onClick?: any; + clickAction?: any; + /** Specifies the icon to be displayed on the button. */ + icon?: string; + iconSrc?: string; + /** A template to be used for rendering the dxButton widget. */ + template?: any; + /** The text displayed on the button. */ + text?: string; + /** Specifies the button type. */ + type?: string; + /** Specifies the name of the validation group to be accessed in the click event handler. */ + validationGroup?: string; + } + /** A button widget. */ + export class dxButton extends Widget { + constructor(element: JQuery, options?: dxButtonOptions); + constructor(element: Element, options?: dxButtonOptions); + } + export interface dxBoxOptions extends CollectionWidget { + /** Specifies how widget items are aligned along the main direction. */ + align?: string; + /** Specifies the direction of item positioning in the widget. */ + direction?: string; + /** Specifies how widget items are aligned cross-wise. */ + crossAlign?: string; + } + /** A container widget used to arrange inner elements. */ + export class dxBox extends CollectionWidget { + constructor(element: JQuery, options?: dxBoxOptions); + constructor(element: Element, options?: dxBoxOptions); + } + export interface dxResponsiveBoxOptions extends CollectionWidgetOptions { + /** Specifies the collection of rows for the grid used to position layout elements. */ + rows?: Array; + /** Specifies the collection of columns for the grid used to position layout elements. */ + cols?: Array; + /** Specifies the function returning the screen factor depending on the screen width. */ + screenByWidth?: (width: number) => string; + /** Specifies the screen factor with which all elements are located in a single column. */ + singleColumnScreen?: string; + } + /** A widget used to build an adaptive markup that is dependent on screen resolution. */ + export class dxResponsiveBox extends CollectionWidget { + constructor(element: JQuery, options?: dxBoxOptions); + constructor(element: Element, options?: dxBoxOptions); + } + export interface dxAutocompleteOptions extends dxDropDownListOptions { + accessKey?: string; + activeStateEnabled?: boolean; + attr?: any; + dataSource?: any; + disabled?: boolean; + displayValue?: string; + fieldEditEnabled?: boolean; + focusStateEnabled?: boolean; + height?: string | number | (() => string | number); + hint?: string; + hoverStateEnabled?: boolean; + isValid?: boolean; + items?: any[]; + /** + * The template to be used for rendering items. + * Defaults Value: "item" + */ + itemTemplate?: string | Node | JQuery | (() => string | Node | JQuery); + /** Specifies the maximum count of items displayed by the widget. */ + maxItemCount?: number; + + maxLength?: string | number; + /** The minimum number of characters that must be entered into the text box to begin a search. */ + minSearchLength?: number; + + + mode?: string; // "text" | "email" | "search" | "tel" | "url" | "password" + onChange?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onClosed?: (e: { component: any; element: JQuery; model: any }) => void; + onContentReady?: (e: { component: any; element: JQuery; model: any }) => void; + onCopy?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onCut?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onDisposing?: (e: { component: any; element: JQuery; model: any }) => void; + onEnterKey?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onFocusIn?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onFocusOut?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onInitialized?: (e: { component: any; element: JQuery }) => void; + onInput?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onItemClick?: (e: { component: any; element: JQuery; model: any; itemElement: HTMLElement }) => void; + onKeyDown?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onKeyPress?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onKeyUp?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onOpened?: (e: { component: any; element: JQuery; model: any }) => void; + onOptionChanged?: (e: { component: any; element: JQuery; model: any; value: any }) => void; + onPaste?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onSelectionChanged?: (e: { component: any; element: JQuery; model: any; selectedItem: any }) => void; + onValueChanged?: (e: { component: any; element: JQuery; model: any; value: any; previousValue: any; itemData: any; jQueryEvent: JQueryEventObject }) => void; + opened?: boolean; + placeholder?: string; + readOnly?: boolean; + rtlEnabled?: boolean; + searchExpr?: string; + searchMode?: string; // "contains" | "startswith" + searchTimeout?: number; + /** Gets the currently selected item. */ + selectedItem?: any; + showClearButton?: boolean; + spellcheck?: boolean; + tabIndex?: number; + text?: string; + validationError?: any; + validationMessageMode?: string; // "auto" | "always" + /** Specifies the current value displayed by the widget. */ + value?: string; + /** + * CAn be any DOM event names separated by spaces. + */ + valueChangeEvent?: string; + valueExpr?: string | Function; + visible?: boolean; + width?: string | number | (() => string | number); + } + /** A textbox widget that supports autocompletion. */ + export class dxAutocomplete extends dxDropDownList { + constructor(element: JQuery, options?: dxAutocompleteOptions); + constructor(element: Element, options?: dxAutocompleteOptions); + /** Opens the drop-down editor. */ + open(): void; + /** Closes the drop-down editor. */ + close(): void; + } + export interface dxAccordionOptions extends CollectionWidgetOptions { + /** A number specifying the time in milliseconds spent on the animation of the expanding or collapsing of a panel. */ + animationDuration?: number; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies whether all items can be collapsed or whether at least one item must always be expanded. */ + collapsible?: boolean; + /** Specifies whether the widget can expand several items or only a single item at once. */ + multiple?: boolean; + /** The template to be used for rendering dxAccordion items. */ + itemTemplate?: any; + /** A handler for the itemTitleClick event. */ + onItemTitleClick?: any; + /** A handler for the itemTitleHold event. */ + onItemTitleHold?: Function; + /** The template to be used for rendering an item title. */ + itemTitleTemplate?: any; + /** The index number of the currently selected item. */ + selectedIndex?: number; + } + /** A widget that displays data source items on collapsible panels. */ + export class dxAccordion extends CollectionWidget { + constructor(element: JQuery, options?: dxAccordionOptions); + constructor(element: Element, options?: dxAccordionOptions); + /** Collapses the specified item. */ + collapseItem(index: number): JQueryPromise; + /** Expands the specified item. */ + expandItem(index: number): JQueryPromise; + } + export interface dxFileUploaderOptions extends EditorOptions { + /** A read-only option that holds a File instance representing the selected file. */ + value?: File; + /** Holds the File instances representing files selected in the widget. */ + values?: Array; + buttonText?: string; + /** The text displayed on the button that opens the file browser. */ + selectButtonText?: string; + /** The text displayed on the button that starts uploading. */ + uploadButtonText?: string; + /** Specifies the text displayed on the area to which an end-user can drop a file. */ + labelText?: string; + /** Specifies the value passed to the name attribute of the underlying input element. */ + name?: string; + /** Specifies whether the widget enables an end-user to select a single file or multiple files. */ + multiple?: boolean; + /** Specifies a file type or several types accepted by the widget. */ + accept?: string; + /** Specifies a target Url for the upload request. */ + uploadUrl?: string; + /** Specifies if an end user can remove a file from the selection and interrupt uploading. */ + allowCanceling?: boolean; + /** Specifies whether or not the widget displays the list of selected files. */ + showFileList?: boolean; + /** Gets the current progress in percentages. */ + progress?: number; + /** The message displayed by the widget when it is ready to upload the specified files. */ + readyToUploadMessage?: string; + /** The message displayed by the widget when uploading is finished. */ + uploadedMessage?: string; + /** The message displayed by the widget on uploading failure. */ + uploadFailedMessage?: string; + /** Specifies how the widget uploads files. */ + uploadMode?: string; + } + /** A widget used to select and upload a file or multiple files. */ + export class dxFileUploader extends Editor { + constructor(element: JQuery, options?: dxFileUploaderOptions); + constructor(element: Element, options?: dxFileUploaderOptions); + } + export interface dxTrackBarOptions extends EditorOptions { + /** The minimum value the widget can accept. */ + min?: number; + /** The maximum value the widget can accept. */ + max?: number; + /** The current widget value. */ + value?: number; + } + /** A base class for track bar widgets. */ + export class dxTrackBar extends Editor { + constructor(element: JQuery, options?: dxTrackBarOptions); + constructor(element: Element, options?: dxTrackBarOptions); + } + export interface dxProgressBarOptions extends dxTrackBarOptions { + /** Specifies a format for the progress status. */ + statusFormat?: any; + /** Specifies whether or not the widget displays a progress status. */ + showStatus?: boolean; + /** A handler for the complete event. */ + onComplete?: Function; + } + /** A widget used to indicate progress. */ + export class dxProgressBar extends dxTrackBar { + constructor(element: JQuery, options?: dxProgressBarOptions); + constructor(element: Element, options?: dxProgressBarOptions); + } + export interface dxSliderOptions extends dxTrackBarOptions { + /** The slider step size. */ + step?: number; + /** The current slider value. */ + value?: number; + /** Specifies whether or not to highlight a range selected within the widget. */ + showRange?: boolean; + /** Specifies the size of a step by which a slider handle is moved when a user uses the Page up or Page down keyboard shortcuts. */ + keyStep?: number; + /** Specifies options for the slider tooltip. */ + tooltip?: { + /** Specifies whether or not the tooltip is enabled. */ + enabled?: boolean; + /** Specifies format for the tooltip. */ + format?: any; + /** Specifies whether the tooltip is located over or under the slider. */ + position?: string; + /** Specifies whether the widget always shows a tooltip or only when a pointer is over the slider. */ + showMode?: string; + }; + /** Specifies options for labels displayed at the min and max values. */ + label?: { + /** Specifies whether or not slider labels are visible. */ + visible?: boolean; + /** Specifies whether labels are located over or under the scale. */ + position?: string; + /** Specifies a format for labels. */ + format?: any; + }; + } + /** A widget that allows a user to select a numeric value within a given range. */ + export class dxSlider extends dxTrackBar { + constructor(element: JQuery, options?: dxSliderOptions); + constructor(element: Element, options?: dxSliderOptions); + } + export interface dxRangeSliderOptions extends dxSliderOptions { + /** The left edge of the interval currently selected using the range slider. */ + start?: number; + /** The right edge of the interval currently selected using the range slider. */ + end?: number; + } + /** A widget that enables a user to select a range of numeric values. */ + export class dxRangeSlider extends dxSlider { + constructor(element: JQuery, options?: dxRangeSliderOptions); + constructor(element: Element, options?: dxRangeSliderOptions); + } +} +interface JQuery { + dxProgressBar(): JQuery; + dxProgressBar(options: "instance"): DevExpress.ui.dxProgressBar; + dxProgressBar(options: string): any; + dxProgressBar(options: string, ...params: any[]): any; + dxProgressBar(options: DevExpress.ui.dxProgressBarOptions): JQuery; + dxSlider(): JQuery; + dxSlider(options: "instance"): DevExpress.ui.dxSlider; + dxSlider(options: string): any; + dxSlider(options: string, ...params: any[]): any; + dxSlider(options: DevExpress.ui.dxSliderOptions): JQuery; + dxRangeSlider(): JQuery; + dxRangeSlider(options: "instance"): DevExpress.ui.dxRangeSlider; + dxRangeSlider(options: string): any; + dxRangeSlider(options: string, ...params: any[]): any; + dxRangeSlider(options: DevExpress.ui.dxRangeSliderOptions): JQuery; + dxFileUploader(): JQuery; + dxFileUploader(options: "instance"): DevExpress.ui.dxFileUploader; + dxFileUploader(options: string): any; + dxFileUploader(options: string, ...params: any[]): any; + dxFileUploader(options: DevExpress.ui.dxFileUploaderOptions): JQuery; + dxValidator(): JQuery; + dxValidator(options: "instance"): DevExpress.ui.dxValidator; + dxValidator(options: string): any; + dxValidator(options: string, ...params: any[]): any; + dxValidationGroup(): JQuery; + dxValidationGroup(options: "instance"): DevExpress.ui.dxValidationGroup; + dxValidationGroup(options: string): any; + dxValidationGroup(options: string, ...params: any[]): any; + dxValidationSummary(): JQuery; + dxValidationSummary(options: "instance"): DevExpress.ui.dxValidationSummary; + dxValidationSummary(options: string): any; + dxValidationSummary(options: string, ...params: any[]): any; + dxTooltip(): JQuery; + dxTooltip(options: "instance"): DevExpress.ui.dxTooltip; + dxTooltip(options: string): any; + dxTooltip(options: string, ...params: any[]): any; + dxTooltip(options: DevExpress.ui.dxTooltipOptions): JQuery; + dxResizable(): JQuery; + dxResizable(options: "instance"): DevExpress.ui.dxResizable; + dxResizable(options: string): any; + dxResizable(options: string, ...params: any[]): any; + dxResizable(options: DevExpress.ui.dxResizableOptions): JQuery; + dxDropDownList(): JQuery; + dxDropDownList(options: "instance"): DevExpress.ui.dxDropDownList; + dxDropDownList(options: string): any; + dxDropDownList(options: string, ...params: any[]): any; + dxDropDownList(options: DevExpress.ui.dxDropDownListOptions): JQuery; + dxToolbar(): JQuery; + dxToolbar(options: "instance"): DevExpress.ui.dxToolbar; + dxToolbar(options: string): any; + dxToolbar(options: string, ...params: any[]): any; + dxToolbar(options: DevExpress.ui.dxToolbarOptions): JQuery; + dxToast(): JQuery; + dxToast(options: "instance"): DevExpress.ui.dxToast; + dxToast(options: string): any; + dxToast(options: string, ...params: any[]): any; + dxToast(options: DevExpress.ui.dxToastOptions): JQuery; + dxTextEditor(): JQuery; + dxTextEditor(options: "instance"): DevExpress.ui.dxTextEditor; + dxTextEditor(options: string): any; + dxTextEditor(options: string, ...params: any[]): any; + dxTextEditor(options: DevExpress.ui.dxTextEditorOptions): JQuery; + dxTextBox(): JQuery; + dxTextBox(options: "instance"): DevExpress.ui.dxTextBox; + dxTextBox(options: string): any; + dxTextBox(options: string, ...params: any[]): any; + dxTextBox(options: DevExpress.ui.dxTextBoxOptions): JQuery; + dxTextArea(): JQuery; + dxTextArea(options: "instance"): DevExpress.ui.dxTextArea; + dxTextArea(options: string): any; + dxTextArea(options: string, ...params: any[]): any; + dxTextArea(options: DevExpress.ui.dxTextAreaOptions): JQuery; + dxTabs(): JQuery; + dxTabs(options: "instance"): DevExpress.ui.dxTabs; + dxTabs(options: string): any; + dxTabs(options: string, ...params: any[]): any; + dxTabs(options: DevExpress.ui.dxTabsOptions): JQuery; + dxTabPanel(): JQuery; + dxTabPanel(options: "instance"): DevExpress.ui.dxTabPanel; + dxTabPanel(options: string): any; + dxTabPanel(options: string, ...params: any[]): any; + dxTabPanel(options: DevExpress.ui.dxTabPanelOptions): JQuery; + dxSelectBox(): JQuery; + dxSelectBox(options: "instance"): DevExpress.ui.dxSelectBox; + dxSelectBox(options: string): any; + dxSelectBox(options: string, ...params: any[]): any; + dxSelectBox(options: DevExpress.ui.dxSelectBoxOptions): JQuery; + dxScrollView(): JQuery; + dxScrollView(options: "instance"): DevExpress.ui.dxScrollView; + dxScrollView(options: string): any; + dxScrollView(options: string, ...params: any[]): any; + dxScrollView(options: DevExpress.ui.dxScrollViewOptions): JQuery; + dxScrollable(): JQuery; + dxScrollable(options: "instance"): DevExpress.ui.dxScrollable; + dxScrollable(options: string): any; + dxScrollable(options: string, ...params: any[]): any; + dxScrollable(options: DevExpress.ui.dxScrollableOptions): JQuery; + dxRadioGroup(): JQuery; + dxRadioGroup(options: "instance"): DevExpress.ui.dxRadioGroup; + dxRadioGroup(options: string): any; + dxRadioGroup(options: string, ...params: any[]): any; + dxRadioGroup(options: DevExpress.ui.dxRadioGroupOptions): JQuery; + dxPopup(): JQuery; + dxPopup(options: "instance"): DevExpress.ui.dxPopup; + dxPopup(options: string): any; + dxPopup(options: string, ...params: any[]): any; + dxPopup(options: DevExpress.ui.dxPopupOptions): JQuery; + dxPopover(): JQuery; + dxPopover(options: "instance"): DevExpress.ui.dxPopover; + dxPopover(options: string): any; + dxPopover(options: string, ...params: any[]): any; + dxPopover(options: DevExpress.ui.dxPopoverOptions): JQuery; + dxOverlay(): JQuery; + dxOverlay(options: "instance"): DevExpress.ui.dxOverlay; + dxOverlay(options: string): any; + dxOverlay(options: string, ...params: any[]): any; + dxOverlay(options: DevExpress.ui.dxOverlayOptions): JQuery; + dxNumberBox(): JQuery; + dxNumberBox(options: "instance"): DevExpress.ui.dxNumberBox; + dxNumberBox(options: string): any; + dxNumberBox(options: string, ...params: any[]): any; + dxNumberBox(options: DevExpress.ui.dxNumberBoxOptions): JQuery; + dxNavBar(): JQuery; + dxNavBar(options: "instance"): DevExpress.ui.dxNavBar; + dxNavBar(options: string): any; + dxNavBar(options: string, ...params: any[]): any; + dxNavBar(options: DevExpress.ui.dxNavBarOptions): JQuery; + dxMultiView(): JQuery; + dxMultiView(options: "instance"): DevExpress.ui.dxMultiView; + dxMultiView(options: string): any; + dxMultiView(options: string, ...params: any[]): any; + dxMultiView(options: DevExpress.ui.dxMultiViewOptions): JQuery; + dxMap(): JQuery; + dxMap(options: "instance"): DevExpress.ui.dxMap; + dxMap(options: string): any; + dxMap(options: string, ...params: any[]): any; + dxMap(options: DevExpress.ui.dxMapOptions): JQuery; + dxLookup(): JQuery; + dxLookup(options: "instance"): DevExpress.ui.dxLookup; + dxLookup(options: string): any; + dxLookup(options: string, ...params: any[]): any; + dxLookup(options: DevExpress.ui.dxLookupOptions): JQuery; + dxLoadPanel(): JQuery; + dxLoadPanel(options: "instance"): DevExpress.ui.dxLoadPanel; + dxLoadPanel(options: string): any; + dxLoadPanel(options: string, ...params: any[]): any; + dxLoadPanel(options: DevExpress.ui.dxLoadPanelOptions): JQuery; + dxLoadIndicator(): JQuery; + dxLoadIndicator(options: "instance"): DevExpress.ui.dxLoadIndicator; + dxLoadIndicator(options: string): any; + dxLoadIndicator(options: string, ...params: any[]): any; + dxLoadIndicator(options: DevExpress.ui.dxLoadIndicatorOptions): JQuery; + dxList(): JQuery; + dxList(options: "instance"): DevExpress.ui.dxList; + dxList(options: string): any; + dxList(options: string, ...params: any[]): any; + dxList(options: DevExpress.ui.dxListOptions): JQuery; + dxGallery(): JQuery; + dxGallery(options: "instance"): DevExpress.ui.dxGallery; + dxGallery(options: string): any; + dxGallery(options: string, ...params: any[]): any; + dxGallery(options: DevExpress.ui.dxGalleryOptions): JQuery; + dxDropDownEditor(): JQuery; + dxDropDownEditor(options: "instance"): DevExpress.ui.dxDropDownEditor; + dxDropDownEditor(options: string): any; + dxDropDownEditor(options: string, ...params: any[]): any; + dxDropDownEditor(options: DevExpress.ui.dxDropDownEditorOptions): JQuery; + dxDateBox(): JQuery; + dxDateBox(options: "instance"): DevExpress.ui.dxDateBox; + dxDateBox(options: string): any; + dxDateBox(options: string, ...params: any[]): any; + dxDateBox(options: DevExpress.ui.dxDateBoxOptions): JQuery; + dxCheckBox(): JQuery; + dxCheckBox(options: "instance"): DevExpress.ui.dxCheckBox; + dxCheckBox(options: string): any; + dxCheckBox(options: string, ...params: any[]): any; + dxCheckBox(options: DevExpress.ui.dxCheckBoxOptions): JQuery; + dxBox(): JQuery; + dxBox(options: "instance"): DevExpress.ui.dxBox; + dxBox(options: string): any; + dxBox(options: string, ...params: any[]): any; + dxBox(options: DevExpress.ui.dxBoxOptions): JQuery; + dxButton(): JQuery; + dxButton(options: "instance"): DevExpress.ui.dxButton; + dxButton(options: string): any; + dxButton(options: string, ...params: any[]): any; + dxButton(options: DevExpress.ui.dxButtonOptions): JQuery; + dxCalendar(): JQuery; + dxCalendar(options: "instance"): DevExpress.ui.dxCalendar; + dxCalendar(options: string): any; + dxCalendar(options: string, ...params: any[]): any; + dxCalendar(options: DevExpress.ui.dxCalendarOptions): JQuery; + dxAccordion(): JQuery; + dxAccordion(options: "instance"): DevExpress.ui.dxAccordion; + dxAccordion(options: string): any; + dxAccordion(options: string, ...params: any[]): any; + dxAccordion(options: DevExpress.ui.dxAccordionOptions): JQuery; + dxAutocomplete(): JQuery; + dxAutocomplete(options: "instance"): DevExpress.ui.dxAutocomplete; + dxAutocomplete(options: string): any; + dxAutocomplete(options: string, ...params: any[]): any; + dxAutocomplete(options: DevExpress.ui.dxAutocompleteOptions): JQuery; +} + +declare module DevExpress.ui { + export interface dxTileViewOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** Specifies the height of the base tile view item. */ + baseItemHeight?: number; + /** Specifies the width of the base tile view item. */ + baseItemWidth?: number; + /** Specifies the height of the widget. */ + height?: any; + /** Specifies the distance in pixels between adjacent tiles. */ + itemMargin?: number; + /** A Boolean value specifying whether or not to display a scrollbar. */ + showScrollbar?: boolean; + } + /** A widget displaying several blocks of data as tiles. */ + export class dxTileView extends CollectionWidget { + constructor(element: JQuery, options?: dxTileViewOptions); + constructor(element: Element, options?: dxTileViewOptions); + /** Returns the current scroll position of the widget content. */ + scrollPosition(): number; + } + export interface dxSwitchOptions extends EditorOptions { + /** Text displayed when the widget is in a disabled state. */ + offText?: string; + /** Text displayed when the widget is in an enabled state. */ + onText?: string; + /** A Boolean value specifying whether the current switch state is "On" or "Off". */ + value?: boolean; + } + /** A switch widget. */ + export class dxSwitch extends Editor { + constructor(element: JQuery, options?: dxSwitchOptions); + constructor(element: Element, options?: dxSwitchOptions); + } + export interface dxSlideOutViewOptions extends WidgetOptions { + /** Specifies whether or not the menu panel is visible. */ + menuVisible?: boolean; + /** Specifies whether or not the menu is shown when a user swipes the widget content. */ + swipeEnabled?: boolean; + /** A template to be used for rendering menu panel content. */ + menuTemplate?: any; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + } + /** The widget that allows you to slide-out the current view to reveal a custom menu. */ + export class dxSlideOutView extends Widget { + constructor(element: JQuery, options?: dxSlideOutViewOptions); + constructor(element: Element, options?: dxSlideOutViewOptions); + /** Returns an HTML element of the widget menu block. */ + menuContent(): JQuery; + /** Returns an HTML element of the widget content block. */ + content(): JQuery; + /** Displays the widget's menu block. */ + showMenu(): JQueryPromise; + /** Hides the widget's menu block. */ + hideMenu(): JQueryPromise; + /** Toggles the visibility of the widget's menu block. */ + toggleMenuVisibility(): JQueryPromise; + } + export interface dxSlideOutOptions extends CollectionWidgetOptions { + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** A Boolean value specifying whether or not to display a grouped menu. */ + menuGrouped?: boolean; + menuGroupRender?: any; + /** The name of the template used to display a group header. */ + menuGroupTemplate?: any; + menuItemRender?: any; + /** The template used to render menu items. */ + menuItemTemplate?: any; + /** A handler for the menuGroupRendered event. */ + onMenuGroupRendered?: Function; + /** A handler for the menuItemRendered event. */ + onMenuItemRendered?: Function; + /** Specifies whether or not the slide-out menu is displayed. */ + menuVisible?: boolean; + /** Indicates whether the menu can be shown/hidden by swiping the widget's main panel. */ + swipeEnabled?: boolean; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + } + /** The widget that allows you to slide-out the current view to reveal an item list. */ + export class dxSlideOut extends CollectionWidget { + constructor(element: JQuery, options?: dxSlideOutOptions); + constructor(element: Element, options?: dxSlideOutOptions); + /** Hides the widget's slide-out menu. */ + hideMenu(): JQueryPromise; + /** Displays the widget's slide-out menu. */ + showMenu(): JQueryPromise; + /** Toggles the visibility of the widget's slide-out menu. */ + toggleMenuVisibility(showing: boolean): JQueryPromise; + } + export interface dxPivotOptions extends CollectionWidgetOptions { + /** The index of the currently active pivot item. */ + selectedIndex?: number; + /** A Boolean value specifying whether or not to allow users to switch between items by swiping. */ + swipeEnabled?: boolean; + /** A template to be used for rendering widget content. */ + contentTemplate?: any; + } + /** A widget that is similar to a traditional tab control, but optimized for the phone with simplified end-user interaction. */ + export class dxPivot extends CollectionWidget { + constructor(element: JQuery, options?: dxPivotOptions); + constructor(element: Element, options?: dxPivotOptions); + } + export interface dxPanoramaOptions extends CollectionWidgetOptions { + /** An object exposing options for setting a background image for the panorama. */ + backgroundImage?: { + /** Specifies the height of the panorama's background image. */ + height?: number; + /** Specifies the URL of the image that is used as the panorama's background image. */ + url?: string; + /** Specifies the width of the panorama's background image. */ + width?: number; + }; + /** The index of the currently active panorama item. */ + selectedIndex?: number; + /** Specifies the widget content title. */ + title?: string; + } + /** A widget displaying the required content in a long horizontal canvas that extends beyond the frames of the screen. */ + export class dxPanorama extends CollectionWidget { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + } + export interface dxDropDownMenuOptions extends WidgetOptions { + /** A handler for the buttonClick event. */ + onButtonClick?: any; + buttonClickAction?: any; + /** The name of the icon to be displayed by the DropDownMenu button. */ + buttonIcon?: string; + buttonIconSrc?: string; + /** The text displayed in the DropDownMenu button. */ + buttonText?: string; + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** A handler for the itemClick event. */ + onItemClick?: any; + itemClickAction?: any; + itemRender?: any; + /** An array of items displayed by the widget. */ + items?: Array; + /** The template to be used for rendering items. */ + itemTemplate?: any; + /** Specifies whether or not to show the drop down menu within a dxPopover widget. */ + usePopover?: boolean; + /** The width of the menu popup in pixels. */ + popupWidth?: any; + /** The height of the menu popup in pixels. */ + popupHeight?: any; + /** Specifies whether or not the drop-down menu is displayed. */ + opened?: boolean; + /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ + hoverStateEnabled?: boolean; + } + /** A drop-down menu widget. */ + export class dxDropDownMenu extends Widget { + constructor(element: JQuery, options?: dxDropDownEditorOptions); + constructor(element: Element, options?: dxDropDownEditorOptions); + /** This section lists the data source fields that are used in a default template for drop-down menu items. */ + /** Opens the drop-down menu. */ + open(): void; + /** Closes the drop-down menu. */ + close(): void; + } + export interface dxActionSheetOptions extends CollectionWidgetOptions { + cancelClickAction?: any; + /** A handler for the cancelClick event. */ + onCancelClick?: any; + /** The text displayed in the button that closes the action sheet. */ + cancelText?: string; + /** Specifies whether or not to display the Cancel button in action sheet. */ + showCancelButton?: boolean; + /** A Boolean value specifying whether or not the title of the action sheet is visible. */ + showTitle?: boolean; + /** Specifies the element the action sheet popover points at. */ + target?: any; + /** The title of the action sheet. */ + title?: string; + /** Specifies whether or not to show the action sheet within a dxPopover widget. */ + usePopover?: boolean; + /** A Boolean value specifying whether or not the dxActionSheet widget is visible. */ + visible?: boolean; + } + /** A widget consisting of a set of choices related to a certain task. */ + export class dxActionSheet extends CollectionWidget { + constructor(element: JQuery, options?: dxActionSheetOptions); + constructor(element: Element, options?: dxActionSheetOptions); + /** Hides the widget. */ + hide(): JQueryPromise; + /** Shows the widget. */ + show(): JQueryPromise; + /** Shows or hides the widget depending on the Boolean value passed as the parameter. */ + toggle(showing: boolean): JQueryPromise; + } +} +interface JQuery { + dxTileView(): JQuery; + dxTileView(options: "instance"): DevExpress.ui.dxTileView; + dxTileView(options: string): any; + dxTileView(options: string, ...params: any[]): any; + dxTileView(options: DevExpress.ui.dxTileViewOptions): JQuery; + dxSwitch(): JQuery; + dxSwitch(options: "instance"): DevExpress.ui.dxSwitch; + dxSwitch(options: string): any; + dxSwitch(options: string, ...params: any[]): any; + dxSwitch(options: DevExpress.ui.dxSwitchOptions): JQuery; + dxSlideOut(): JQuery; + dxSlideOut(options: "instance"): DevExpress.ui.dxSlideOut; + dxSlideOut(options: string): any; + dxSlideOut(options: string, ...params: any[]): any; + dxSlideOut(options: DevExpress.ui.dxSlideOutOptions): JQuery; + dxPivot(): JQuery; + dxPivot(options: "instance"): DevExpress.ui.dxPivot; + dxPivot(options: string): any; + dxPivot(options: string, ...params: any[]): any; + dxPivot(options: DevExpress.ui.dxPivotOptions): JQuery; + dxPanorama(): JQuery; + dxPanorama(options: "instance"): DevExpress.ui.dxPanorama; + dxPanorama(options: string): any; + dxPanorama(options: string, ...params: any[]): any; + dxPanorama(options: DevExpress.ui.dxPanoramaOptions): JQuery; + dxActionSheet(): JQuery; + dxActionSheet(options: "instance"): DevExpress.ui.dxActionSheet; + dxActionSheet(options: string): any; + dxActionSheet(options: string, ...params: any[]): any; + dxActionSheet(options: DevExpress.ui.dxActionSheetOptions): JQuery; + dxDropDownMenu(): JQuery; + dxDropDownMenu(options: "instance"): DevExpress.ui.dxDropDownMenu; + dxDropDownMenu(options: string): any; + dxDropDownMenu(options: string, ...params: any[]): any; + dxDropDownMenu(options: DevExpress.ui.dxDropDownMenuOptions): JQuery; +} +declare module DevExpress.data { + export interface XmlaStoreOptions { + /** The HTTP address to an XMLA OLAP server. */ + url?: string; + /** The name of the database associated with the Store. */ + catalog?: string; + /** The cube name. */ + cube?: string; + beforeSend?: (request: Object) => void; + } + /** A Store that provides access to an OLAP cube using the XMLA standard. */ + export class XmlaStore { + constructor(options: XmlaStoreOptions); + } + export interface PivotGridField { + index?: number; + /** A boolean value specifying whether or not the field is visible in the pivot grid and the Field Chooser. */ + visible?: boolean; + /** Name of the data source field containing data for the pivot grid field. */ + dataField?: string; + /** A caption that will be displayed in the pivot grid's field chooser to identify the field. */ + caption?: string; + /** Specifies a type of field values. */ + dataType?: string; + /** Specifies how the values of the current field are combined into groups. Cannot be used for the XmlaStore store type. */ + groupInterval?: any; + /** Specifies how to aggregate field data. Cannot be used for th XmlaStore store type. */ + summaryType?: string; + /** Allows you to use a custom aggregate function to calculate the summary values. Cannot be used for the XmlaStore store type. */ + calculateCustomSummary?: (options: { + summaryProcess?: string; + value?: any; + totalValue?: any; + }) => void; + /** Specifies the function that determines how to split data from the data source into ranges for header items. Cannot be used for the XmlaStore store type. */ + selector?: (data: Object) => any; + /** Type of the area where the field is located. */ + area?: string; + /** Index among the other fields displayed within the same area. */ + areaIndex?: number; + /** The name of the folder in which the field is located. */ + displayFolder?: string; + /** The name of the group to which the field belongs. */ + groupName?: string; + /** The index of the field within a group. */ + groupIndex?: number; + /** Specifies the initial sort order of field values. */ + sortOrder?: string; + /** Specifies how field data should be sorted. Can be used for the XmlaStore store type only. */ + sortBy?: string; + /** Specifies the data field against which the header items of this field should be sorted. */ + sortBySummaryField?: string; + /** The array of field names that specify a path to column/row whose summary field is used for sorting of this field's header items. */ + sortBySummaryPath?: Array; + /** The filter values for the current field. */ + filterValues?: Array; + /** The filter type for the current field. */ + filterType?: string; + /** Indicates whether all header items of the field's header level are expanded. */ + expanded?: boolean; + /** Specifies whether the field should be treated as a Data Field. */ + isMeasure?: boolean; + /** Specifies a display format for field values. */ + format?: string; + /** Specifies a callback function that returns the text to be displayed in the cells of a field. */ + customizeText?: (cellInfo: { value: any; valueText: string }) => string; + /** Specifies a precision for formatted field values. */ + precision?: number; + /** Specifies how to sort the header items. */ + sortingMethod?: (a: Object, b: Object) => number; + /** Allows an end-user to change sorting options. */ + allowSorting?: boolean; + /** Allows an end-user to sort columns by summary values. */ + allowSortingBySummary?: boolean; + /** Allows an end-user to change filtering options. */ + allowFiltering?: boolean; + /** Allows an end-user to expand/collapse all header items within a header level. */ + allowExpandAll?: boolean; + /** Specifies the absolute width of the field in the pivot grid. */ + width?: number; + } + export interface PivotGridDataSourceOptions { + /** Specifies the underlying Store instance used to access data. */ + store?: any; + /** Indicates whether or not the automatic field generation from data in the Store is enabled. */ + retrieveFields?: boolean; + /** Specifies data filtering conditions. */ + filter?: Object; + /** An array of pivot grid fields. */ + fields?: Array; + /** Indicates whether or not the local sorting of the XMLA data should be performed. */ + localSorting?: boolean; + /** A handler for the changed event. */ + onChanged?: () => void; + /** A handler for the loadingChanged event. */ + onLoadingChanged?: (isLoading: boolean) => void; + /** A handler for the loadError event. */ + onLoadError?: (e?: Object) => void; + /** A handler for the fieldsPrepared event. */ + onFieldsPrepared?: (e?: Array) => void; + } + /** An object that provides access to data for the dxPivotGrid widget. */ + export class PivotGridDataSource implements EventsMixin { + constructor(options?: PivotGridDataSource); + /** Starts loading data. */ + load(): JQueryPromise; + /** Indicates whether or not the PivotGridDataSource is currently being loaded. */ + isLoading(): boolean; + /** Gets data displayed in a PivotGrid. */ + getData(): Object; + /** Gets all fields within a specified area. */ + getAreaFields(area: string, collectGroups: boolean): Array; + /** Gets all fields from the data source. */ + fields(): Array; + /** Sets the fields option. */ + fields(fields: Array): void; + /** Gets current options of a specified field. */ + field(id: number): PivotGridField; + /** Sets one or more options of a specified field. */ + field(id: number, field: PivotGridField): void; + /** Collapses a specified header item. */ + collapseHeaderItem(area: string, path: Array): void; + /** Expands a specified header item. */ + expandHeaderItem(area: string, path: Array): void; + /** Disposes of all resources associated with this PivotGridDataSource. */ + dispose(): void; + on(eventName: string, eventHandler: Function): PivotGridDataSource; + on(events: { [eventName: string]: Function; }): PivotGridDataSource; + off(eventName: string): PivotGridDataSource; + off(eventName: string, eventHandler: Function): PivotGridDataSource; + } +} +declare module DevExpress.ui { + export interface dxSchedulerOptions extends WidgetOptions { + /** Specifies a date displayed on the current scheduler view by default. */ + currentDate?: Date; + /** Specifies the view used in the scheduler by default. */ + currentView?: string; + /** A data source used to fetch data to be displayed by the widget. */ + dataSource?: any; + /** Specifies the first day of a week. */ + firstDayOfWeek?: number; + /** The template to be used for rendering appointments. */ + appointmentTemplate?: any; + /** Lists the views to be available within the scheduler's View Selector. */ + views?: Array; + /** Specifies the resource kinds by which the scheduler's appointments are grouped in a timetable. */ + groups?: Array; + /** Specifies a start hour in the scheduler view's time interval. */ + startDayHour?: number; + /** Specifies an end hour in the scheduler view's time interval. */ + endDayHour?: number; + /** Specifies whether the scheduler data can be edited at runtime. */ + editing?: boolean; + /** Specifies an array of resources available in the scheduler. */ + resources?: Array<{ + /** Indicates whether or not several resources of this kind can be assigned to an appointment. */ + allowMultiple?: boolean; + /** Indicates whether or not resources of this kind have priority in the color identification of the appointments that have resources of different kinds assigned. */ + mainColor?: boolean; + /** A data source used to fetch resources to be available in the scheduler. */ + dataSource?: any; + /** Specifies the resource object field whose value is displayed by the Resource editor in the Appointment popup window. */ + displayExpr?: any; + /** Specifies the resource object field that is used as a value of the Resource editor in the Appointment popup window. */ + valueExpr?: any; + /** The name of the appointment object field that specifies a resource of this kind. */ + field?: string; + /** Specifies the label of the Appointment popup window field that allows end users to assign a resource of this kind. */ + label?: string; + }>; + /** A handler for the AppoinmentAdding event. */ + onAppointmentAdding?: Function; + /** A handler for the appointmentAdded event. */ + onAppointmentAdded?: Function; + /** A handler for the AppoinmentUpdating event. */ + onAppointmentUpdating?: Function; + /** A handler for the appointmentUpdated event. */ + onAppointmentUpdated?: Function; + /** A handler for the AppoinmentDeleting event. */ + onAppointmentDeleting?: Function; + /** A handler for the appointmentDeleted event. */ + onAppointmentDeleted?: Function; + /** A handler for the appointmentRendered event. */ + onAppointmentRendered?: Function; + } + /** A widget that displays scheduled data using different views and provides the capability to load, add and edit appointments. */ + export class dxScheduler extends Widget { + constructor(element: JQuery, options?: dxSchedulerOptions); + constructor(element: Element, options?: dxSchedulerOptions); + /** Add the appointment defined by the object passed as a parameter to the data associated with the widget. */ + addAppointment(appointment: Object): void; + /** Updates the appointment specified by the first method parameter by the appointment object specified by the second method parameter in the the data associated with the widget. */ + updateAppointment(target: Object, appointment: Object): void; + /** Deletes the appointment defined by the parameter from the the data associated with the widget. */ + deleteAppointment(appointment: Object): void; + /** Scrolls the scheduler work space to the specified time. */ + scrollToTime(hours: number, minutes: number): void; + } + export interface dxColorBoxOptions extends dxDropDownEditorOptions { + /** Specifies the text displayed on the button that applies changes and closes the drop-down editor. */ + applyButtonText?: string; + applyValueMode?: string; + /** Specifies the text displayed on the button that cancels changes and closes the drop-down editor. */ + cancelButtonText?: string; + /** Specifies whether or not the widget value includes the alpha channel component. */ + editAlphaChannel?: boolean; + /** Specifies the size of a step by which a handle is moved using a keyboard shortcut. */ + keyStep?: number; + } + /** A widget used to specify a color value. */ + export class dxColorBox extends dxDropDownEditor { + constructor(element: JQuery, options?: dxColorBoxOptions); + constructor(element: Element, options?: dxColorBoxOptions); + } + export interface dxColorPickerOptions extends dxColorBoxOptions { } + /** + * A widget used to specify a color value. + * @deprecated Use the dxColorBox widget instead + */ + export class dxColorPicker extends dxColorBox { + constructor(element: JQuery, options?: dxColorPickerOptions); + constructor(element: Element, options?: dxColorPickerOptions); + } + export interface dxTreeViewOptions extends CollectionWidgetOptions { + /** Specifies whether or not to animate item collapsing and expanding. */ + animationEnabled?: boolean; + /** Specifies whether a nested or plain array is used as a data source. */ + dataStructure?: string; + /** Specifies whether or not a user can expand all tree view items by the "*" hot key. */ + expandAllEnabled?: boolean; + /** + * An array of currently expanded item objects. + * @deprecated Use item.expanded field instead + */ + expandedItems?: Array; + /** Specifies whether or not a check box is displayed at each tree view item. */ + showCheckBoxes?: boolean; + /** Specifies whether or not to select nodes recursively. */ + selectNodesRecursive?: boolean; + /** Specifies whether the "Select All" check box is displayed over the tree view. */ + selectAllEnabled?: boolean; + /** Specifies the text displayed at the "Select All" check box. */ + selectAllText?: string; + /** Specifies the name of the data source item field used as a key. */ + keyExpr?: any; + /** Specifies the name of the data source item field whose value is displayed by the widget. */ + displayExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding node is selected. */ + selectedExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding node is expanded. */ + expandedExpr?: any; + /** Specifies the name of the data source item field that contains an array of nested items. */ + itemsExpr?: any; + /** Specifies the name of the data source item field that holds the key of the parent item. */ + parentIdExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding node is disabled. */ + disabledExpr?: any; + /** Specifies the name of the data source item field whose value defines whether or not the corresponding node includes child nodes. */ + hasItemsExpr?: any; + /** Specifies if the virtual mode is enabled. */ + virtualModeEnabled?: boolean; + /** Specifies the parent ID value of the root item. */ + rootValue?: any; + /** A string value specifying available scrolling directions. */ + scrollDirection?: string; + /** A handler for the itemSelected event. */ + onItemSelected?: Function; + /** A handler for the itemExpanded event. */ + onItemExpanded?: Function; + /** A handler for the itemCollapsed event. */ + onItemCollapsed?: Function; + onItemClick?: Function; + onItemContextMenu?: Function; + onItemRendered?: Function; + onItemHold?: Function; + hoverStateEnabled?: boolean; + focusStateEnabled?: boolean; + } + /** A widget displaying specified data items as a tree. */ + export class dxTreeView extends CollectionWidget { + constructor(element: JQuery, options?: dxTreeViewOptions); + constructor(element: Element, options?: dxTreeViewOptions); + /** Updates the tree view scrollbars according to the current size of the widget content. */ + updateDimensions(): JQueryPromise; + /** Selects the specified item. */ + selectItem(itemElement: any): void; + /** Unselects the specified item. */ + unselectItem(itemElement: any): void; + /** Expands the specified item. */ + expandItem(itemElement: any): void; + /** Collapses the specified item. */ + collapseItem(itemElement: any): void; + /** Returns all nodes of the tree view. */ + getNodes(): Array; + /** Selects all widget items. */ + selectAll(): void; + /** Unselects all widget items. */ + unselectAll(): void; + } + export interface dxMenuBaseOptions extends CollectionWidgetOptions { + /** An object that defines the animation options of the widget. */ + animation?: fx.AnimationOptions; + /** A Boolean value specifying whether or not the widget changes its state when interacting with a user. */ + activeStateEnabled?: boolean; + /** Specifies the name of the CSS class associated with the menu. */ + cssClass?: string; + /** Holds an array of menu items. */ + items?: Array; + /** Specifies whether or not an item becomes selected if an end-user clicks it. */ + selectionByClick?: boolean; + /** Specifies the selection mode supported by the menu. */ + selectionMode?: string; + /** Specifies options of submenu showing and hiding. */ + showSubmenuMode?: { + /** Specifies the mode name. */ + name?: string; + /** Specifies the delay of submenu show and hiding. */ + delay?: { + /** The time span after which the submenu is shown. */ + show?: number; + /** The time span after which the submenu is hidden. */ + hide?: number; + }; + }; + /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ + hoverStateEnabled?: boolean; + } + export class dxMenuBase extends CollectionWidget { + constructor(element: JQuery, options?: dxMenuBaseOptions); + constructor(element: Element, options?: dxMenuBaseOptions); + /** Selects the specified item. */ + selectItem(itemElement: any): void; + /** Unselects the specified item. */ + unselectItem(itemElement: any): void; + } + export interface dxMenuOptions extends dxMenuBaseOptions { + /** Specifies whether or not the submenu is hidden when the mouse pointer leaves it. */ + hideSubmenuOnMouseLeave?: boolean; + /** Specifies whether the menu has horizontal or vertical orientation. */ + orientation?: string; + /** Specifies options for showing and hiding the first level submenu. */ + showFirstSubmenuMode?: { + /** Specifies the mode name. */ + name?: string; + /** Specifies the delay of submenu showing and hiding. */ + delay?: { + /** The time span after which the submenu is shown. */ + show?: number; + /** The time span after which the submenu is hidden. */ + hide?: number; + }; + }; + /** Specifies the direction at which the submenus are displayed. */ + submenuDirection?: string; + /** A handler for the submenuHidden event. */ + onSubmenuHidden?: Function; + submenuHiddenAction?: Function; + /** A handler for the submenuHiding event. */ + onSubmenuHiding?: Function; + submenuHidingAction?: Function; + /** A handler for the submenuShowing event. */ + onSubmenuShowing?: Function; + submenuShowingAction?: Function; + /** A handler for the submenuShown event. */ + onSubmenuShown?: Function; + submenuShownAction?: Function; + } + /** A menu widget. */ + export class dxMenu extends dxMenuBase { + constructor(element: JQuery, options?: dxMenuOptions); + constructor(element: Element, options?: dxMenuOptions); + } + export interface dxContextMenuOptions extends dxMenuBaseOptions { + /** Holds an object that specifies options of alternative menu invocation. */ + alternativeInvocationMode?: { + /** Specifies whether or not the standard context menu invocation (on a right mouse click or on a long tap) is disabled. */ + enabled?: Boolean; + /** Specifies the element used to invoke the context menu. */ + invokingElement?: any; + }; + /** A handler for the hidden event. */ + onHidden?: Function; + /** A handler for the hiding event. */ + onHiding?: Function; + /** A handler for the positioning event. */ + onPositioning?: Function; + /** A handler for the showing event. */ + onShowing?: Function; + /** A handler for the shown event. */ + onShown?: Function; + /** An object defining widget positioning options. */ + position?: PositionOptions; + /** Specifies the direction at which submenus are displayed. */ + submenuDirection?: string; + /** The target element associated with a popover. */ + target?: any; + /** A Boolean value specifying whether or not the widget is visible. */ + visible?: boolean; + } + /** A context menu widget. */ + export class dxContextMenu extends dxMenuBase { + constructor(element: JQuery, options?: dxContextMenuOptions); + constructor(element: Element, options?: dxContextMenuOptions); + /** Toggles the visibility of the widget. */ + toggle(showing: boolean): JQueryPromise; + /** Shows the widget. */ + show(): JQueryPromise; + /** Hides the widget. */ + hide(): JQueryPromise; + } + export interface dxRemoteOperations { + /** Specifies whether or not filtering must be performed on the server side. */ + filtering?: boolean; + /** Specifies whether or not paging must be performed on the server side. */ + paging?: boolean; + /** Specifies whether or not sorting must be performed on the server side. */ + sorting?: boolean; + } + export interface dxDataGridColumn { + /** Specifies the content alignment within column cells. */ + alignment?: string; + /** Specifies whether the values in a column can be edited at runtime. Setting this option makes sense only when editing is enabled for a grid. */ + allowEditing?: boolean; + /** Specifies whether or not a column can be used for filtering grid records. Setting this option makes sense only when the filter row and column header filtering are visible. */ + allowFiltering?: boolean; + /** Specifies whether or not the column can be anchored to a grid edge by end users. Setting this option makes sense only when the columnFixing | enabled option is set to true. */ + allowFixing?: boolean; + /** Specifies if a column can be used for searching grid records. Setting this option makes sense only when the search panel is visible. */ + allowSearch?: boolean; + /** Specifies whether a column can be used for grouping grid records at runtime. Setting this option makes sense only when the group panel is visible. */ + allowGrouping?: boolean; + /** Specifies whether or not a column can be hidden by a user. Setting this option makes sense only when the column chooser is visible. */ + allowHiding?: boolean; + /** Specifies whether or not a particular column can be used in column reordering. Setting this option makes sense only when the allowColumnReordering option is set to true. */ + allowReordering?: boolean; + /** Specifies whether or not a particular column can be resized by a user. Setting this option makes sense only when the allowColumnResizing option is true. */ + allowResizing?: boolean; + /** Specifies whether grid records can be sorted by a specific column at runtime. Setting this option makes sense only when the sorting mode differs from none. */ + allowSorting?: boolean; + /** Specifies whether groups appear expanded or not when records are grouped by a specific column. Setting this option makes sense only when grouping is allowed for this column. */ + autoExpandGroup?: boolean; + /** Specifies a callback function that returns a value to be displayed in a column cell. */ + calculateCellValue?: (rowData: Object) => string; + /** Specifies a callback function that defines filters for customary calculated grid cells. */ + calculateFilterExpression?: (filterValue: any, selectedFilterOperation: string) => Array; + /** Specifies a caption for a column. */ + caption?: string; + /** Specifies a custom template for grid column cells. */ + cellTemplate?: any; + /** Specifies a CSS class to be applied to a column. */ + cssClass?: string; + /** Specifies a callback function that determines values for column cells to be used for grouping. */ + calculateGroupValue?: any; + /** Specifies a callback function that returns a value or the name of the field to be used for sorting column cells. */ + calculateSortValue?: any; + /** Specifies a callback function that returns the text to be displayed in the cells of a column. */ + customizeText?: (cellInfo: { value: any; valueText: string }) => string; + /** Specifies the field of a data source that provides data for a column. */ + dataField?: string; + /** Specifies the required type of column values. */ + dataType?: string; + /** Specifies a custom template for the cell of a grid column when it is in an editing state. */ + editCellTemplate?: any; + /** Specifies whether HTML tags are displayed as plain text or applied to the values of the column. */ + encodeHtml?: boolean; + /** In a boolean column, replaces all false items with a specified text. */ + falseText?: string; + /** Specifies the set of available filter operations. */ + filterOperations?: Array; + /** Specifies a filter value for a column. */ + filterValue?: any; + /** Specifies initial filter values for the column's header filter. */ + filterValues?: Array; + /** Specifies whether to include or exclude the records with the values selected in the column's header filter. */ + filterType?: string; + /** Indicates whether the column takes part in horizontal grid scrolling or is anchored to a grid edge. */ + fixed?: boolean; + /** Specifies the grid edge to which the column is anchored. */ + fixedPosition?: string; + /** Specifies a format for the values displayed in a column. */ + format?: string; + /** Specifies a custom template for the group cell of a grid column. */ + groupCellTemplate?: any; + /** Specifies the index of a column when grid records are grouped by the values of this column. */ + groupIndex?: number; + /** Specifies a custom template for the header of a grid column. */ + headerCellTemplate?: any; + /** Specifies options of a lookup column. */ + lookup?: { + /** Specifies whether or not a user can nullify values of a lookup column. */ + allowClearing?: boolean; + /** + * Specifies the data source providing data for a lookup column. + */ + dataSource?: any; + /** Specifies the expression defining the data source field whose values must be displayed. */ + displayExpr?: any; + /** Specifies the expression defining the data source field whose values must be replaced. */ + valueExpr?: string; + }; + /** Specifies a precision for formatted values displayed in a column. */ + precision?: number; + /** Specifies a filter operation applied to a column. */ + selectedFilterOperation?: string; + /** Specifies whether or not the column displays its values by using editors. */ + showEditorAlways?: boolean; + /** Specifies whether or not to display the column when grid records are grouped by it. */ + showWhenGrouped?: boolean; + /** Specifies the index of a column when grid records are sorted by the values of this column. */ + sortIndex?: number; + /** Specifies the initial sort order of column values. */ + sortOrder?: string; + /** In a boolean column, replaces all true items with a specified text. */ + trueText?: string; + /** Specifies whether a column is visible or not. */ + visible?: boolean; + /** Specifies the sequence number of the column in the grid. */ + visibleIndex?: number; + /** Specifies a column width in pixels or percentages. */ + width?: any; + /** Specifies an array of validation rules to be checked when updating column cell values. */ + validationRules?: Array; + /** Specifies whether or not to display the header of a hidden column in the column chooser. */ + showInColumnChooser?: boolean; + /** Specifies the identifier of the column. */ + name?: string; + } + export interface dxDataGridOptions extends WidgetOptions { + /** Specifies whether the outer borders of the grid are visible or not. */ + showBorders?: boolean; + /** Indicates whether to show the error row for the grid. */ + errorRowEnabled?: boolean; + /** A handler for the rowValidating event. */ + onRowValidating?: (e: Object) => void; + /** A handler for the contextMenuPreparing event. */ + onContextMenuPreparing?: (e: Object) => void; + initNewRow?: (e: { data: Object }) => void; + /** A handler for the initNewRow event. */ + onInitNewRow?: (e: { data: Object }) => void; + rowInserted?: (e: { data: Object; key: any }) => void; + /** A handler for the rowInserted event. */ + onRowInserted?: (e: { data: Object; key: any }) => void; + rowInserting?: (e: { data: Object; cancel: boolean }) => void; + /** A handler for the rowInserting event. */ + onRowInserting?: (e: { data: Object; cancel: boolean }) => void; + rowRemoved?: (e: { data: Object; key: any }) => void; + /** A handler for the rowRemoved event. */ + onRowRemoved?: (e: { data: Object; key: any }) => void; + rowRemoving?: (e: { data: Object; key: any; cancel: boolean }) => void; + /** A handler for the rowRemoving event. */ + onRowRemoving?: (e: { data: Object; key: any; cancel: boolean }) => void; + rowUpdated?: (e: { data: Object; key: any }) => void; + /** A handler for the rowUpdated event. */ + onRowUpdated?: (e: { data: Object; key: any }) => void; + rowUpdating?: (e: { oldData: Object; newData: Object; key: any; cancel: boolean }) => void; + /** A handler for the rowUpdating event. */ + onRowUpdating?: (e: { oldData: Object; newData: Object; key: any; cancel: boolean }) => void; + /** Enables a hint that appears when a user hovers the mouse pointer over a cell with truncated content. */ + cellHintEnabled?: boolean; + /** Specifies whether or not grid columns can be reordered by a user. */ + allowColumnReordering?: boolean; + /** Specifies whether or not grid columns can be resized by a user. */ + allowColumnResizing?: boolean; + cellClick?: any; + /** A handler for the cellClick event. */ + onCellClick?: any; + cellHoverChanged?: (e: Object) => void; + /** A handler for the cellHoverChanged event. */ + onCellHoverChanged?: (e: Object) => void; + cellPrepared?: (e: Object) => void; + /** A handler for the cellPrepared event. */ + onCellPrepared?: (e: Object) => void; + /** Specifies whether or not the width of grid columns depends on column content. */ + columnAutoWidth?: boolean; + /** Specifies the options of a column chooser. */ + columnChooser?: { + /** Specifies text displayed by the column chooser panel when it does not contain any columns. */ + emptyPanelText?: string; + /** Specifies whether a user can invoke the column chooser or not. */ + enabled?: boolean; + /** Specifies the height of the column chooser panel. */ + height?: number; + /** Specifies text displayed in the title of the column chooser panel. */ + title?: string; + /** Specifies the width of the column chooser panel. */ + width?: number; + }; + /** Specifies options for column fixing. */ + columnFixing?: { + /** Indicates if column fixing is enabled. */ + enabled?: boolean; + /** Contains options that specify texts for column-fixing related commands in the column header's context menu. */ + texts?: { + /** Specifies text for a context menu item that fixes the column for which the context menu is invoked. */ + fix?: string; + /** Specifies text for a context menu item that unfixes the column for which the context menu is invoked. */ + unfix?: string; + /** Specifies text for a context menu subitem that fixes a column, for which the context menu is invoked, to the left grid edge. */ + leftPosition?: string; + /** Specifies text for a context menu subitem that fixes a column, for which the context menu is invoked, to the right grid edge. */ + rightPosition?: string; + }; + }; + /** Specifies options for filtering using a column header filter. */ + headerFilter?: { + /** Indicates whether or not the column header filter button is visible. */ + visible?: boolean; + /** Specifies the height of the dropdown menu invoked when using a column header filter. */ + height?: number; + /** Specifies the width of the dropdown menu invoked when using a column header filter. */ + width?: number; + /** Contains options that specify texts for the dropdown menu invoked when you use a column header filter. */ + texts?: { + /** Specifies text for the item specifying an empty value in the column header filter's dropdown menu. */ + emptyValue?: string; + /** Specifies text for a button that closes the column header filter's dropdown menu and applies specified filtering. */ + ok?: string; + /** Specifies text for a button that closes the column header filter's dropdown menu without applying performed selection. */ + cancel?: string; + } + }; + /** + * An array of grid columns. + */ + columns?: dxDataGridColumn[]; + onContentReady?: Function; + contentReadyAction?: Function; + /** Specifies a function that customizes grid columns after they are created. */ + customizeColumns?: (columns: Array) => void; + dataErrorOccurred?: (errorObject: Error) => void; + /** Specifies a data source for the grid. */ + dataSource?: any; + editingStart?: (e: { + data: Object; + key: any; + cancel: boolean; + column: dxDataGridColumn + }) => void; + /** A handler for the editingStart event. */ + onEditingStart?: (e: { + data: Object; + key: any; + cancel: boolean; + column: dxDataGridColumn + }) => void; + editorPrepared?: (e: Object) => void; + /** A handler for the editorPrepared event. */ + onEditorPrepared?: (e: Object) => void; + editorPreparing?: (e: Object) => void; + /** A handler for the editorPreparing event. */ + onEditorPreparing?: (e: Object) => void; + /** Contains options that specify how grid content can be changed. */ + editing?: { + /** Specifies whether or not grid records can be edited at runtime. */ + editEnabled?: boolean; + /** Specifies how grid values can be edited manually. */ + editMode?: string; + /** Specifies whether or not new records can be inserted into a grid. */ + insertEnabled?: boolean; + /** Specifies whether or not records can be deleted from a grid. */ + removeEnabled?: boolean; + /** Contains options that specify texts for editing-related grid controls. */ + texts?: { + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Save" button. Setting this option makes sense only when the editMode option is set to batch. */ + saveAllChanges?: string; + /** Specifies text for a cancel button displayed when a row is in the editing state. Setting this option makes sense only when the editEnabled option is set to true. */ + cancelRowChanges?: string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Revert" button. Setting this option makes sense only when the editMode option is set to batch. */ + cancelAllChanges?: string; + /** Specifies a message to be displayed by a confirmation window. Setting this option makes sense only when the edit mode is "row". */ + confirmDeleteMessage?: string; + /** Specifies text to be displayed in the title of a confirmation window. Setting this option makes sense only when the edit mode is "row". */ + confirmDeleteTitle?: string; + /** Specifies text for a button that deletes a row from a grid. Setting this option makes sense only when the removeEnabled option is set to true. */ + deleteRow?: string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the "Add" button. Setting this option makes sense only when the insertEnabled option is true. */ + addRow?: string; + /** Specifies text for a button that turns a row into the editing state. Setting this option makes sense only when the editEnabled option is set to true. */ + editRow?: string; + /** Specifies text for a save button displayed when a row is in the editing state. Setting this option makes sense only when the editEnabled option is set to true. */ + saveRowChanges?: string; + /** Specifies text for a button that recovers a deleted row. Setting this option makes sense only if the grid uses the batch edit mode and the removeEnabled option is set to true. */ + undeleteRow?: string; + }; + }; + /** Specifies filter row options. */ + filterRow?: { + /** Specifies when to apply a filter. */ + applyFilter?: string; + /** Specifies text for the hint that pops up when a user hovers the mouse pointer over the "Apply Filter" button. */ + applyFilterText?: string; + /** Specifies descriptions for filter operations. */ + operationDescriptions?: { + "=": string; + "<>": string; + "<": string; + "<=": string; + ">": string; + ">=": string; + "startswith": string; + "contains": string; + "notcontains": string; + "endswith": string; + }; + /** Specifies text for the reset operation in a filter list. */ + resetOperationText?: string; + /** Specifies text for the operation of clearing the applied filter when a select box is used. */ + showAllText?: string; + /** Specifies whether or not an icon that allows the user to choose a filter operation is visible. */ + showOperationChooser?: boolean; + /** Specifies whether the filter row is visible or not. */ + visible?: boolean; + }; + /** Specifies the behavior of grouped grid records. */ + grouping?: { + /** Specifies whether the user can collapse grouped records in a grid or not. */ + allowCollapsing?: boolean; + /** Specifies whether groups appear expanded or not. */ + autoExpandAll?: boolean; + /** Specifies the message displayed in a group row when the corresponding group is continued from the previous page. */ + groupContinuedMessage?: string; + /** + * Specifies the message displayed in a group row when the corresponding group continues on the next page. + */ + groupContinuesMessage?: string; + }; + /** Specifies options that configure the group panel. */ + groupPanel?: { + /** Specifies whether columns can be dragged onto or from the group panel. */ + allowColumnDragging?: boolean; + /** Specifies text displayed by the group panel when it does not contain any columns. */ + emptyPanelText?: string; + /** Specifies whether the group panel is visible or not. */ + visible?: boolean; + }; + /** Specifies options configuring the load panel. */ + loadPanel?: { + /** Specifies whether to show the load panel or not. */ + enabled?: boolean; + /** Specifies the height of the load panel in pixels. */ + height?: number; + /** Specifies a URL pointing to an image to be used as a loading indicator. */ + indicatorSrc?: string; + /** Specifies whether or not a loading indicator must be displayed on the load panel. */ + showIndicator?: boolean; + /** Specifies whether or not the pane of the load panel must be displayed. */ + showPane?: boolean; + /** Specifies text displayed by the load panel. */ + text?: string; + /** Specifies the width of the load panel in pixels. */ + width?: number; + }; + /** Specifies text displayed when a grid does not contain any records. */ + noDataText?: string; + /** Specifies the options of a grid pager. */ + pager?: { + /** Specifies the page sizes that can be selected at runtime. */ + allowedPageSizes?: any; + /** Specifies whether to show the page size selector or not. */ + showPageSizeSelector?: boolean; + /** Specifies whether to show the pager or not. */ + visible?: any; + /** Specifies the text accompanying the page navigator. */ + infoText?: string; + /** Specifies whether or not to display the text accompanying the page navigator. This text is specified by the infoText option. */ + showInfo?: boolean; + /** Specifies whether or not to display buttons that switch the grid to the previous or next page. */ + showNavigationButtons?: boolean; + }; + /** Specifies paging options. */ + paging?: { + /** Specifies whether dxDataGrid loads data page by page or all at once. */ + enabled?: boolean; + /** Specifies the grid page that should be displayed by default. */ + pageIndex?: number; + /** Specifies the size of grid pages. */ + pageSize?: number; + }; + /** Specifies whether or not grid rows must be shaded in a different way. */ + rowAlternationEnabled?: boolean; + rowClick?: any; + /** A handler for the rowClick event. */ + onRowClick?: any; + rowPrepared?: (e: Object) => void; + /** A handler for the rowPrepared event. */ + onRowPrepared?: (e: Object) => void; + /** Specifies a custom template for grid rows. */ + rowTemplate?: any; + /** A configuration object specifying scrolling options. */ + scrolling?: { + /** Specifies the scrolling mode. */ + mode?: string; + /** Specifies whether or not a grid must preload pages adjacent to the current page when using virtual scrolling. */ + preloadEnabled?: boolean; + }; + /** Specifies options of the search panel. */ + searchPanel?: { + /** Specifies whether or not search strings in the located grid records should be highlighted. */ + highlightSearchText?: boolean; + /** Specifies text displayed by the search panel when no search string was typed. */ + placeholder?: string; + /** Specifies whether the search panel is visible or not. */ + visible?: boolean; + /** Specifies the width of the search panel in pixels. */ + width?: number; + /** Sets a search string for the search panel. */ + text?: string; + }; + /** Specifies the operations that must be performed on the server side. */ + remoteOperations?: any; + /** Allows you to sort groups according to the values of group summary items. */ + sortByGroupSummaryInfo?: Array<{ + /** Specifies the group summary item whose values must be used to sort groups. */ + summaryItem?: string; + /** Specifies the identifier of the column that must be used in grouping so that sorting by group summary item values be applied. */ + groupColumn?: string; + /** Specifies the sort order of group summary item values. */ + sortOrder?: string; + }>; + /** Allows you to build a master-detail interface in the grid. */ + masterDetail?: { + /** Enables an end-user to expand/collapse detail sections. */ + enabled?: boolean; + /** Specifies whether detail sections appear expanded or collapsed. */ + autoExpandAll?: boolean; + /** Specifies the template for detail sections. */ + template?: any; + }; + /** Specifies options for exporting grid data. */ + export?: { + /** Indicates if the export feature is enabled in the grid. */ + enabled?: boolean; + /** Specifies a default name for the file to which grid data is exported. */ + fileName?: string; + /** Specifies whether to enable Excel filtering for the exported data in the resulting XLSX file. */ + excelFilterEnabled?: boolean; + /** Specifies whether to enable word wrapping for the exported data in the resulting XLSX file. */ + excelWrapTextEnabled?: boolean; + /** Specifies the URL of the server-side proxy that streams the resulting file to the end user to enable export in IE8, IE9 and Safari browsers. */ + proxyUrl?: string; + /** Indicates whether to allow end users to export not only the data displayed in the grid, but the selected rows only. */ + allowExportSelectedData?: boolean; + /** Contains options that specify texts for the export-related commands and hints. */ + texts?: { + /** Specifies text for the Export button when this button invokes a dropdown menu so you can choose the required export format. */ + exportTo?: string; + /** Specifies text for the Export button when this button exports to the XSLX format. */ + exportToExcel?: string; + /** Specifies text for the item in the Export dropdown menu that exports grid data to Excel. */ + excelFormat?: string; + /** Specifies text for the option in the Export dropdown menu that allows you to choose whether to export all the grid data or the selected rows only. */ + selectedRows?: string; + } + }; + /** Specifies the keys of the records that must appear selected initially. */ + selectedRowKeys?: Array; + /** Specifies options of runtime selection. */ + selection?: { + /** Specifies whether the user can select all grid records at once. */ + allowSelectAll?: boolean; + /** Specifies the selection mode. */ + mode?: string; + }; + selectionChanged?: (e: { + currentSelectedRowKeys: Array; + currentDeselectedRowKeys: Array; + selectedRowKeys: Array; + selectedRowsData: Array; + }) => void; + /** A handler for the dataErrorOccured event. */ + onDataErrorOccurred?: (e: { error: Error }) => void; + /** A handler for the selectionChanged event. */ + onSelectionChanged?: (e: { + currentSelectedRowKeys: Array; + currentDeselectedRowKeys: Array; + selectedRowKeys: Array; + selectedRowsData: Array; + }) => void; + /** A handler for the exporting event. */ + onExporting?: (e: { + fileName: string; + format: string; + cancel: boolean; + }) => void; + /** A handler for the exported event. */ + onExported?: (e: Object) => void; + /** A handler for the keyDown event. */ + onKeyDown?: (e: Object) => void; + /** A handler for the rowExpanding event. */ + onRowExpanding?: (e: Object) => void; + /** A handler for the rowExpanded event. */ + onRowExpanded?: (e: Object) => void; + /** A handler for the rowCollapsing event. */ + onRowCollapsing?: (e: Object) => void; + /** A handler for the rowCollapsed event. */ + onRowCollapsed?: (e: Object) => void; + /** Specifies whether column headers are visible or not. */ + showColumnHeaders?: boolean; + /** Specifies whether or not vertical lines separating one grid column from another are visible. */ + showColumnLines?: boolean; + /** Specifies whether or not horizontal lines separating one grid row from another are visible. */ + showRowLines?: boolean; + /** Specifies options of runtime sorting. */ + sorting?: { + /** Specifies text for the context menu item that sets an ascending sort order in a column. */ + ascendingText?: string; + /** Specifies text for the context menu item that resets sorting settings for a column. */ + clearText?: string; + /** Specifies text for the context menu item that sets a descending sort order in a column. */ + descendingText?: string; + /** Specifies the runtime sorting mode. */ + mode?: string; + }; + /** Specifies options of state storing. */ + stateStoring?: { + /** Specifies a callback function that performs specific actions on state loading. */ + customLoad?: () => JQueryPromise; + /** Specifies a callback function that performs specific actions on state saving. */ + customSave?: (gridState: Object) => void; + /** Specifies whether or not a grid saves its state. */ + enabled?: boolean; + /** Specifies the delay between the last change of a grid state and the operation of saving this state in milliseconds. */ + savingTimeout?: number; + /** Specifies a unique key to be used for storing the grid state. */ + storageKey?: string; + /** Specifies the type of storage to be used for state storing. */ + type?: string; + }; + /** Specifies the options of the grid summary. */ + summary?: { + /** Contains options that specify text patterns for summary items. */ + texts?: { + /** Specifies a pattern for the 'sum' summary items when they are displayed in the parent column. */ + sum?: string; + /** Specifies a pattern for the 'sum' summary items displayed in a group row or in any other column rather than the parent one. */ + sumOtherColumn?: string; + /** Specifies a pattern for the 'min' summary items when they are displayed in the parent column. */ + min?: string; + /** Specifies a pattern for the 'min' summary items displayed in a group row or in any other column rather than the parent one. */ + minOtherColumn?: string; + /** Specifies a pattern for the 'max' summary items when they are displayed in the parent column. */ + max?: string; + /** Specifies a pattern for the 'max' summary items displayed in a group row or in any other column rather than the parent one. */ + maxOtherColumn?: string; + /** Specifies a pattern for the 'avg' summary items when they are displayed in the parent column. */ + avg?: string; + /** Specifies a pattern for the 'avg' summary items displayed in a group row or in any other column rather than the parent one. */ + avgOtherColumn?: string; + /** Specifies a pattern for the 'count' summary items. */ + count?: string; + }; + /** Specifies items of the group summary. */ + groupItems?: Array<{ + /** Specifies the identifier of a summary item. */ + name?: string; + /** Specifies the column that provides data for a group summary item. */ + column?: string; + /** Customizes the text to be displayed in the summary item. */ + customizeText?: (itemInfo: { + value: any; + valueText: string; + }) => string; + /** Specifies a pattern for the summary item text. */ + displayFormat?: string; + /** Specifies a precision for the summary item value of a numeric format. */ + precision?: number; + /** Specifies whether or not a summary item must be displayed in the group footer. */ + showInGroupFooter?: boolean; + /** Indicates whether to display group summary items in brackets of the group row header or to align them by the corresponding columns within the group row. */ + alignByColumn?: boolean; + /** Specifies the column that must hold the summary item when this item is displayed in the group footer or aligned by a column in the group row. */ + showInColumn?: string; + /** Specifies how to aggregate data for a summary item. */ + summaryType?: string; + /** Specifies a format for the summary item value. */ + valueFormat?: string; + }>; + /** Specifies items of the total summary. */ + totalItems?: Array<{ + /** Specifies the identifier of a summary item. */ + name?: string; + /** Specifies the alignment of a summary item. */ + alignment?: string; + /** Specifies the column that provides data for a summary item. */ + column?: string; + /** Specifies a CSS class to be applied to a summary item. */ + cssClass?: string; + /** Customizes the text to be displayed in the summary item. */ + customizeText?: (itemInfo: { + value: any; + valueText: string; + }) => string; + /** Specifies a pattern for the summary item text. */ + displayFormat?: string; + /** Specifies a precision for the summary item value of a numeric format. */ + precision?: number; + /** Specifies the column that must hold the summary item. */ + showInColumn?: string; + /** Specifies how to aggregate data for a summary item. */ + summaryType?: string; + /** Specifies a format for the summary item value. */ + valueFormat?: string; + }>; + /** Allows you to use a custom aggregate function to calculate the value of a summary item. */ + calculateCustomSummary?: (options: { + component: dxDataGrid; + name?: string; + value: any; + totalValue: any; + summaryProcess: string + }) => void; + }; + /** Specifies whether text that does not fit into a column should be wrapped. */ + wordWrapEnabled?: boolean; + } + /** A data grid widget. */ + export class dxDataGrid extends Widget { + constructor(element: JQuery, options?: dxDataGridOptions); + constructor(element: Element, options?: dxDataGridOptions); + /** Ungroups grid records. */ + clearGrouping(): void; + /** Clears sorting settings of all grid columns at once. */ + clearSorting(): void; + /** Allows you to obtain a cell by its row index and the data field of its column. */ + getCellElement(rowIndex: number, dataField: string): any; + /** Allows you to obtain a cell by its row index and the visible index of its column. */ + getCellElement(rowIndex: number, visibleColumnIndex: number): any; + /** Returns the current state of the grid. */ + state(): Object; + /** Sets the grid state. */ + state(state: Object): void; + /** Allows you to obtain the row index by a data key. */ + getRowIndexByKey(key: any): number; + /** Allows you to obtain the data key by a row index. */ + getKeyByRowIndex(rowIndex: number): any; + /** Adds a new column to a grid. */ + addColumn(columnOptions: dxDataGridColumn): void; + /** Displays the load panel. */ + beginCustomLoading(messageText: string): void; + /** Discards changes made in a grid. */ + cancelEditData(): void; + /** Clears all the filters of a specific type applied to grid records. */ + clearFilter(): void; + /** Deselects all grid records. */ + clearSelection(): void; + /** Draws the cell being edited from the editing state. Use this method when the edit mode is batch. */ + closeEditCell(): void; + /** Collapses groups or master rows in a grid. */ + collapseAll(groupIndex?: number): void; + /** Returns the number of data columns in a grid. */ + columnCount(): number; + /** Returns the value of a specific column option. */ + columnOption(id: number, optionName: string): any; + /** Sets an option of a specific column. */ + columnOption(id: number, optionName: string, optionValue: any): void; + /** Returns the options of a column by an identifier. */ + columnOption(id: any): Object; + /** Sets several options of a column at once. */ + columnOption(id: any, options: Object): void; + /** Sets a specific cell into the editing state. */ + editCell(rowIndex: number, columnIndex: number): void; + /** Sets a specific row into the editing state. */ + editRow(rowIndex: number): void; + /** Hides the load panel. */ + endCustomLoading(): void; + /** Expands groups or master rows in a grid. */ + expandAll(groupIndex: number): void; + /** Allows you to find out whether a specific group or master row is expanded or collapsed. */ + isRowExpanded(key: any): boolean; + /** Allows you to expand a specific group or master row by its key. */ + expandRow(key: any): void; + /** Allows you to collapse a specific group or master row by its key. */ + collapseRow(key: any): void; + /** Applies a filter to the grid's data source. */ + filter(filterExpr?: any): void; + /** Returns a filter expression applied to the grid's data source using the filter(filterExpr) method. */ + filter(): any; + /** Returns a filter expression applied to the grid using all possible scenarious. */ + getCombinedFilter(): any; + /** Gets the keys of currently selected grid records. */ + getSelectedRowKeys(): Array; + /** Gets the data objects of currently selected grid records. */ + getSelectedRowsData(): Array; + /** Hides the column chooser panel. */ + hideColumnChooser(): void; + /** Adds a new data row to a grid. */ + insertRow(): void; + /** Returns the key corresponding to the passed data object. */ + keyOf(obj: Object): any; + /** Switches a grid to a specified page. */ + pageIndex(newIndex: number): void; + /** Gets the index of the current page. */ + pageIndex(): number; + /** Sets the page size. */ + pageSize(value: number): void; + /** Gets the current page size. */ + pageSize(): number; + /** Refreshes grid data. */ + refresh(): void; + /** Removes a specific row from a grid. */ + removeRow(rowIndex: number): void; + /** Saves changes made in a grid. */ + saveEditData(): void; + /** + * Searches grid records by a search string. + */ + searchByText(text: string): void; + /** Selects all grid records. */ + selectAll(): void; + /** Deselects the rows that are currently selected within the applied filter. */ + deselectAll(): void; + /** Selects specific grid records. */ + selectRows(keys: Array, preserve: boolean): void; + /** Deselects specific grid records. */ + deselectRows(keys: Array): void; + /** Selects grid rows by indexes. */ + selectRowsByIndexes(indexes: Array): void; + /** Allows you to find out whether a row is selected or not. */ + isRowSelected(key: any): boolean; + /** Invokes the column chooser panel. */ + showColumnChooser(): void; + startSelectionWithCheckboxes(): boolean; + /** Returns the number of records currently held by a grid. */ + totalCount(): number; + /** Recovers a row deleted in the batch edit mode. */ + undeleteRow(rowIndex: number): void; + /** Allows you to obtain a data object by its key. */ + byKey(key: any): JQueryPromise; + /** Gets the value of a total summary item. */ + getTotalSummaryValue(summaryItemName: string): any; + /** Exports grid data to Excel. */ + exportToExcel(selectionOnly: boolean): void; + /** Updates the grid to the size of its content. */ + updateDimensions(): void; + /** Focuses the specified cell element in the grid. */ + focus(element?: JQuery): void; + } + export interface dxPivotGridOptions extends WidgetOptions { + onContentReady?: Function; + /** Specifies a data source for the pivot grid. */ + dataSource?: any; + /** Specifies whether or not the widget uses native scrolling. */ + useNativeScrolling?: any; + /** Allows an end-user to change sorting options. */ + allowSorting?: boolean; + /** Allows an end-user to sort columns by summary values. */ + allowSortingBySummary?: boolean; + /** Allows an end-user to change filtering options. */ + allowFiltering?: boolean; + /** Allows an end-user to expand/collapse all header items within a header level. */ + allowExpandAll?: boolean; + /** Specifies whether to display the Total rows. */ + showRowTotals?: boolean; + /** Specifies whether to display the Grand Total row. */ + showRowGrandTotals?: boolean; + /** Specifies whether to display the Total columns. */ + showColumnTotals?: boolean; + /** Specifies whether to display the Grand Total column. */ + showColumnGrandTotals?: boolean; + /** The Field Chooser configuration options. */ + fieldChooser?: { + /** Enables or disables the field chooser. */ + enabled?: boolean; + /** Specifies the field chooser layout. */ + layout?: number; + /** Specifies the text to display as a title of the field chooser popup window. */ + title?: string; + /** Specifies the field chooser width. */ + width?: number; + /** Specifies the field chooser height. */ + height?: number; + /** Strings that can be changed or localized in the pivot grid's integrated Field Chooser. */ + texts?: { + /** The string to display instead of Row Fields. */ + rowFields?: string; + /** The string to display instead of Column Fields. */ + columnFields?: string; + /** The string to display instead of Data Fields. */ + dataFields?: string; + /** The string to display instead of Filter Fields. */ + filterFields?: string; + /** The string to display instead of All Fields. */ + allFields?: string; + }; + } + /** Strings that can be changed or localized in the dxPivotGrid widget. */ + texts?: { + /** The string to display as a header of the Grand Total row and column. */ + grandTotal?: string; + /** The string to display as a header of the Total row and column. */ + total?: string; + /** Specifies the text displayed when a pivot grid does not contain any fields. */ + noData?: string; + /** The string to display as a Show Field Chooser context menu item. */ + showFieldChooser?: string; + /** The string to display as an Expand All context menu item. */ + expandAll?: string; + /** The string to display as a Collapse All context menu item. */ + collapseAll?: string; + /** The string to display as a Sort Column by Summary Value context menu item. */ + sortColumnBySummary?: string; + /** The string to display as a Sort Row by Summary Value context menu item. */ + sortRowBySummary?: string; + /** The string to display as a Remove All Sorting context menu item. */ + removeAllSorting?: string; + }; + /** The Load panel configuration options. */ + loadPanel?: { + /** Enables or disables the load panel. */ + enabled?: boolean; + /** Specifies the height of the load panel. */ + height?: number; + /** Specifies the URL pointing to an image that will be used as a load indicator. */ + indicatorSrc?: string; + /** Specifies whether or not to show a load indicator. */ + showIndicator?: boolean; + /** Specifies whether or not to show load panel background. */ + showPane?: boolean; + /** Specifies the text to display inside a load panel. */ + text?: string; + /** Specifies the width of the load panel. */ + width?: number; + }; + /** A handler for the cellClick event. */ + onCellClick?: (e: any) => void; + /** A handler for the cellPrepared event. */ + onCellPrepared?: (e: any) => void; + /** A handler for the contextMenuPreparing event. */ + onContextMenuPreparing?: (e: Object) => void; + } + /** A data summarization widget for multi-dimensional data analysis and data mining. */ + export class dxPivotGrid extends Widget { + constructor(element: JQuery, options?: dxPivotGridOptions); + constructor(element: Element, options?: dxPivotGridOptions); + /** Gets the PivotGridDataSource instance. */ + getDataSource(): DevExpress.data.PivotGridDataSource; + /** Updates the widget to the size of its content. */ + updateDimensions(): void; + } + export interface dxPivotGridFieldChooserOptions extends WidgetOptions { + /** Specifies the field chooser layout. */ + layout?: number; + /** The data source of a dxPivotGrid widget. */ + dataSource?: DevExpress.data.PivotGridDataSource; + onContentReady?: Function; + /** Strings that can be changed or localized in the dxPivotGridFieldChooser widget. */ + texts?: { + /** The string to display instead of Row Fields. */ + rowFields?: string; + /** The string to display instead of Column Fields. */ + columnFields?: string; + /** The string to display instead of Data Fields. */ + dataFields?: string; + /** The string to display instead of Filter Fields. */ + filterFields?: string; + /** The string to display instead of All Fields. */ + allFields?: string; + }; + } + /** A complementary widget for dxPivotGrid that allows you to manage data displayed in the dxPivotGrid. */ + export class dxPivotGridFieldChooser extends Widget { + constructor(element: JQuery, options?: dxPivotGridFieldChooserOptions); + constructor(element: Element, options?: dxPivotGridFieldChooserOptions); + /** Updates the widget to the size of its content. */ + updateDimensions(): void; + } +} +interface JQuery { + dxTreeView(): JQuery; + dxTreeView(options: "instance"): DevExpress.ui.dxTreeView; + dxTreeView(options: string): any; + dxTreeView(options: string, ...params: any[]): any; + dxTreeView(options: DevExpress.ui.dxTreeViewOptions): JQuery; + dxMenuBase(): JQuery; + dxMenuBase(options: "instance"): DevExpress.ui.dxMenuBase; + dxMenuBase(options: string): any; + dxMenuBase(options: string, ...params: any[]): any; + dxMenuBase(options: DevExpress.ui.dxMenuBaseOptions): JQuery; + dxMenu(): JQuery; + dxMenu(options: "instance"): DevExpress.ui.dxMenu; + dxMenu(options: string): any; + dxMenu(options: string, ...params: any[]): any; + dxMenu(options: DevExpress.ui.dxMenuOptions): JQuery; + dxContextMenu(): JQuery; + dxContextMenu(options: "instance"): DevExpress.ui.dxContextMenu; + dxContextMenu(options: string): any; + dxContextMenu(options: string, ...params: any[]): any; + dxContextMenu(options: DevExpress.ui.dxContextMenuOptions): JQuery; + dxColorBox(): JQuery; + dxColorBox(options: "instance"): DevExpress.ui.dxColorBox; + dxColorBox(options: string): any; + dxColorBox(options: string, ...params: any[]): any; + dxColorBox(options: DevExpress.ui.dxColorBoxOptions): JQuery; + dxDataGrid(): JQuery; + dxDataGrid(options: "instance"): DevExpress.ui.dxDataGrid; + dxDataGrid(options: string): any; + dxDataGrid(options: string, ...params: any[]): any; + dxDataGrid(options: DevExpress.ui.dxDataGridOptions): JQuery; + dxPivotGrid(): JQuery; + dxPivotGrid(options: "instance"): DevExpress.ui.dxPivotGrid; + dxPivotGrid(options: string): any; + dxPivotGrid(options: string, ...params: any[]): any; + dxPivotGrid(options: DevExpress.ui.dxPivotGridOptions): JQuery; + dxPivotGridFieldChooser(): JQuery; + dxPivotGridFieldChooser(options: "instance"): DevExpress.ui.dxPivotGridFieldChooser; + dxPivotGridFieldChooser(options: string): any; + dxPivotGridFieldChooser(options: string, ...params: any[]): any; + dxPivotGridFieldChooser(options: DevExpress.ui.dxPivotGridFieldChooserOptions): JQuery; + dxScheduler(): JQuery; + dxScheduler(options: "instance"): DevExpress.ui.dxScheduler; + dxScheduler(options: string): any; + dxScheduler(options: string, ...params: any[]): any; + dxScheduler(options: DevExpress.ui.dxSchedulerOptions): JQuery; +} +declare module DevExpress.framework { + /** An object used to store information on the views displayed in an application. */ + export class ViewCache { + viewRemoved: JQueryCallback; + /** Removes all the viewInfo objects from the cache. */ + clear(): void; + /** Obtains a viewInfo object from the cache by the specified key. */ + getView(key: string): Object; + /** Checks whether or not a viewInfo object is contained in the view cache under the specified key. */ + hasView(key: string): boolean; + /** Removes a viewInfo object from the cache by the specified key. */ + removeView(key: string): Object; + /** Adds the specified viewInfo object to the cache under the specified key. */ + setView(key: string, viewInfo: Object): void; + } + export interface dxCommandOptions extends DOMComponentOptions { + action?: any; + /** Specifies an action performed when the execute() method of the command is called. */ + onExecute?: any; + /** Indicates whether or not the widget that displays this command is disabled. */ + disabled?: boolean; + /** Specifies whether the current command should is rendered when a view is being rendered, or after a view has been shown. */ + renderStage?: string; + /** Specifies the name of the icon shown inside the widget associated with this command. */ + icon?: string; + iconSrc?: string; + /** The identifier of the command. */ + id?: string; + /** Specifies the title of the widget associated with this command. */ + title?: string; + /** Specifies the type of the button, if the command is rendered as a dxButton widget. */ + type?: string; + /** A Boolean value specifying whether or not the widget associated with this command is visible. */ + visible?: boolean; + } + /** A markup component used to define markup options for a command. */ + export class dxCommand extends DOMComponent { + constructor(element: JQuery, options: dxCommandOptions); + constructor(options: dxCommandOptions); + /** Executes the action associated with this command. */ + execute(): void; + } + /** An object responsible for routing. */ + export class Router { + /** Adds a routing rule to the list of registered rules. */ + register(pattern: string, defaults?: Object, constraints?: Object): void; + /** Decodes the specified URI to an object using the registered routing rules. */ + parse(uri: string): Object; + /** Formats an object to a URI. */ + format(obj: Object): string; + } + export interface StateManagerOptions { + /** A storage to which the state manager saves the application state. */ + storage?: Object; + } + /** An object used to store the current application state. */ + export class StateManager { + constructor(options?: StateManagerOptions); + /** Adds an object that implements an interface of a state source to the state manager's collection of state sources. */ + addStateSource(stateSource: Object): void; + /** Removes a specified state source from the state manager's collection of state sources. */ + removeStateSource(stateSource: Object): void; + /** Saves the current application state. */ + saveState(): void; + /** Restores the application state that has been saved by the saveState() method to the state storage. */ + restoreState(): void; + /** Removes the application state that has been saved by the saveState() method to the state storage. */ + clearState(): void; + } + export module html { + export var layoutSets: Array; + export var animationSets: { [animationSetName: string]: AnimationSet }; + export interface AnimationSet { + [animationName: string]: any + } + export interface HtmlApplicationOptions { + /** Specifies where the commands that are defined in the application's views must be displayed. */ + commandMapping?: Object; + /** Specifies whether or not view caching is disabled. */ + disableViewCache?: boolean; + /** An array of layout controllers that should be used to show application views in the current navigation context. */ + layoutSet?: any; + /** Specifies the animation presets that are used to animate different UI elements in the current application. */ + animationSet?: AnimationSet; + /** Specifies whether the current application must behave as a mobile or web application. */ + mode?: string; + /** Specifies the object that represents a root namespace of the application. */ + namespace?: Object; + /** Specifies application behavior when the user navigates to a root view. */ + navigateToRootViewMode?: string; + /** An array of dxCommand configuration objects used to define commands available from the application's global navigation. */ + navigation?: Array; + /** A state manager to be used in the application. */ + stateManager?: StateManager; + /** Specifies the storage to be used by the application's state manager to store the application state. */ + stateStorage?: Object; + /** Indicates whether on not to use the title of the previously displayed view as text on the Back button. */ + useViewTitleAsBackText?: boolean; + /** A custom view cache to be used in the application. */ + viewCache?: Object; + /** Specifies a limit for the views that can be cached. */ + viewCacheSize?: number; + /** Specifies options for the viewport meta tag of a mobile browser. */ + viewPort?: JQuery; + /** A custom router to be used in the application. */ + router?: Router; + } + /** An object used to manage views, as well as control the application life cycle. */ + export class HtmlApplication implements EventsMixin { + constructor(options: HtmlApplicationOptions); + afterViewSetup: JQueryCallback; + beforeViewSetup: JQueryCallback; + initialized: JQueryCallback; + navigating: JQueryCallback; + navigatingBack: JQueryCallback; + resolveLayoutController: JQueryCallback; + viewDisposed: JQueryCallback; + viewDisposing: JQueryCallback; + viewHidden: JQueryCallback; + viewRendered: JQueryCallback; + viewShowing: JQueryCallback; + viewShown: JQueryCallback; + /** Provides access to the ViewCache object. */ + viewCache: ViewCache; + /** An array of dxCommand components that are created based on the application's navigation option value. */ + navigation: Array; + /** Provides access to the StateManager object. */ + stateManager: StateManager; + /** Provides access to the Router object. */ + router: Router; + /** Navigates to the URI preceding the current one in the navigation history. */ + back(): void; + /** Returns a Boolean value indicating whether or not backwards navigation is currently possible. */ + canBack(): boolean; + /** Calls the clearState() method of the application's StateManager object. */ + clearState(): void; + /** Creates global navigation commands. */ + createNavigation(navigationConfig: Array): void; + /** Returns an HTML template of the specified view. */ + getViewTemplate(viewName: string): JQuery; + /** Returns a configuration object used to create a dxView component for a specified view. */ + getViewTemplateInfo(viewName: string): Object; + /** Adds a specified HTML template to a collection of view or layout templates. */ + loadTemplates(source: any): JQueryPromise; + /** Navigates to the specified URI. */ + navigate(uri?: any, options?: Object): void; + /** Renders navigation commands to the navigation command containers that are located in the layouts used in the application. */ + renderNavigation(): void; + /** Calls the restoreState() method of the application's StateManager object. */ + restoreState(): void; + /** Calls the saveState method of the application's StateManager object. */ + saveState(): void; + /** Provides access to the object that defines the current context to be considered when choosing an appropriate template for a view. */ + templateContext(): Object; + on(eventName: "initialized", eventHandler: () => void): HtmlApplication; + on(eventName: "afterViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "beforeViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "navigating", eventHandler: (e: { + currentUri: string; + uri: string; + cancel: boolean; + options: { + root: boolean; + target: string; + direction: string; + rootInDetailPane: boolean; + modal: boolean; + }; + }) => void): HtmlApplication; + on(eventName: "navigatingBack", eventHandler: (e: { + cancel: boolean; + isHardwareButton: boolean; + }) => void): HtmlApplication; + on(eventName: "resolveLayoutController", eventHandler: (e: { + viewInfo: Object; + layoutController: Object; + availableLayoutControllers: Array; + }) => void): HtmlApplication; + on(eventName: "viewDisposed", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewDisposing", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewHidden", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewRendered", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + on(eventName: "viewShowing", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + on(eventName: "viewShown", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + on(eventName: string, eventHandler: Function): HtmlApplication; + on(events: { [eventName: string]: Function; }): HtmlApplication; + off(eventName: "initialized"): HtmlApplication; + off(eventName: "afterViewSetup"): HtmlApplication; + off(eventName: "beforeViewSetup"): HtmlApplication; + off(eventName: "navigating"): HtmlApplication; + off(eventName: "navigatingBack"): HtmlApplication; + off(eventName: "resolveLayoutController"): HtmlApplication; + off(eventName: "viewDisposed"): HtmlApplication; + off(eventName: "viewDisposing"): HtmlApplication; + off(eventName: "viewHidden"): HtmlApplication; + off(eventName: "viewRendered"): HtmlApplication; + off(eventName: "viewShowing"): HtmlApplication; + off(eventName: "viewShown"): HtmlApplication; + off(eventName: string): HtmlApplication; + off(eventName: "initialized", eventHandler: () => void): HtmlApplication; + off(eventName: "afterViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "beforeViewSetup", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "navigating", eventHandler: (e: { + currentUri: string; + uri: string; + cancel: boolean; + options: { + root: boolean; + target: string; + direction: string; + rootInDetailPane: boolean; + modal: boolean; + }; + }) => void): HtmlApplication; + off(eventName: "navigatingBack", eventHandler: (e: { + cancel: boolean; + isHardwareButton: boolean; + }) => void): HtmlApplication; + off(eventName: "resolveLayoutController", eventHandler: (e: { + viewInfo: Object; + layoutController: Object; + availableLayoutControllers: Array; + }) => void): HtmlApplication; + off(eventName: "viewDisposed", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewDisposing", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewHidden", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewRendered", eventHandler: (e: { + viewInfo: Object; + }) => void): HtmlApplication; + off(eventName: "viewShowing", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + off(eventName: "viewShown", eventHandler: (e: { + viewInfo: Object; + direction: string; + }) => void): HtmlApplication; + off(eventName: string, eventHandler: Function): HtmlApplication; + } + } +} +declare module DevExpress.viz.core { + /** + * Applies a theme for the entire page with several DevExtreme visualization widgets. + * @deprecated Use the DevExpress.viz.currentTheme(theme) method instead. + */ + export function currentTheme(theme: string): void; + /** + * Applies a new theme (with the color scheme defined separately) for the entire page with several DevExtreme visualization widgets. + * @deprecated Use the DevExpress.viz.currentTheme(platform, colorScheme) method instead. + */ + export function currentTheme(platform: string, colorScheme: string): void; + /** + * Registers a new theme based on the existing one. + * @deprecated Use the DevExpress.viz.registerTheme(customTheme, baseTheme) method instead. + */ + export function registerTheme(customTheme: Object, baseTheme: string): void; + /** + * Applies a predefined or registered custom palette to all visualization widgets at once. + * @deprecated Use the DevExpress.viz.currentPalette(paletteName) method instead. + */ + export function currentPalette(paletteName: string): void; + /** + * Obtains the color sets of a predefined or registered palette. + * @deprecated Use the DevExpress.viz.getPalette(paletteName) method instead. + */ + export function getPalette(paletteName: string): Object; + /** + * Registers a new palette. + * @deprecated Use the DevExpress.viz.registerPalette(paletteName, palette) method instead. + */ + export function registerPalette(paletteName: string, palette: Object): void; + export interface Border { + /** Sets a border color for a selected series. */ + color?: string; + /** Sets border visibility for a selected series. */ + visible?: boolean; + /** Sets a border width for a selected series. */ + width?: number; + } + export interface DashedBorder extends Border { + /** Specifies a dash style for the border of a selected series point. */ + dashStyle?: string; + } + export interface DashedBorderWithOpacity extends DashedBorder { + /** Specifies the opacity of the tooltip's border. */ + opacity?: number; + } + export interface Font { + /** Specifies the font color for a strip label. */ + color?: string; + /** Specifies the font family for a strip label. */ + family?: string; + /** Specifies the font opacity for a strip label. */ + opacity?: number; + /** Specifies the font size for a strip label. */ + size?: any; + /** Specifies the font weight for the text displayed in strips. */ + weight?: number; + } + export interface Hatching { + /** Specifies how to apply hatching to highlight a selected series. */ + direction?: string; + /** Specifies the opacity of hatching lines. */ + opacity?: number; + /** Specifies the distance between hatching lines in pixels. */ + step?: number; + /** Specifies the width of hatching lines in pixels. */ + width?: number; + } + export interface Margins { + /** Specifies the legend's bottom margin in pixels. */ + bottom?: number; + /** Specifies the legend's left margin in pixels. */ + left?: number; + /** Specifies the legend's right margin in pixels. */ + right?: number; + /** Specifies the legend's bottom margin in pixels. */ + top?: number; + } + export interface Size { + /** Specifies the width of the widget. */ + width?: number; + /** Specifies the height of the widget. */ + height?: number; + } + export interface Tooltip { + /** Specifies the length of the tooltip's arrow in pixels. */ + arrowLength?: number; + /** Specifies the appearance of the tooltip's border. */ + border?: viz.core.DashedBorderWithOpacity; + /** Specifies a color for the tooltip. */ + color?: string; + /** Specifies the z-index for tooltips. */ + zIndex?: number; + /** Specifies text and appearance of a set of tooltips. */ + customizeTooltip?: (arg: Object) => { color?: string; text?: string }; + /** Specifies whether or not the tooltip is enabled. */ + enabled?: boolean; + /** Specifies font options for the text displayed by the tooltip. */ + font?: Font; + /** Specifies a format for the text displayed by the tooltip. */ + format?: string; + /** Specifies the opacity of a tooltip. */ + opacity?: number; + /** Specifies a distance from the tooltip's left/right boundaries to the inner text in pixels. */ + paddingLeftRight?: number; + /** Specifies a distance from the tooltip's top/bottom boundaries to the inner text in pixels. */ + paddingTopBottom?: number; + /** Specifies a precision for formatted values displayed by the tooltip. */ + precision?: number; + /** Specifies options of the tooltip's shadow. */ + shadow?: { + /** Specifies the blur distance of the tooltip's shadow. */ + blur?: number; + /** Specifies the color of the tooltip's shadow. */ + color?: string; + /** Specifies the horizontal offset of the tooltip's shadow relative to the tooltip in pixels. */ + offsetX?: number; + /** Specifies the vertical offset of the tooltip's shadow relative to the tooltip in pixels. */ + offsetY?: number; + /** Specifies the opacity of the tooltip's shadow. */ + opacity?: number; + }; + } + export interface Animation { + /** Determines how long animation runs. */ + duration?: number; + /** Specifies the animation easing mode. */ + easing?: string; + /** Indicates whether or not animation is enabled. */ + enabled?: boolean; + } + export interface LoadingIndicator { + /** Specifies a color for the loading indicator background. */ + backgroundColor?: string; + /** Specifies font options for the loading indicator text. */ + font?: viz.core.Font; + /** Specifies whether to show the loading indicator or not. */ + show?: boolean; + /** Specifies a text to be displayed by the loading indicator. */ + text?: string; + } + export interface LegendBorder extends viz.core.DashedBorderWithOpacity { + /** Specifies a radius for the corners of the legend border. */ + cornerRadius?: number; + } + export interface BaseLegend { + /** Specifies the color of the legend's background. */ + backgroundColor?: string; + /** Specifies legend border settings. */ + border?: viz.core.LegendBorder; + /** Specifies how many columns must be taken to arrange legend items. */ + columnCount?: number; + /** Specifies the spacing between a pair of neighboring legend columns in pixels. */ + columnItemSpacing?: number; + /** Specifies font options for legend items. */ + font?: viz.core.Font; + /** Specifies the legend's position on the map. */ + horizontalAlignment?: string; + /** Specifies the alignment of legend items. */ + itemsAlignment?: string; + /** Specifies the position of text relative to the item marker. */ + itemTextPosition?: string; + /** Specifies the distance between the legend and the container borders in pixels. */ + margin?: viz.core.Margins; + /** Specifies the size of item markers in the legend in pixels. */ + markerSize?: number; + /** Specifies whether to arrange legend items horizontally or vertically. */ + orientation?: string; + /** Specifies the spacing between the legend left/right border and legend items in pixels. */ + paddingLeftRight?: number; + /** Specifies the spacing between the legend top/bottom border and legend items in pixels. */ + paddingTopBottom?: number; + /** Specifies how many rows must be taken to arrange legend items. */ + rowCount?: number; + /** Specifies the spacing between a pair of neighboring legend rows in pixels. */ + rowItemSpacing?: number; + /** Specifies the legend's position on the map. */ + verticalAlignment?: string; + /** Specifies whether or not the legend is visible on the map. */ + visible?: boolean; + } + export interface BaseWidgetOptions { + drawn?: (widget: Object) => void; + /** A handler for the drawn event. */ + onDrawn?: (e: { + component: BaseWidget; + element: Element; + }) => void; + incidentOccured?: (incidentInfo: { + id: string; + type: string; + args: any; + text: string; + widget: string; + version: string; + }) => void; + /** A handler for the incidentOccurred event. */ + onIncidentOccurred?: ( + component: BaseWidget, + element: Element, + target: { + id: string; + type: string; + args: any; + text: string; + widget: string; + version: string; + } + ) => void; + /** Notifies a widget that it is embedded into an HTML page that uses a path modifier. */ + pathModified?: boolean; + /** Specifies whether or not the widget supports right-to-left representation. */ + rtlEnabled?: boolean; + /** Sets the name of the theme to be used in the widget. */ + theme?: string; + } + /** This section describes options and methods that are common to all widgets. */ + export class BaseWidget extends DOMComponent { + /** Returns the widget's SVG markup. */ + svg(): string; + } +} +declare module DevExpress.viz.charts { + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface BaseSeries { + /** Provides information about the state of the series object. */ + fullState: number; + /** Returns the type of the series. */ + type: string; + /** Unselects all the selected points of the series. The points are displayed in an initial style. */ + clearSelection(): void; + /** Gets the color of a particular series. */ + getColor(): string; + /** + * Gets a point from the series point collection based on the specified argument. + * @deprecated getPointsByArg(pointArg).md + */ + getPointByArg(pointArg: any): Object; + /** Gets points from the series point collection based on the specified argument. */ + getPointsByArg(pointArg: any): Array; + /** Gets a point from the series point collection based on the specified point position. */ + getPointByPos(positionIndex: number): Object; + /** Selects the series. The series is displayed in a 'selected' style until another series is selected or the current series is deselected programmatically. */ + select(): void; + /** Selects the specified point. The point is displayed in a 'selected' style. */ + selectPoint(point: BasePoint): void; + /** Deselects the specified point. The point is displayed in an initial style. */ + deselectPoint(point: BasePoint): void; + /** Returns an array of all points in the series. */ + getAllPoints(): Array; + /** Returns visible series points. */ + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface BasePoint { + /** Provides information about the state of the point object. */ + fullState: number; + /** Returns the point's argument value that was set in the data source. */ + originalArgument: any; + /** Returns the point's value that was set in the data source. */ + originalValue: any; + /** Returns the tag of the point. */ + tag: string; + /** Deselects the point. */ + clearSelection(): void; + /** Gets the color of a particular point. */ + getColor(): string; + /** Hides the tooltip of the point. */ + hideTooltip(): void; + /** Provides information about the hover state of a point. */ + isHovered(): any; + /** Provides information about the selection state of a point. */ + isSelected(): any; + /** Selects the point. The point is displayed in a 'selected' style until another point is selected or the current point is deselected programmatically. */ + select(): void; + /** Shows the tooltip of the point. */ + showTooltip(): void; + /** Allows you to obtain the label of a series point. */ + getLabel(): any; + /** Returns the series object to which the point belongs. */ + series: BaseSeries; + } + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface ChartSeries extends BaseSeries { + /** Returns the name of the series pane. */ + pane: string; + /** Returns the name of the value axis of the series. */ + axis: string; + /** Returns the name of the series. */ + name: string; + /** Returns the tag of the series. */ + tag: string; + /** Hides a series. */ + hide(): void; + /** Provides information about the hover state of a series. */ + isHovered(): any; + /** Provides information about the selection state of a series. */ + isSelected(): any; + /** Provides information about the visibility state of a series. */ + isVisible(): boolean; + /** Makes a particular series visible. */ + show(): void; + selectPoint(point: ChartPoint): void; + deselectPoint(point: ChartPoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface ChartPoint extends BasePoint { + /** Contains the close value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalCloseValue: any; + /** Contains the high value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalHighValue: any; + /** Contains the low value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalLowValue: any; + /** Contains the first value of the point. This field is useful for points belonging to a series of the range area or range bar type only. */ + originalMinValue: any; + /** Contains the open value of the point. This field is useful for points belonging to a series of the candle stick or stock type only. */ + originalOpenValue: any; + /** Contains the size of the bubble as it was set in the data source. This field is useful for points belonging to a series of the bubble type only. */ + size: any; + /** Gets the parameters of the point's minimum bounding rectangle (MBR). */ + getBoundingRect(): { x: number; y: number; width: number; height: number; }; + series: ChartSeries; + } + /** This section describes the methods that can be used in code to manipulate the Label object. */ + export interface Label { + /** Gets the parameters of the label's minimum bounding rectangle (MBR). */ + getBoundingRect(): { x: number; y: number; width: number; height: number; }; + /** Hides the point label. */ + hide(): void; + /** Shows the point label. */ + show(): void; + } + export interface PieSeries extends BaseSeries { + selectPoint(point: PiePoint): void; + deselectPoint(point: PiePoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface PiePoint extends BasePoint { + /** Gets the percentage value of the specific point. */ + percent: any; + /** Provides information about the visibility state of a point. */ + isVisible(): boolean; + /** Makes a specific point visible. */ + show(): void; + /** Hides a specific point. */ + hide(): void; + series: PieSeries; + } + /** This section describes the fields and methods that can be used in code to manipulate the Series object. */ + export interface PolarSeries extends BaseSeries { + /** Returns the name of the value axis of the series. */ + axis: string; + /** Returns the name of the series. */ + name: string; + /** Returns the tag of the series. */ + tag: string; + /** Hides a series. */ + hide(): void; + /** Provides information about the hover state of a series. */ + isHovered(): any; + /** Provides information about the selection state of a series. */ + isSelected(): any; + /** Provides information about the visibility state of a series. */ + isVisible(): boolean; + /** Makes a particular series visible. */ + show(): void; + selectPoint(point: PolarPoint): void; + deselectPoint(point: PolarPoint): void; + getAllPoints(): Array; + getVisiblePoints(): Array; + } + /** This section describes the methods that can be used in code to manipulate the Point object. */ + export interface PolarPoint extends BasePoint { + series: PolarSeries; + } + export interface Strip { + /** Specifies a color for a strip. */ + color?: string; + /** An object that defines the label configuration options of a strip. */ + label?: { + /** Specifies the text displayed in a strip. */ + text?: string; + }; + /** Specifies a start value for a strip. */ + startValue?: any; + /** Specifies an end value for a strip. */ + endValue?: any; + } + export interface BaseSeriesConfigLabel { + /** Specifies a format for arguments displayed by point labels. */ + argumentFormat?: string; + /** Specifies a precision for formatted point arguments displayed in point labels. */ + argumentPrecision?: number; + /** Specifies a background color for point labels. */ + backgroundColor?: string; + /** Specifies border options for point labels. */ + border?: viz.core.DashedBorder; + /** Specifies connector options for series point labels. */ + connector?: { + /** Specifies the color of label connectors. */ + color?: string; + /** Indicates whether or not label connectors are visible. */ + visible?: boolean; + /** Specifies the width of label connectors. */ + width?: number; + }; + /** Specifies a callback function that returns the text to be displayed by point labels. */ + customizeText?: (pointInfo: Object) => string; + /** Specifies font options for the text displayed in point labels. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed by point labels. */ + format?: string; + position?: string; + /** Specifies a precision for formatted point values displayed in point labels. */ + precision?: number; + /** Specifies the angle used to rotate point labels from their initial position. */ + rotationAngle?: number; + /** Specifies the visibility of point labels. */ + visible?: boolean; + } + export interface SeriesConfigLabel extends BaseSeriesConfigLabel { + /** Specifies whether or not to show a label when the point has a zero value. */ + showForZeroValues?: boolean; + } + export interface ChartSeriesConfigLabel extends SeriesConfigLabel { + /** Specifies how to align point labels relative to the corresponding data points that they represent. */ + alignment?: string; + /** Specifies how to shift point labels horizontally from their initial positions. */ + horizontalOffset?: number; + /** Specifies how to shift point labels vertically from their initial positions. */ + verticalOffset?: number; + /** Specifies a precision for the percentage values displayed in the labels of a full-stacked-like series. */ + percentPrecision?: number; + } + export interface BaseCommonSeriesConfig { + /** Specifies the data source field that provides arguments for series points. */ + argumentField?: string; + axis?: string; + /** An object defining the label configuration options for a series in the dxChart widget. */ + label?: ChartSeriesConfigLabel; + /** Specifies border options for point labels. */ + border?: viz.core.DashedBorder; + /** Specifies a series color. */ + color?: string; + /** Specifies the dash style of the series' line. */ + dashStyle?: string; + hoverMode?: string; + /** An object defining configuration options for a hovered series. */ + hoverStyle?: { + /** An object defining the border options for a hovered series. */ + border?: viz.core.DashedBorder; + /**

Sets a color for a series when it is hovered over.

*/ + color?: string; + /** Specifies the dash style for the line in a hovered series. */ + dashStyle?: string; + /** Specifies the hatching options to be applied when a series is hovered over. */ + hatching?: viz.core.Hatching; + /** Specifies the width of a line in a hovered series. */ + width?: number; + }; + /** Specifies whether a chart ignores null data points or not. */ + ignoreEmptyPoints?: boolean; + /** Specifies how many points are acceptable to be in a series to display all labels for these points. Otherwise, the labels will not be displayed. */ + maxLabelCount?: number; + /** Specifies the minimal length of a displayed bar in pixels. */ + minBarSize?: number; + /** Specifies opacity for a series. */ + opacity?: number; + /** Specifies the series elements to highlight when the series is selected. */ + selectionMode?: string; + /** An object defining configuration options for a selected series. */ + selectionStyle?: { + /** An object defining the border options for a selected series. */ + border?: viz.core.DashedBorder; + /** Sets a color for a series when it is selected. */ + color?: string; + /** Specifies the dash style for the line in a selected series. */ + dashStyle?: string; + /** Specifies the hatching options to be applied when a series is selected. */ + hatching?: viz.core.Hatching; + /** Specifies the width of a line in a selected series. */ + width?: number; + }; + /** Specifies whether or not to show the series in the chart's legend. */ + showInLegend?: boolean; + /** Specifies the name of the stack where the values of the _stackedBar_ series must be located. */ + stack?: string; + /** Specifies the name of the data source field that provides data about a point. */ + tagField?: string; + /** Specifies the data source field that provides values for series points. */ + valueField?: string; + /** Specifies the visibility of a series. */ + visible?: boolean; + /** Specifies a line width. */ + width?: number; + /** Configures error bars. */ + valueErrorBar?: { + /** Specifies whether error bars must be displayed in full or partially. */ + displayMode?: string; + /** Specifies the data field that provides data for low error values. */ + lowValueField?: string; + /** Specifies the data field that provides data for high error values. */ + highValueField?: string; + /** Specifies how error bar values must be calculated. */ + type?: string; + /** Specifies the value to be used for generating error bars. */ + value?: number; + /** Specifies the color of error bars. */ + color?: string; + /** Specifies the opacity of error bars. */ + opacity?: number; + /** Specifies the length of the lines that indicate the error bar edges. */ + edgeLength?: number; + /** Specifies the width of the error bar line. */ + lineWidth?: number; + }; + } + export interface CommonPointOptions { + /** Specifies border options for points in the line and area series. */ + border?: viz.core.Border; + /** Specifies the points color. */ + color?: string; + /** Specifies what series points to highlight when a point is hovered over. */ + hoverMode?: string; + /** An object defining configuration options for a hovered point. */ + hoverStyle?: { + /** An object defining the border options for a hovered point. */ + border?: viz.core.Border; + /** Sets a color for a point when it is hovered over. */ + color?: string; + /** Specifies the diameter of a hovered point in the series that represents data points as symbols (not as bars for instance). */ + size?: number; + }; + /** Specifies what series points to highlight when a point is selected. */ + selectionMode?: string; + /** An object defining configuration options for a selected point. */ + selectionStyle?: { + /** An object defining the border options for a selected point. */ + border?: viz.core.Border; + /**

Sets a color for a point when it is selected.

*/ + color?: string; + /** Specifies the diameter of a selected point in the series that represents data points as symbols (not as bars for instance). */ + size?: number; + }; + /** Specifies the point diameter in pixels for those series that represent data points as symbols (not as bars for instance). */ + size?: number; + /** Specifies a symbol for presenting points of the line and area series. */ + symbol?: string; + visible?: boolean; + } + export interface ChartCommonPointOptions extends CommonPointOptions { + /** An object specifying the parameters of an image that is used as a point marker. */ + image?: { + /** Specifies the height of an image that is used as a point marker. */ + height?: any; + /** Specifies a URL leading to the image to be used as a point marker. */ + url?: any; + /** Specifies the width of an image that is used as a point marker. */ + width?: any; + }; + } + export interface PolarCommonPointOptions extends CommonPointOptions { + /** An object specifying the parameters of an image that is used as a point marker. */ + image?: { + /** Specifies the height of an image that is used as a point marker. */ + height?: number; + /** Specifies a URL leading to the image to be used as a point marker. */ + url?: string; + /** Specifies the width of an image that is used as a point marker. */ + width?: number; + }; + } + /** An object that defines configuration options for chart series. */ + export interface CommonSeriesConfig extends BaseCommonSeriesConfig { + /** Specifies the data source field that provides a 'close' value for a _candleStick_ or _stock_ series. */ + closeValueField?: string; + /** Specifies a radius for bar corners. */ + cornerRadius?: number; + /** Specifies the data source field that provides a 'high' value for a _candleStick_ or _stock_ series. */ + highValueField?: string; + /** Specifies the color for the body (rectangle) of a _candleStick_ series. */ + innerColor?: string; + /** Specifies the data source field that provides a 'low' value for a _candleStick_ or _stock_ series. */ + lowValueField?: string; + /** Specifies the data source field that provides an 'open' value for a _candleStick_ or _stock_ series. */ + openValueField?: string; + /** Specifies the pane that will be used to display a series. */ + pane?: string; + /** An object defining configuration options for points in line-, scatter- and area-like series. */ + point?: ChartCommonPointOptions; + /** Specifies the data source field that provides values for one end of a range series. To set the data source field for the other end of the range series, use the rangeValue2Field property. */ + rangeValue1Field?: string; + /** Specifies the data source field that provides values for the second end of a range series. To set the data source field for the other end of the range series, use the rangeValue1Field property. */ + rangeValue2Field?: string; + /** Specifies reduction options for the stock or candleStick series. */ + reduction?: { + /** Specifies a color for the points whose reduction level price is lower in comparison to the value in the previous point. */ + color?: string; + /** Specifies for which price level (open, high, low or close) to enable reduction options in the series. */ + level?: string; + }; + /** Specifies the data source field that defines the size of bubbles. */ + sizeField?: string; + } + export interface CommonSeriesSettings extends CommonSeriesConfig { + /**

An object that specifies configuration options for all series of the area type in the chart.

*/ + area?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _bar_ type in the chart. */ + bar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the bubble type in the chart. */ + bubble?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _candleStick_ type in the chart. */ + candlestick?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _fullStackedArea_ type in the chart. */ + fullstackedarea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Full-Stacked Spline Area type in the chart. */ + fullstackedsplinearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _fullStackedBar_ type in the chart. */ + fullstackedbar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _fullStackedLine_ type in the chart. */ + fullstackedline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Full-Stacked Spline type in the chart. */ + fullstackedspline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _line_ type in the chart. */ + line?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _rangeArea_ type in the chart. */ + rangearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _rangeBar_ type in the chart. */ + rangebar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _scatter_ type in the chart. */ + scatter?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _spline_ type in the chart. */ + spline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _splineArea_ type in the chart. */ + splinearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedArea_ type in the chart. */ + stackedarea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Stacked Spline Area type in the chart. */ + stackedsplinearea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedBar_ type in the chart. */ + stackedbar?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedLine_ type in the chart. */ + stackedline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the Stacked Spline type in the chart. */ + stackedspline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stepArea_ type in the chart. */ + steparea?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stepLine_ type in the chart. */ + stepline?: CommonSeriesConfig; + /** An object that specifies configuration options for all series of the _stock_ type in the chart. */ + stock?: CommonSeriesConfig; + /** Sets a series type. */ + type?: string; + } + export interface SeriesConfig extends CommonSeriesConfig { + /** Specifies the name that identifies the series. */ + name?: string; + /** Specifies data about a series. */ + tag?: any; + /** Sets the series type. */ + type?: string; + } + /** An object that defines configuration options for polar chart series. */ + export interface CommonPolarSeriesConfig extends BaseCommonSeriesConfig { + /** Specifies whether or not to close the chart by joining the end point with the first point. */ + closed?: boolean; + label?: SeriesConfigLabel; + point?: PolarCommonPointOptions; + } + export interface CommonPolarSeriesSettings extends CommonPolarSeriesConfig { + /** An object that specifies configuration options for all series of the area type in the chart. */ + area?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _bar_ type in the chart. */ + bar?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _line_ type in the chart. */ + line?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _scatter_ type in the chart. */ + scatter?: CommonPolarSeriesConfig; + /** An object that specifies configuration options for all series of the _stackedBar_ type in the chart. */ + stackedbar?: CommonPolarSeriesConfig; + /** Sets a series type. */ + type?: string; + } + export interface PolarSeriesConfig extends CommonPolarSeriesConfig { + /** Specifies the name that identifies the series. */ + name?: string; + /** Specifies data about a series. */ + tag?: any; + /** Sets the series type. */ + type?: string; + } + export interface PieSeriesConfigLabel extends BaseSeriesConfigLabel { + /** Specifies how to shift labels from their initial position in a radial direction in pixels. */ + radialOffset?: number; + /** Specifies a precision for the percentage values displayed in labels. */ + percentPrecision?: number; + } + /** An object that defines configuration options for chart series. */ + export interface CommonPieSeriesConfig { + /** Specifies the data source field that provides arguments for series points. */ + argumentField?: string; + /** Specifies the required type for series arguments. */ + argumentType?: string; + /** An object defining the series border configuration options. */ + border?: viz.core.DashedBorder; + /** Specifies a series color. */ + color?: string; + /** Specifies the chart elements to highlight when a series is hovered over. */ + hoverMode?: string; + /** An object defining configuration options for a hovered series. */ + hoverStyle?: { + /** An object defining the border options for a hovered series. */ + border?: viz.core.DashedBorder; + /** Sets a color for the series when it is hovered over. */ + color?: string; + /** Specifies the hatching options to be applied when a point is hovered over. */ + hatching?: viz.core.Hatching; + }; + /** Specifies the fraction of the inner radius relative to the total radius in the series of the 'doughnut' type. */ + innerRadius?: number; + /** An object defining the label configuration options. */ + label?: PieSeriesConfigLabel; + /** Specifies how many points are acceptable to be in a series to display all labels for these points. Otherwise, the labels will not be displayed. */ + maxLabelCount?: number; + /** Specifies a minimal size of a displayed pie segment. */ + minSegmentSize?: number; + /** Specifies the direction in which the dxPieChart's series points are located. */ + segmentsDirection?: string; + /**

Specifies the chart elements to highlight when the series is selected.

*/ + selectionMode?: string; + /** An object defining configuration options for the series when it is selected. */ + selectionStyle?: { + /** An object defining the border options for a selected series. */ + border?: viz.core.DashedBorder; + /** Sets a color for a series when it is selected. */ + color?: string; + /** Specifies the hatching options to be applied when a point is selected. */ + hatching?: viz.core.Hatching; + }; + /** Specifies chart segment grouping options. */ + smallValuesGrouping?: { + /** Specifies the name of the grouped chart segment. This name represents the segment in the chart legend. */ + groupName?: string; + /** Specifies the segment grouping mode. */ + mode?: string; + /** Specifies a threshold for segment values. */ + threshold?: number; + /** Specifies how many segments must not be grouped. */ + topCount?: number; + }; + /** Specifies a start angle for a pie chart in arc degrees. */ + startAngle?: number; + /**

Specifies the name of the data source field that provides data about a point.

*/ + tagField?: string; + /** Specifies the data source field that provides values for series points. */ + valueField?: string; + } + export interface PieSeriesConfig extends CommonPieSeriesConfig { + /** Sets the series type. */ + type?: string; + } + export interface SeriesTemplate { + /** Specifies a callback function that returns a series object with individual series settings. */ + customizeSeries?: (seriesName: string) => SeriesConfig; + /** Specifies a data source field that represents the series name. */ + nameField?: string; + } + export interface PolarSeriesTemplate { + /** Specifies a callback function that returns a series object with individual series settings. */ + customizeSeries?: (seriesName: string) => PolarSeriesConfig; + /** Specifies a data source field that represents the series name. */ + nameField?: string; + } + export interface ChartCommonConstantLineLabel { + /** Specifies font options for a constant line label. */ + font?: viz.core.Font; + /** Specifies the position of the constant line label relative to the chart plot. */ + position?: string; + /** Indicates whether or not to display labels for the axis constant lines. */ + visible?: boolean; + } + export interface PolarCommonConstantLineLabel { + /** Indicates whether or not to display labels for the axis constant lines. */ + visible?: boolean; + /** Specifies font options for a constant line label. */ + font?: viz.core.Font; + } + export interface ConstantLineStyle { + /** Specifies a color for a constant line. */ + color?: string; + /** Specifies a dash style for a constant line. */ + dashStyle?: string; + /** Specifies a constant line width in pixels. */ + width?: number; + } + export interface ChartCommonConstantLineStyle extends ConstantLineStyle { + /** An object defining constant line label options. */ + label?: ChartCommonConstantLineLabel; + /** Specifies the space between the constant line label and the left/right side of the constant line. */ + paddingLeftRight?: number; + /** Specifies the space between the constant line label and the top/bottom side of the constant line. */ + paddingTopBottom?: number; + } + export interface PolarCommonConstantLineStyle extends ConstantLineStyle { + /** An object defining constant line label options. */ + label?: PolarCommonConstantLineLabel; + } + export interface CommonAxisLabel { + /** Specifies font options for axis labels. */ + font?: viz.core.Font; + /** Specifies the spacing between an axis and its labels in pixels. */ + indentFromAxis?: number; + /** Indicates whether or not axis labels are visible. */ + visible?: boolean; + } + export interface ChartCommonAxisLabel extends CommonAxisLabel { + /** Specifies the label's position relative to the tick (grid line). */ + alignment?: string; + /** Specifies the overlap resolving algorithm to be applied to axis labels. */ + overlappingBehavior?: { + /** Specifies how to arrange axis labels. */ + mode?: string; + /** Specifies the angle used to rotate axis labels. */ + rotationAngle?: number; + /** Specifies the spacing that must be set between staggered rows when the 'stagger' algorithm is applied. */ + staggeringSpacing?: number; + }; + } + export interface PolarCommonAxisLabel extends CommonAxisLabel { + /** Specifies the overlap resolving algorithm to be applied to axis labels. */ + overlappingBehavior?: string; + } + export interface CommonAxisTitle { + /** Specifies font options for an axis title. */ + font?: viz.core.Font; + /** Specifies a margin for an axis title in pixels. */ + margin?: number; + } + export interface BaseCommonAxisSettings { + /** Specifies the color of the line that represents an axis. */ + color?: string; + /** Specifies whether ticks/grid lines of a discrete axis are located between labels or cross the labels. */ + discreteAxisDivisionMode?: string; + /** An object defining the configuration options for the grid lines of an axis in the dxPolarChart widget. */ + grid?: { + /** Specifies a color for grid lines. */ + color?: string; + /** Specifies an opacity for grid lines. */ + opacity?: number; + /** Indicates whether or not the grid lines of an axis are visible. */ + visible?: boolean; + /** Specifies the width of grid lines. */ + width?: number; + }; + /** Specifies the options of the minor grid. */ + minorGrid?: { + /** Specifies a color for the lines of the minor grid. */ + color?: string; + /** Specifies an opacity for the lines of the minor grid. */ + opacity?: number; + /** Indicates whether the minor grid is visible or not. */ + visible?: boolean; + /** Specifies a width for the lines of the minor grid. */ + width?: number; + }; + /** Indicates whether or not an axis is inverted. */ + inverted?: boolean; + /** Specifies the opacity of the line that represents an axis. */ + opacity?: number; + /** Indicates whether or not to set ticks/grid lines of a continuous axis of the 'date-time' type at the beginning of each date-time interval. */ + setTicksAtUnitBeginning?: boolean; + /** An object defining the configuration options for axis ticks. */ + tick?: { + /** Specifies ticks color. */ + color?: string; + /** Specifies tick opacity. */ + opacity?: number; + /** Indicates whether or not ticks are visible on an axis. */ + visible?: boolean; + }; + /** Specifies the options of the minor ticks. */ + minorTick?: { + /** Specifies a color for the minor ticks. */ + color?: string; + /** Specifies an opacity for the minor ticks. */ + opacity?: number; + /** Indicates whether or not the minor ticks are displayed on an axis. */ + visible?: boolean; + }; + /** Indicates whether or not the line that represents an axis in a chart is visible. */ + visible?: boolean; + /** Specifies the width of the line that represents an axis in the chart. */ + width?: number; + } + export interface ChartCommonAxisSettings extends BaseCommonAxisSettings { + /** Specifies the appearance of all the widget's constant lines. */ + constantLineStyle?: ChartCommonConstantLineStyle; + /** An object defining the label configuration options that are common for all axes in the dxChart widget. */ + label?: ChartCommonAxisLabel; + /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ + maxValueMargin?: number; + /** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */ + minValueMargin?: number; + /** Specifies, in pixels, the space reserved for an axis. */ + placeholderSize?: number; + /** An object defining configuration options for strip style. */ + stripStyle?: { + /** An object defining the configuration options for a strip label style. */ + label?: { + /** Specifies font options for a strip label. */ + font?: viz.core.Font; + /** Specifies the label's position on a strip. */ + horizontalAlignment?: string; + /** Specifies a label's position on a strip. */ + verticalAlignment?: string; + }; + /** Specifies the spacing, in pixels, between the left/right strip border and the strip label. */ + paddingLeftRight?: number; + /** Specifies the spacing, in pixels, between the top/bottom strip borders and the strip label. */ + paddingTopBottom?: number; + }; + /** An object defining the title configuration options that are common for all axes in the dxChart widget. */ + title?: CommonAxisTitle; + /** Indicates whether or not to display series with indents from axis boundaries. */ + valueMarginsEnabled?: boolean; + } + export interface PolarCommonAxisSettings extends BaseCommonAxisSettings { + /** Specifies the appearance of all the widget's constant lines. */ + constantLineStyle?: PolarCommonConstantLineStyle; + /** An object defining the label configuration options that are common for all axes in the dxPolarChart widget. */ + label?: PolarCommonAxisLabel; + /** An object defining configuration options for strip style. */ + stripStyle?: { + /** An object defining the configuration options for a strip label style. */ + label?: { + /** Specifies font options for a strip label. */ + font?: viz.core.Font; + }; + }; + } + export interface ChartConstantLineLabel extends ChartCommonConstantLineLabel { + /** Specifies the horizontal alignment of a constant line label. */ + horizontalAlignment?: string; + /** Specifies the vertical alignment of a constant line label. */ + verticalAlignment?: string; + /** Specifies the text to be displayed in a constant line label. */ + text?: string; + } + export interface PolarConstantLineLabel extends PolarCommonConstantLineLabel { + /** Specifies the text to be displayed in a constant line label. */ + text?: string; + } + export interface AxisLabel { + /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis. */ + customizeHint?: (argument: { value: any; valueText: string }) => string; + /** Specifies a callback function that returns the text to be displayed in value axis labels. */ + customizeText?: (argument: { value: any; valueText: string }) => string; + /** Specifies a format for the text displayed by axis labels. */ + format?: string; + /** Specifies a precision for the formatted value displayed in the axis labels. */ + precision?: number; + } + export interface ChartAxisLabel extends ChartCommonAxisLabel, AxisLabel { } + export interface PolarAxisLabel extends PolarCommonAxisLabel, AxisLabel { } + export interface AxisTitle extends CommonAxisTitle { + /** Specifies the text for the value axis title. */ + text?: string; + } + export interface ChartConstantLineStyle extends ChartCommonConstantLineStyle { + /** An object defining constant line label options. */ + label?: ChartConstantLineLabel; + } + export interface ChartConstantLine extends ChartConstantLineStyle { + /** An object defining constant line label options. */ + label?: ChartConstantLineLabel; + /** Specifies a value to be displayed by a constant line. */ + value?: any; + } + export interface PolarConstantLine extends PolarCommonConstantLineStyle { + /** An object defining constant line label options. */ + label?: PolarConstantLineLabel; + /** Specifies a value to be displayed by a constant line. */ + value?: any; + } + export interface Axis { + /** Specifies a coefficient for dividing the value axis. */ + axisDivisionFactor?: number; + /** Specifies the order in which discrete values are arranged on the value axis. */ + categories?: Array; + /** Specifies the value to be raised to a power when generating ticks for a logarithmic axis. */ + logarithmBase?: number; + /** Specifies an interval between axis ticks/grid lines. */ + tickInterval?: any; + /** Specifies the interval between minor ticks. */ + minorTickInterval?: any; + /** Specifies the number of minor ticks between two neighboring major ticks. */ + minorTickCount?: number; + /** Specifies the required type of the value axis. */ + type?: string; + /** Specifies the pane on which the current value axis will be displayed. */ + pane?: string; + /** Specifies options for value axis strips. */ + strips?: Array; + } + export interface ChartAxis extends ChartCommonAxisSettings, Axis { + /** Defines an array of the value axis constant lines. */ + constantLines?: Array; + /** Specifies the appearance options for the constant lines of the value axis. */ + constantLineStyle?: ChartCommonConstantLineStyle; + /** Specifies options for value axis labels. */ + label?: ChartAxisLabel; + /** Specifies the maximum value on the value axis. */ + max?: any; + /** Specifies the minimum value on the value axis. */ + min?: any; + /** Specifies the position of the value axis on a chart. */ + position?: string; + /** Specifies the title for a value axis. */ + title?: AxisTitle; + } + export interface PolarAxis extends PolarCommonAxisSettings, Axis { + /** Defines an array of the value axis constant lines. */ + constantLines?: Array; + /** Specifies options for value axis labels. */ + label?: PolarAxisLabel; + } + export interface ArgumentAxis { + /** Specifies the desired type of axis values. */ + argumentType?: string; + /** Specifies the elements that will be highlighted when the argument axis is hovered over. */ + hoverMode?: string; + } + export interface ChartArgumentAxis extends ChartAxis, ArgumentAxis { } + export interface PolarArgumentAxis extends PolarAxis, ArgumentAxis { + /** Specifies a start angle for the argument axis in degrees. */ + startAngle?: number; + /** Specifies whether or not to display the first point at the angle specified by the startAngle option. */ + firstPointOnStartAngle?: boolean; + /** Specifies the period of the argument values in the data source. */ + period?: number; + } + export interface ValueAxis { + /** Specifies the name of the value axis. */ + name?: string; + /** Specifies whether or not to indicate a zero value on the value axis. */ + showZero?: boolean; + /** Specifies the desired type of axis values. */ + valueType?: string; + } + export interface ChartValueAxis extends ChartAxis, ValueAxis { + /** Specifies the spacing, in pixels, between multiple value axes in a chart. */ + multipleAxesSpacing?: number; + /** Specifies the value by which the chart's value axes are synchronized. */ + synchronizedValue?: number; + } + export interface PolarValueAxis extends PolarAxis, ValueAxis { + /** Indicates whether to display series with indents from axis boundaries. */ + valueMarginsEnabled?: boolean; + /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ + maxValueMargin?: number; + /** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */ + minValueMargin?: number; + tick?: { + visible?: boolean; + } + } + export interface CommonPane { + /** Specifies a background color in a pane. */ + backgroundColor?: string; + /** Specifies the border options of a chart's pane. */ + border?: PaneBorder; + } + export interface Pane extends CommonPane { + /** Specifies the name of a pane. */ + name?: string; + } + export interface PaneBorder extends viz.core.DashedBorderWithOpacity { + /** Specifies the bottom border's visibility state in a pane. */ + bottom?: boolean; + /** Specifies the left border's visibility state in a pane. */ + left?: boolean; + /** Specifies the right border's visibility state in a pane. */ + right?: boolean; + /** Specifies the top border's visibility state in a pane. */ + top?: boolean; + } + export interface ChartAnimation extends viz.core.Animation { + /** Specifies the maximum series point count in the chart that the animation supports. */ + maxPointCountSupported?: number; + } + export interface BaseChartTooltip extends viz.core.Tooltip { + /** Specifies a format for arguments of the chart's series points. */ + argumentFormat?: string; + /** Specifies a precision for formatted arguments displayed in tooltips. */ + argumentPrecision?: number; + /** Specifies a precision for a percent value displayed in tooltips for stacked series and dxPieChart series. */ + percentPrecision?: number; + } + export interface BaseChartOptions extends viz.core.BaseWidgetOptions { + /** Specifies adaptive layout options. */ + adaptiveLayout?: { + /** Specifies the width of the widget container that is small enough for the layout to begin adapting. */ + width?: number; + /** Specifies the height of the widget container that is small enough for the layout to begin adapting. */ + height?: number; + /** Specifies whether or not point labels can be hidden when the layout is adapting. */ + keepLabels?: boolean; + }; + /** Specifies animation options. */ + animation?: ChartAnimation; + /** Specifies a callback function that returns an object with options for a specific point label. */ + customizeLabel?: (labelInfo: Object) => Object; + /** Specifies a callback function that returns an object with options for a specific point. */ + customizePoint?: (pointInfo: Object) => Object; + /** Specifies a data source for the chart. */ + dataSource?: any; + done?: Function; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies options of a dxChart's (dxPieChart's) legend. */ + legend?: core.BaseLegend; + /** Specifies the blank space between the chart's extreme elements and the boundaries of the area provided for the widget (see size) in pixels. */ + margin?: viz.core.Margins; + /** Sets the name of the palette to be used in the chart. Alternatively, an array of colors can be set as a custom palette to be used within this chart. */ + palette?: any; + /** A handler for the done event. */ + onDone?: (e: { + component: BaseChart; + element: Element; + }) => void; + /** A handler for the pointClick event. */ + onPointClick?: any; + pointClick?: any; + /** A handler for the pointHoverChanged event. */ + onPointHoverChanged?: (e: { + component: BaseChart; + element: Element; + target: TPoint; + }) => void; + pointHoverChanged?: (point: TPoint) => void; + /** A handler for the pointSelectionChanged event. */ + onPointSelectionChanged?: (e: { + component: BaseChart; + element: Element; + target: TPoint; + }) => void; + pointSelectionChanged?: (point: TPoint) => void; + /** Specifies whether a single point or multiple points can be selected in the chart. */ + pointSelectionMode?: string; + /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ + redrawOnResize?: boolean; + /** Specifies options for the dxChart and dxPieChart widget series. */ + series?: any; + /** Specifies the size of the widget in pixels. */ + size?: viz.core.Size; + /** Specifies a title for the chart. */ + title?: { + /** Specifies font options for the title. */ + font?: viz.core.Font; + /** Specifies the title's horizontal position in the chart. */ + horizontalAlignment?: string; + /** Specifies a title's position on the chart in the vertical direction. */ + verticalAlignment?: string; + /** Specifies the distance between the title and surrounding chart elements in pixels. */ + margin?: viz.core.Margins; + /** Specifies the height of the space reserved for the title. */ + placeholderSize?: number; + /** Specifies a text for the chart's title. */ + text?: string; + }; + /** Specifies tooltip options. */ + tooltip?: BaseChartTooltip; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: BaseChart; + element: Element; + target: BasePoint; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: BaseChart; + element: Element; + target: BasePoint; + }) => void; + tooltipHidden?: (point: TPoint) => void; + tooltipShown?: (point: TPoint) => void; + } + /** A base class for all chart widgets included in the ChartJS library. */ + export class BaseChart extends viz.core.BaseWidget { + /** Deselects the chart's selected series. The series is displayed in an initial style. */ + clearSelection(): void; + /** Gets the current size of the widget. */ + getSize(): { width: number; height: number }; + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Hides all widget tooltips. */ + hideTooltip(): void; + /** Redraws a widget. */ + render(renderOptions?: { + force?: boolean; + animate?: boolean; + asyncSeriesRendering?: boolean; + }): void; + } + export interface AdvancedLegend extends core.BaseLegend { + /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */ + customizeHint?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string; + /**

Specifies a callback function that returns the text to be displayed by legend items.

*/ + customizeText?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string; + /** Specifies what series elements to highlight when a corresponding item in the legend is hovered over. */ + hoverMode?: string; + } + export interface AdvancedOptions extends BaseChartOptions { + /** A handler for the argumentAxisClick event. */ + onArgumentAxisClick?: any; + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** An object providing options for managing data from a data source. */ + dataPrepareSettings?: { + /** Specifies whether or not to validate the values from a data source. */ + checkTypeForAllData?: boolean; + /** Specifies whether or not to convert the values from a data source into the data type of an axis. */ + convertToAxisDataType?: boolean; + /** Specifies how to sort the series points. */ + sortingMethod?: any; + }; + /** A handler for the legendClick event. */ + onLegendClick?: any; + /** A handler for the seriesClick event. */ + onSeriesClick?: any; + /** A handler for the seriesHoverChanged event. */ + onSeriesHoverChanged?: (e: { + component: BaseChart; + element: Element; + target: TSeries; + }) => void; + /** A handler for the seriesSelectionChanged event. */ + onSeriesSelectionChanged?: (e: { + component: BaseChart; + element: Element; + target: TSeries; + }) => void; + /** Specifies whether a single series or multiple series can be selected in the chart. */ + seriesSelectionMode?: string; + /** Specifies how the chart must behave when series point labels overlap. */ + resolveLabelOverlapping?: string; + } + export interface Legend extends AdvancedLegend { + /** Specifies whether the legend is located outside or inside the chart's plot. */ + position?: string; + } + export interface ChartTooltip extends BaseChartTooltip { + /** Specifies whether the tooltip must be located in the center of a bar or on its edge. Applies to the Bar and Bubble series. */ + location?: string; + /** Specifies the kind of information to display in a tooltip. */ + shared?: boolean; + } + export interface dxChartOptions extends AdvancedOptions { + /** Specifies a value indicating whether all bars in a series must have the same width, or may have different widths if any points in other series are missing. */ + equalBarWidth?: any; + adaptiveLayout?: { + keepLabels?: boolean; + }; + /** Indicates whether or not to synchronize value axes when they are displayed on a single pane. */ + synchronizeMultiAxes?: boolean; + /** Specifies whether or not to filter the series points depending on their quantity. */ + useAggregation?: boolean; + /** Indicates whether or not to adjust a value axis to the current minimum and maximum values of a zoomed chart. */ + adjustOnZoom?: boolean; + /** Specifies argument axis options for the dxChart widget. */ + argumentAxis?: ChartArgumentAxis; + argumentAxisClick?: any; + /** An object defining the configuration options that are common for all axes of the dxChart widget. */ + commonAxisSettings?: ChartCommonAxisSettings; + /** An object defining the configuration options that are common for all panes in the dxChart widget. */ + commonPaneSettings?: CommonPane; + /** An object defining the configuration options that are common for all series of the dxChart widget. */ + commonSeriesSettings?: CommonSeriesSettings; + /** An object that specifies the appearance options of the chart crosshair. */ + crosshair?: { + /** Specifies a color for the crosshair lines. */ + color?: string; + /** Specifies a dash style for the crosshair lines. */ + dashStyle?: string; + /** Specifies whether to enable the crosshair or not. */ + enabled?: boolean; + /** Specifies the opacity of the crosshair lines. */ + opacity?: number; + /** Specifies the width of the crosshair lines. */ + width?: number; + /** Specifies the appearance of the horizontal crosshair line. */ + horizontalLine?: CrosshaierWithLabel; + /** Specifies the appearance of the vertical crosshair line. */ + verticalLine?: CrosshaierWithLabel; + /** Specifies the options of the crosshair labels. */ + label?: { + /** Specifies a color for the background of the crosshair labels. */ + backgroundColor?: string; + /** Specifies whether the crosshair labels are visible or not. */ + visible?: boolean; + /** Specifies font options for the text of the crosshair labels. */ + font?: viz.core.Font; + } + }; + /** Specifies a default pane for the chart's series. */ + defaultPane?: string; + /** Specifies a coefficient determining the diameter of the largest bubble. */ + maxBubbleSize?: number; + /** Specifies the diameter of the smallest bubble measured in pixels. */ + minBubbleSize?: number; + /** Defines the dxChart widget's pane(s). */ + panes?: Array; + /** Swaps the axes round so that the value axis becomes horizontal and the argument axes becomes vertical. */ + rotated?: boolean; + /** Specifies the options of a chart's legend. */ + legend?: Legend; + /** Specifies options for dxChart widget series. */ + series?: Array; + legendClick?: any; + seriesClick?: any; + seriesHoverChanged?: (series: ChartSeries) => void; + seriesSelectionChanged?: (series: ChartSeries) => void; + /** Defines options for the series template. */ + seriesTemplate?: SeriesTemplate; + /** Specifies tooltip options. */ + tooltip?: ChartTooltip; + /** Specifies value axis options for the dxChart widget. */ + valueAxis?: Array; + /** Enables scrolling in your chart. */ + scrollingMode?: string; + /** Enables zooming in your chart. */ + zoomingMode?: string; + /** Specifies the settings of the scroll bar. */ + scrollBar?: { + /** Specifies whether the scroll bar is visible or not. */ + visible?: boolean; + /** Specifies the spacing between the scroll bar and the chart's plot in pixels. */ + offset?: number; + /** Specifies the color of the scroll bar. */ + color?: string; + /** Specifies the width of the scroll bar in pixels. */ + width?: number; + /** Specifies the opacity of the scroll bar. */ + opacity?: number; + /** Specifies the position of the scroll bar in the chart. */ + position?: string; + }; + } + /** A widget used to embed charts into HTML JS applications. */ + export class dxChart extends BaseChart { + constructor(element: JQuery, options?: dxChartOptions); + constructor(element: Element, options?: dxChartOptions); + /** Returns an array of all series in the chart. */ + getAllSeries(): Array; + /** Gets a series within the chart's series collection by the specified name (see the name option). */ + getSeriesByName(seriesName: string): ChartSeries; + /** Gets a series within the chart's series collection by its position number. */ + getSeriesByPos(seriesIndex: number): ChartSeries; + /** Sets the specified start and end values for the chart's argument axis. */ + zoomArgument(startValue: any, endValue: any): void; + } + interface CrosshaierWithLabel extends viz.core.DashedBorderWithOpacity { + /** Configures the label that belongs to the horizontal crosshair line. */ + label?: { + /** Specifies a color for the background of the label that belongs to the horizontal crosshair line. */ + backgroundColor?: string; + /** Specifies whether the label of the horizontal crosshair line is visible or not. */ + visible?: boolean; + /** Specifies font options for the text of the label that belongs to the horizontal crosshair line. */ + font?: viz.core.Font; + } + } + export interface PolarChartTooltip extends BaseChartTooltip { + /** Specifies the kind of information to display in a tooltip. */ + shared?: boolean; + } + export interface dxPolarChartOptions extends AdvancedOptions { + /** Specifies a value indicating whether all bars in a series must have the same angle, or may have different angles if any points in other series are missing. */ + equalBarWidth?: boolean; + /** Specifies adaptive layout options. */ + adaptiveLayout?: { + width?: number; + height?: number; + /** Specifies whether or not point labels can be hidden when the layout is adapting. */ + keepLabels?: boolean; + }; + /** Indicates whether or not to display a "spider web". */ + useSpiderWeb?: boolean; + /** Specifies argument axis options for the dxPolarChart widget. */ + argumentAxis?: PolarArgumentAxis; + /** An object defining the configuration options that are common for all axes of the dxPolarChart widget. */ + commonAxisSettings?: PolarCommonAxisSettings; + /** An object defining the configuration options that are common for all series of the dxPolarChart widget. */ + commonSeriesSettings?: CommonPolarSeriesSettings; + /** Specifies the options of a chart's legend. */ + legend?: AdvancedLegend; + /** Specifies options for dxPolarChart widget series. */ + series?: Array; + /** Defines options for the series template. */ + seriesTemplate?: PolarSeriesTemplate; + /** Specifies tooltip options. */ + tooltip?: PolarChartTooltip; + /** Specifies value axis options for the dxPolarChart widget. */ + valueAxis?: PolarValueAxis; + } + /** A chart widget displaying data in a polar coordinate system. */ + export class dxPolarChart extends BaseChart { + constructor(element: JQuery, options?: dxPolarChartOptions); + constructor(element: Element, options?: dxPolarChartOptions); + /** Returns an array of all series in the chart. */ + getAllSeries(): Array; + /** Gets a series within the chart's series collection by the specified name (see the name option). */ + getSeriesByName(seriesName: string): PolarSeries; + /** Gets a series within the chart's series collection by its position number. */ + getSeriesByPos(seriesIndex: number): PolarSeries; + } + export interface PieLegend extends core.BaseLegend { + /** Specifies what chart elements to highlight when a corresponding item in the legend is hovered over. */ + hoverMode?: string; + /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */ + customizeHint?: (pointInfo: { pointName: string; pointIndex: number; pointColor: string; }) => string; + /** Specifies a callback function that returns the text to be displayed by a legend item. */ + customizeText?: (pointInfo: { pointName: string; pointIndex: number; pointColor: string; }) => string; + } + export interface dxPieChartOptions extends BaseChartOptions { + /** Specifies adaptive layout options. */ + adaptiveLayout?: { + /** Specifies whether or not point labels can be hidden when the layout is adapting. */ + keepLabels?: boolean; + }; + /** Specifies dxPieChart legend options. */ + legend?: PieLegend; + /** Specifies options for the series of the dxPieChart widget. */ + series?: Array; + /** Specifies the diameter of the pie. */ + diameter?: number; + /** A handler for the legendClick event. */ + onLegendClick?: any; + legendClick?: any; + /** Specifies how the chart must behave when series point labels overlap. */ + resolveLabelOverlapping?: string; + } + /** A circular chart widget for HTML JS applications. */ + export class dxPieChart extends BaseChart { + constructor(element: JQuery, options?: dxPieChartOptions); + constructor(element: Element, options?: dxPieChartOptions); + /** Provides access to the dxPieChart series. */ + getSeries(): PieSeries; + } +} +interface JQuery { + dxChart(options?: DevExpress.viz.charts.dxChartOptions): JQuery; + dxChart(methodName: string, ...params: any[]): any; + dxChart(methodName: "instance"): DevExpress.viz.charts.dxChart; + dxPieChart(options?: DevExpress.viz.charts.dxPieChartOptions): JQuery; + dxPieChart(methodName: string, ...params: any[]): any; + dxPieChart(methodName: "instance"): DevExpress.viz.charts.dxPieChart; + dxPolarChart(options?: DevExpress.viz.charts.dxPolarChartOptions): JQuery; + dxPolarChart(methodName: string, ...params: any[]): any; + dxPolarChart(methodName: "instance"): DevExpress.viz.charts.dxPolarChart; +} +declare module DevExpress.viz.gauges { + export interface BaseRangeContainer { + /** Specifies a range container's background color. */ + backgroundColor?: string; + /** Specifies the offset of the range container from an invisible scale line in pixels. */ + offset?: number; + /** Sets the name of the palette or an array of colors to be used for coloring the gauge range container. */ + palette?: any; + /** An array of objects representing ranges contained in the range container. */ + ranges?: Array<{ startValue: number; endValue: number; color: string }>; + /** Specifies a color of a range. */ + color?: string; + /** Specifies an end value of a range. */ + endValue?: number; + /** Specifies a start value of a range. */ + startValue?: number; + } + export interface ScaleTick { + /** Specifies the color of the scale's minor ticks. */ + color?: string; + /** Specifies an array of custom minor ticks. */ + customTickValues?: Array; + /** Specifies the length of the scale's minor ticks. */ + length?: number; + /** Indicates whether automatically calculated minor ticks are visible or not. */ + showCalculatedTicks?: boolean; + /** Specifies an interval between minor ticks. */ + tickInterval?: number; + /** Indicates whether scale minor ticks are visible or not. */ + visible?: boolean; + /** Specifies the width of the scale's minor ticks. */ + width?: number; + } + export interface ScaleMajorTick extends ScaleTick { + /** Specifies whether or not to expand the current major tick interval if labels overlap each other. */ + useTicksAutoArrangement?: boolean; + } + export interface BaseScaleLabel { + /** Specifies whether or not scale labels should be colored similarly to their corresponding ranges in the range container. */ + useRangeColors?: boolean; + /** Specifies a callback function that returns the text to be displayed in scale labels. */ + customizeText?: (scaleValue: { value: number; valueText: string }) => string; + /** Specifies font options for the text displayed in the scale labels of the gauge. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in scale labels. */ + format?: string; + /** Specifies a precision for the formatted value displayed in the scale labels. */ + precision?: number; + /** Specifies whether or not scale labels are visible on the gauge. */ + visible?: boolean; + } + export interface BaseScale { + /** Specifies the end value for the scale of the gauge. */ + endValue?: number; + /** Specifies whether or not to hide the first scale label. */ + hideFirstLabel?: boolean; + /** Specifies whether or not to hide the first major tick on the scale. */ + hideFirstTick?: boolean; + /** Specifies whether or not to hide the last scale label. */ + hideLastLabel?: boolean; + /** Specifies whether or not to hide the last major tick on the scale. */ + hideLastTick?: boolean; + /** Specifies common options for scale labels. */ + label?: BaseScaleLabel; + /** Specifies options of the gauge's major ticks. */ + majorTick?: ScaleMajorTick; + /** Specifies options of the gauge's minor ticks. */ + minorTick?: ScaleTick; + /** Specifies the start value for the scale of the gauge. */ + startValue?: number; + } + export interface BaseValueIndicator { + /** Specifies the type of subvalue indicators. */ + type?: string; + /** Specifies the background color for the indicator of the rangeBar type. */ + backgroundColor?: string; + /** Specifies the base value for the indicator of the rangeBar type. */ + baseValue?: number; + /** Specifies a color of the indicator. */ + color?: string; + /** Specifies the range bar size for an indicator of the rangeBar type. */ + size?: number; + text?: { + /** Specifies a callback function that returns the text to be displayed in an indicator. */ + customizeText?: (indicatedValue: { value: number; valueText: string }) => string; + font?: viz.core.Font; + /** Specifies a format for the text displayed in an indicator. */ + format?: string; + /** Specifies the range bar's label indent in pixels. */ + indent?: number; + /** Specifies a precision for the formatted value displayed by an indicator. */ + precision?: number; + }; + offset?: number; + length?: number; + width?: number; + /** Specifies the length of an arrow for the indicator of the textCloud type in pixels. */ + arrowLength?: number; + /** Sets the array of colors to be used for coloring subvalue indicators. */ + palette?: Array; + /** Specifies the distance between the needle and the center of a gauge for the indicator of a needle-like type. */ + indentFromCenter?: number; + /** Specifies the second color for the indicator of the twoColorNeedle type. */ + secondColor?: string; + /** Specifies the length of a twoNeedleColor type indicator tip as a percentage. */ + secondFraction?: number; + /** Specifies the spindle's diameter in pixels for the indicator of a needle-like type. */ + spindleSize?: number; + /** Specifies the inner diameter in pixels, so that the spindle has the shape of a ring. */ + spindleGapSize?: number; + /** Specifies the orientation of the rangeBar indicator on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + /** Specifies the orientation of the rangeBar indicator on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + } + export interface SharedGaugeOptions { + /** Specifies animation options. */ + animation?: viz.core.Animation; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ + redrawOnResize?: boolean; + /** Specifies the size of the widget in pixels. */ + size?: viz.core.Size; + /** Specifies a subtitle for a gauge. */ + subtitle?: { + /** Specifies font options for the subtitle. */ + font?: viz.core.Font; + /** Specifies a text for the subtitle. */ + text?: string; + }; + /** Specifies a title for a gauge. */ + title?: { + /** Specifies font options for the title. */ + font?: viz.core.Font; + /** Specifies a title's position on the gauge. */ + position?: string; + /** Specifies a text for the title. */ + text?: string; + }; + /** Specifies options for gauge tooltips. */ + tooltip?: viz.core.Tooltip; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: dxBaseGauge; + element: Element; + target: {}; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: dxBaseGauge; + element: Element; + target: {}; + }) => void; + } + export interface BaseGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions { + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** Specifies the blank space in pixels between the widget's extreme elements and the boundaries of the area provided for the widget (see the size option). */ + margin?: viz.core.Margins; + /** Specifies options of the gauge's range container. */ + rangeContainer?: BaseRangeContainer; + /** Specifies a gauge's scale options. */ + scale?: BaseScale; + /** Specifies the appearance options of subvalue indicators. */ + subvalueIndicator?: BaseValueIndicator; + /** Specifies a set of subvalues to be designated by the subvalue indicators. */ + subvalues?: Array; + /** Specifies the main value on a gauge. */ + value?: number; + /** Specifies the appearance options of the value indicator. */ + valueIndicator?: BaseValueIndicator; + } + /** A gauge widget. */ + export class dxBaseGauge extends viz.core.BaseWidget { + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(): void; + /** Returns the main gauge value. */ + value(): number; + /** Updates a gauge value. */ + value(value: number): void; + /** Returns an array of gauge subvalues. */ + subvalues(): Array; + /** Updates gauge subvalues. */ + subvalues(subvalues: Array): void; + } + export interface LinearRangeContainer extends BaseRangeContainer { + /** Specifies the orientation of the range container on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + /** Specifies the orientation of a range container on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + /** Specifies the width of the range container's start and end boundaries in the dxLinearGauge widget. */ + width?: any; + /** Specifies an end width of a range container. */ + end?: number; + /** Specifies a start width of a range container. */ + start?: number; + } + export interface LinearScaleLabel extends BaseScaleLabel { + /** Specifies the spacing between scale labels and ticks. */ + indentFromTick?: number; + } + export interface LinearScale extends BaseScale { + /** Specifies the orientation of scale ticks on a vertically oriented dxLinearGauge widget. */ + horizontalOrientation?: string; + label?: LinearScaleLabel; + /** Specifies the orientation of scale ticks on a horizontally oriented dxLinearGauge widget. */ + verticalOrientation?: string; + } + export interface dxLinearGaugeOptions extends BaseGaugeOptions { + /** Specifies the options required to set the geometry of the dxLinearGauge widget. */ + geometry?: { + /** Indicates whether to display the dxLinearGauge widget vertically or horizontally. */ + orientation?: string; + }; + /** Specifies gauge range container options. */ + rangeContainer?: LinearRangeContainer; + scale?: LinearScale; + } + /** A widget that represents a gauge with a linear scale. */ + export class dxLinearGauge extends dxBaseGauge { + constructor(element: JQuery, options?: dxLinearGaugeOptions); + constructor(element: Element, options?: dxLinearGaugeOptions); + } + export interface CircularRangeContainer extends BaseRangeContainer { + /** Specifies the orientation of the range container in the dxCircularGauge widget. */ + orientation?: string; + /** Specifies the range container's width in pixels. */ + width?: number; + } + export interface CircularScaleLabel extends BaseScaleLabel { + /** Specifies the spacing between scale labels and ticks. */ + indentFromTick?: number; + } + export interface CircularScale extends BaseScale { + label?: CircularScaleLabel; + /** Specifies the orientation of scale ticks. */ + orientation?: string; + } + export interface dxCircularGaugeOptions extends BaseGaugeOptions { + /** Specifies the options required to set the geometry of the dxCircularGauge widget. */ + geometry?: { + /** Specifies the end angle of the circular gauge's arc. */ + endAngle?: number; + /** Specifies the start angle of the circular gauge's arc. */ + startAngle?: number; + }; + /** Specifies gauge range container options. */ + rangeContainer?: CircularRangeContainer; + scale?: CircularScale; + } + /** A widget that represents a gauge with a circular scale. */ + export class dxCircularGauge extends dxBaseGauge { + constructor(element: JQuery, options?: dxCircularGaugeOptions); + constructor(element: Element, options?: dxCircularGaugeOptions); + } + export interface dxBarGaugeOptions extends viz.core.BaseWidgetOptions, SharedGaugeOptions { + /** Specifies a color for the remaining segment of the bar's track. */ + backgroundColor?: string; + /** Specifies a distance between bars in pixels. */ + barSpacing?: number; + /** Specifies a base value for bars. */ + baseValue?: number; + /** Specifies an end value for the gauge's invisible scale. */ + endValue?: number; + /** Defines the shape of the gauge's arc. */ + geometry?: { + /** Specifies the end angle of the bar gauge's arc. */ + endAngle?: number; + /** Specifies the start angle of the bar gauge's arc. */ + startAngle?: number; + }; + /** Specifies the options of the labels that accompany gauge bars. */ + label?: { + /** Specifies a color for the label connector text. */ + connectorColor?: string; + /** Specifies the width of the label connector in pixels. */ + connectorWidth?: number; + /** Specifies a callback function that returns a text for labels. */ + customizeText?: (barValue: { value: number; valueText: string }) => string; + /** Specifies font options for bar labels. */ + font?: viz.core.Font; + /** Specifies a format for bar labels. */ + format?: string; + /** Specifies the distance between the upper bar and bar labels in pixels. */ + indent?: number; + /** Specifies a precision for the formatted value displayed by labels. */ + precision?: number; + /** Specifies whether bar labels appear on a gauge or not. */ + visible?: boolean; + }; + /** Sets the name of the palette or an array of colors to be used for coloring the gauge range container. */ + palette?: string; + /** Defines the radius of the bar that is closest to the center relatively to the radius of the topmost bar. */ + relativeInnerRadius?: number; + /** Specifies a start value for the gauge's invisible scale. */ + startValue?: number; + /** Specifies the array of values to be indicated on a bar gauge. */ + values?: Array; + } + /** A circular bar widget. */ + export class dxBarGauge extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxBarGaugeOptions); + constructor(element: Element, options?: dxBarGaugeOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws the widget. */ + render(): void; + /** Returns an array of gauge values. */ + values(): Array; + /** Updates the values displayed by a gauge. */ + values(values: Array): void; + } +} +interface JQuery { + dxLinearGauge(options?: DevExpress.viz.gauges.dxLinearGaugeOptions): JQuery; + dxLinearGauge(methodName: string, ...params: any[]): any; + dxLinearGauge(methodName: "instance"): DevExpress.viz.gauges.dxLinearGauge; + dxCircularGauge(options?: DevExpress.viz.gauges.dxCircularGaugeOptions): JQuery; + dxCircularGauge(methodName: string, ...params: any[]): any; + dxCircularGauge(methodName: "instance"): DevExpress.viz.gauges.dxCircularGauge; + dxBarGauge(options?: DevExpress.viz.gauges.dxBarGaugeOptions): JQuery; + dxBarGauge(methodName: string, ...params: any[]): any; + dxBarGauge(methodName: "instance"): DevExpress.viz.gauges.dxBarGauge; +} +declare module DevExpress.viz.rangeSelector { + export interface dxRangeSelectorOptions extends viz.core.BaseWidgetOptions { + /** Specifies the options for the range selector's background. */ + background?: { + /** Specifies the background color for the dxRangeSelector. */ + color?: string; + /** Specifies image options. */ + image?: { + /** Specifies a location for the image in the background of a range selector. */ + location?: string; + /** Specifies the image's URL. */ + url?: string; + }; + /** Indicates whether or not the background (background color and/or image) is visible. */ + visible?: boolean; + }; + /** Specifies the dxRangeSelector's behavior options. */ + behavior?: { + /** Indicates whether or not you can swap sliders. */ + allowSlidersSwap?: boolean; + /** +Indicates whether or not animation is enabled. + */ + animationEnabled?: boolean; + /** Specifies when to call the onSelectedRangeChanged function. */ + callSelectedRangeChanged?: string; + /** Indicates whether or not an end user can specify the range using a mouse, without the use of sliders. */ + manualRangeSelectionEnabled?: boolean; + /** Indicates whether or not an end user can shift the selected range to the required location on a scale by clicking. */ + moveSelectedRangeByClick?: boolean; + /** Indicates whether to snap a slider to ticks. */ + snapToTicks?: boolean; + }; + /** Specifies the options required to display a chart as the range selector's background. */ + chart?: { + /** Specifies a coefficient for determining an indent from the bottom background boundary to the lowest chart point. */ + bottomIndent?: number; + /** An object defining the common configuration options for the chart’s series. */ + commonSeriesSettings?: viz.charts.CommonSeriesSettings; + /** An object providing options for managing data from a data source. */ + dataPrepareSettings?: { + /** Specifies whether or not to validate values from a data source. */ + checkTypeForAllData?: boolean; + /** Specifies whether or not to convert the values from a data source into the data type of an axis. */ + convertToAxisDataType?: boolean; + /** Specifies how to sort series points. */ + sortingMethod?: any; + }; + /** Specifies a value indicating whether all bars in a series must have the same width, or may have different widths if any points in other series are missing. */ + equalBarWidth?: any; + /** Sets the name of the palette to be used in the range selector's chart. Alternatively, an array of colors can be set as a custom palette to be used within this chart. */ + palette?: any; + /** An object defining the chart’s series. */ + series?: Array; + /** Defines options for the series template. */ + seriesTemplate?: viz.charts.SeriesTemplate; + /** Specifies a coefficient for determining an indent from the background's top boundary to the topmost chart point. */ + topIndent?: number; + /** Specifies whether or not to filter the series points depending on their quantity. */ + useAggregation?: boolean; + /** Specifies options for the chart's value axis. */ + valueAxis?: { + /** Indicates whether or not the chart's value axis must be inverted. */ + inverted?: boolean; + /** Specifies the value to be raised to a power when generating ticks for a logarithmic value axis. */ + logarithmBase?: number; + /** Specifies the maximum value of the chart's value axis. */ + max?: number; + /** Specifies the minimum value of the chart's value axis. */ + min?: number; + /** Specifies the type of the value axis. */ + type?: string; + /** Specifies the desired type of axis values. */ + valueType?: string; + }; + }; + /** Specifies the color of the parent page element. */ + containerBackgroundColor?: string; + /** Specifies a data source for the scale values and for the chart at the background. */ + dataSource?: any; + /** Specifies the data source field that provides data for the scale. */ + dataSourceField?: string; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies the blank space in pixels between the dxRangeSelector widget's extreme elements and the boundaries of the area provided for the widget (see size). */ + margin?: viz.core.Margins; + /** Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates. */ + redrawOnResize?: boolean; + /** Specifies options of the range selector's scale. */ + scale?: { + /** Specifies the scale's end value. */ + endValue?: any; + /** Specifies common options for scale labels. */ + label?: { + /** Specifies a callback function that returns the text to be displayed in scale labels. */ + customizeText?: (scaleValue: { value: any; valueText: string; }) => string; + /** Specifies font options for the text displayed in the range selector's scale labels. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in scale labels. */ + format?: string; + /** Specifies a precision for the formatted value displayed in the scale labels. */ + precision?: number; + /** Specifies a spacing between scale labels and the background bottom edge. */ + topIndent?: number; + /** Specifies whether or not the scale's labels are visible. */ + visible?: boolean; + }; + /** Specifies the value to be raised to a power when generating ticks for a logarithmic scale. */ + logarithmBase?: number; + /** Specifies an interval between major ticks. */ + majorTickInterval?: any; + /** Specifies options for the date-time scale's markers. */ + marker?: { + /** Defines the options that can be set for the text that is displayed by the scale markers. */ + label?: { + /** Specifies a callback function that returns the text to be displayed in scale markers. */ + customizeText?: (markerValue: { value: any; valueText: string }) => string; + /** Specifies a format for the text displayed in scale markers. */ + format?: string; + }; + /** Specifies the height of the marker's separator. */ + separatorHeight?: number; + /** Specifies the space between the marker label and the marker separator. */ + textLeftIndent?: number; + /** Specifies the space between the marker's label and the top edge of the marker's separator. */ + textTopIndent?: number; + /** Specified the indent between the marker and the scale lables. */ + topIndent?: number; + /** Indicates whether scale markers are visible. */ + visible?: boolean; + }; + /** Specifies the maximum range that can be selected. */ + maxRange?: any; + /** Specifies the number of minor ticks between neighboring major ticks. */ + minorTickCount?: number; + /** +Specifies an interval between minor ticks. + */ + minorTickInterval?: any; + /** Specifies the minimum range that can be selected. */ + minRange?: any; + /** Specifies the height of the space reserved for the scale in pixels. */ + placeholderHeight?: number; + /** Indicates whether or not to set ticks of a date-time scale at the beginning of each date-time interval. */ + setTicksAtUnitBeginning?: boolean; + /** Specifies whether or not to show ticks for the boundary scale values, when neither major ticks nor minor ticks are created for these values. */ + showCustomBoundaryTicks?: boolean; + /** Indicates whether or not to show minor ticks on the scale. */ + showMinorTicks?: boolean; + /** Specifies the scale's start value. */ + startValue?: any; + /** Specifies options defining the appearance of scale ticks. */ + tick?: { + /** Specifies the color of scale ticks (both major and minor ticks). */ + color?: string; + /** Specifies the opacity of scale ticks (both major and minor ticks). */ + opacity?: number; + /** Specifies the width of the scale's ticks (both major and minor ticks). */ + width?: number; + }; + /** Specifies the type of the scale. */ + type?: string; + /** Specifies whether or not to expand the current tick interval if labels overlap each other. */ + useTicksAutoArrangement?: boolean; + /** Specifies the type of values on the scale. */ + valueType?: string; + /** Specifies the order of arguments on a discrete scale. */ + categories?: Array; + }; + /** Specifies the range to be selected when displaying the dxRangeSelector. */ + selectedRange?: { + /** Specifies the start value of the range to be selected when displaying the dxRangeSelector widget on a page. */ + startValue?: any; + /** Specifies the end value of the range to be selected when displaying the dxRangeSelector widget on a page. */ + endValue?: any; + }; + /** Specifies the color of the selected range. */ + selectedRangeColor?: string; + /** Range selector's indent options. */ + indent?: { + /** Specifies range selector's left indent. */ + left?: number; + /** Specifies range selector's right indent. */ + right?: number; + }; + selectedRangeChanged?: (selectedRange: { startValue: any; endValue: any; }) => void; + /** A handler for the selectedRangeChanged event. */ + onSelectedRangeChanged?: (e: { + startValue: any; + endValue: any; + component: dxRangeSelector; + element: Element; + }) => void; + /** Specifies range selector shutter options. */ + shutter?: { + /** Specifies shutter color. */ + color?: string; + /** Specifies the opacity of the color of shutters. */ + opacity?: number; + }; + /** Specifies in pixels the size of the dxRangeSelector widget. */ + size?: viz.core.Size; + /** Specifies the appearance of the range selector's slider handles. */ + sliderHandle?: { + /** Specifies the color of the slider handles. */ + color?: string; + /** Specifies the opacity of the slider handles. */ + opacity?: number; + /** Specifies the width of the slider handles. */ + width?: number; + }; + /** Defines the options of the range selector slider markers. */ + sliderMarker?: { + /** Specifies the color of the slider markers. */ + color?: string; + /** Specifies a callback function that returns the text to be displayed by slider markers. */ + customizeText?: (scaleValue: { value: any; valueText: any; }) => string; + /** Specifies font options for the text displayed by the range selector slider markers. */ + font?: viz.core.Font; + /** Specifies a format for the text displayed in slider markers. */ + format?: string; + /** Specifies the color used for the slider marker text when the currently selected range does not match the minRange and maxRange values. */ + invalidRangeColor?: string; + /** + * Specifies the empty space between the marker's border and the marker’s text. + * @deprecated Use the 'paddingTopBottom' and 'paddingLeftRight' options instead + */ + padding?: number; + /** Specifies the empty space between the marker's top and bottom borders and the marker's text. */ + paddingTopBottom?: number; + /** Specifies the empty space between the marker's left and right borders and the marker's text. */ + paddingLeftRight?: number; + /** Specifies the placeholder height of the slider marker. */ + placeholderHeight?: number; + /** + * Specifies in pixels the height and width of the space reserved for the range selector slider markers. + * @deprecated Use the 'placeholderHeight' and 'indent' options instead + */ + placeholderSize?: { + /** Specifies the height of the placeholder for the left and right slider markers. */ + height?: number; + /** Specifies the width of the placeholder for the left and right slider markers. */ + width?: { + /** Specifies the width of the left slider marker's placeholder. */ + left?: number; + /** Specifies the width of the right slider marker's placeholder. */ + right?: number; + }; + }; + /** Specifies a precision for the formatted value displayed in slider markers. */ + precision?: number; + /** Indicates whether or not the slider markers are visible. */ + visible?: boolean; + }; + } + /** A widget that allows end users to select a range of values on a scale. */ + export class dxRangeSelector extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxRangeSelectorOptions); + constructor(element: Element, options?: dxRangeSelectorOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(skipChartAnimation?: boolean): void; + /** Returns the currently selected range. */ + getSelectedRange(): { startValue: any; endValue: any; }; + /** Sets a specified range. */ + setSelectedRange(selectedRange: { startValue: any; endValue: any; }): void; + } +} +interface JQuery { + dxRangeSelector(options?: DevExpress.viz.rangeSelector.dxRangeSelectorOptions): JQuery; + dxRangeSelector(methodName: string, ...params: any[]): any; + dxRangeSelector(methodName: "instance"): DevExpress.viz.rangeSelector.dxRangeSelector; +} +declare module DevExpress.viz.map { + /** This section describes the fields and methods that can be used in code to manipulate the Area object. */ + export interface Area { + /** Contains the element type. */ + type: string; + /** Return the value of an attribute. */ + attribute(name: string): any; + /** Provides information about the selection state of an area. */ + selected(): boolean; + /** Sets a new selection state for an area. */ + selected(state: boolean): void; + /** Applies the area settings specified as a parameter and updates the area appearance. */ + applySettings(settings: any): void; + } + /** This section describes the fields and methods that can be used in code to manipulate the Markers object. */ + export interface Marker { + /** Contains the descriptive text accompanying the map marker. */ + text: string; + /** Contains the type of the element. */ + type: string; + /** Contains the URL of an image map marker. */ + url: string; + /** Contains the value of a bubble map marker. */ + value: number; + /** Contains the values of a pie map marker. */ + values: Array; + /** Returns the value of an attribute. */ + attribute(name: string): any; + /** Returns the coordinates of a specific marker. */ + coordinates(): Array; + /** Provides information about the selection state of a marker. */ + selected(): boolean; + /** Sets a new selection state for a marker. */ + selected(state: boolean): void; + /** Applies the marker settings specified as a parameter and updates the marker appearance. */ + applySettings(settings: any): void; + } + export interface AreaSettings { + /** Specifies the width of the area border in pixels. */ + borderWidth?: number; + /** Specifies a color for the area border. */ + borderColor?: string; + click?: any; + /** Specifies a color for an area. */ + color?: string; + /** Specifies the function that customizes each area individually. */ + customize?: (areaInfo: Area) => AreaSettings; + /** Specifies a color for the area border when the area is hovered over. */ + hoveredBorderColor?: string; + /** Specifies the pixel-measured width of the area border when the area is hovered over. */ + hoveredBorderWidth?: number; + /** Specifies a color for an area when this area is hovered over. */ + hoveredColor?: string; + /** Specifies whether or not to change the appearance of an area when it is hovered over. */ + hoverEnabled?: boolean; + /** Configures area labels. */ + label?: { + /** Specifies the data field that provides data for area labels. */ + dataField?: string; + /** Enables area labels. */ + enabled?: boolean; + /** Specifies font options for area labels. */ + font?: viz.core.Font; + }; + /** Specifies the name of the palette or a custom range of colors to be used for coloring a map. */ + palette?: any; + /** Specifies the number of colors in a palette. */ + paletteSize?: number; + /** Allows you to paint areas with similar attributes in the same color. */ + colorGroups?: Array; + /** Specifies the field that provides data to be used for coloring areas. */ + colorGroupingField?: string; + /** Specifies a color for the area border when the area is selected. */ + selectedBorderColor?: string; + /** Specifies a color for an area when this area is selected. */ + selectedColor?: string; + /** Specifies the pixel-measured width of the area border when the area is selected. */ + selectedBorderWidth?: number; + selectionChanged?: (area: Area) => void; + /** Specifies whether single or multiple areas can be selected on a vector map. */ + selectionMode?: string; + } + export interface MarkerSettings { + /** Specifies a color for the marker border. */ + borderColor?: string; + /** Specifies the width of the marker border in pixels. */ + borderWidth?: number; + click?: any; + /** Specifies a color for a marker of the dot or bubble type. */ + color?: string; + /** Specifies the function that customizes each marker individually. */ + customize?: (markerInfo: Marker) => MarkerSettings; + font?: Object; + /** Specifies the pixel-measured width of the marker border when the marker is hovered over. */ + hoveredBorderWidth?: number; + /** Specifies a color for the marker border when the marker is hovered over. */ + hoveredBorderColor?: string; + /** Specifies a color for a marker of the dot or bubble type when this marker is hovered over. */ + hoveredColor?: string; + /** Specifies whether or not to change the appearance of a marker when it is hovered over. */ + hoverEnabled?: boolean; + /** Specifies marker label options. */ + label?: { + /** Enables marker labels. */ + enabled?: boolean; + /** Specifies font options for marker labels. */ + font?: viz.core.Font; + }; + /** Specifies the pixel-measured diameter of the marker that represents the biggest value. Setting this option makes sense only if you use markers of the bubble type. */ + maxSize?: number; + /** Specifies the pixel-measured diameter of the marker that represents the smallest value. Setting this option makes sense only if you use markers of the bubble type. */ + minSize?: number; + /** Specifies the opacity of markers. Setting this option makes sense only if you use markers of the bubble type. */ + opacity?: number; + /** Specifies the pixel-measured width of the marker border when the marker is selected. */ + selectedBorderWidth?: number; + /** Specifies a color for the marker border when the marker is selected. */ + selectedBorderColor?: string; + /** Specifies a color for a marker of the dot or bubble type when this marker is selected. */ + selectedColor?: string; + selectionChanged?: (marker: Marker) => void; + /** Specifies whether a single or multiple markers can be selected on a vector map. */ + selectionMode?: string; + /** Specifies the size of markers. Setting this option makes sense for any type of marker except bubble. */ + size?: number; + /** Specifies the type of markers to be used on the map. */ + type?: string; + /** Specifies the name of a palette or a custom set of colors to be used for coloring markers of the pie type. */ + palette?: any; + /** Allows you to paint markers with similar attributes in the same color. */ + colorGroups?: Array; + /** Specifies the field that provides data to be used for coloring markers. */ + colorGroupingField?: string; + /** Allows you to display bubbles with similar attributes in the same size. */ + sizeGroups?: Array; + /** Specifies the field that provides data to be used for sizing bubble markers. */ + sizeGroupingField?: string; + } + export interface dxVectorMapOptions extends viz.core.BaseWidgetOptions { + /** An object specifying options for the map areas. */ + areaSettings?: AreaSettings; + /** Specifies the options for the map background. */ + background?: { + /** Specifies a color for the background border. */ + borderColor?: string; + /** Specifies a color for the background. */ + color?: string; + }; + /** Specifies the positioning of a map in geographical coordinates. */ + bounds?: Array; + /** Specifies the options of the control bar. */ + controlBar?: { + /** Specifies a color for the outline of the control bar elements. */ + borderColor?: string; + /** Specifies a color for the inner area of the control bar elements. */ + color?: string; + /** Specifies whether or not to display the control bar. */ + enabled?: boolean; + /** Specifies the margin of the control bar in pixels. */ + margin?: number; + /** Specifies the position of the control bar. */ + horizontalAlignment?: string; + /** Specifies the position of the control bar. */ + verticalAlignment?: string; + /** Specifies the opacity of the Control_Bar. */ + opacity?: number; + }; + /** Specifies the appearance of the loading indicator. */ + loadingIndicator?: viz.core.LoadingIndicator; + /** Specifies a data source for the map area. */ + mapData?: any; + /** Specifies a data source for the map markers. */ + markers?: any; + /** An object specifying options for the map markers. */ + markerSettings?: MarkerSettings; + /** Specifies the size of the dxVectorMap widget. */ + size?: viz.core.Size; + /** Specifies tooltip options. */ + tooltip?: viz.core.Tooltip; + /** Configures map legends. */ + legends?: Array; + /** Specifies whether or not the map should respond when a user rolls the mouse wheel. */ + wheelEnabled?: boolean; + /** Specifies whether the map should respond to touch gestures. */ + touchEnabled?: boolean; + /** Disables the zooming capability. */ + zoomingEnabled?: boolean; + /** Specifies the geographical coordinates of the center for a map. */ + center?: Array; + centerChanged?: (center: Array) => void; + /** A handler for the centerChanged event. */ + onCenterChanged?: (e: { + center: Array; + component: dxVectorMap; + element: Element; + }) => void; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: dxVectorMap; + element: Element; + target: {}; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: dxVectorMap; + element: Element; + target: {}; + }) => void; + /** Specifies a number that is used to zoom a map initially. */ + zoomFactor?: number; + /** Specifies a map's maximum zoom factor. */ + maxZoomFactor?: number; + zoomFactorChanged?: (zoomFactor: number) => void; + /** A handler for the zoomFactorChanged event. */ + onZoomFactorChanged?: (e: { + zoomFactor: number; + component: dxVectorMap; + element: Element; + }) => void; + click?: any; + /** A handler for the click event. */ + onClick?: any; + /** A handler for the areaClick event. */ + onAreaClick?: any; + /** A handler for the areaSelectionChanged event. */ + onAreaSelectionChanged?: (e: { + target: Area; + component: dxVectorMap; + element: Element; + }) => void; + /** A handler for the markerClick event. */ + onMarkerClick?: any; + /** A handler for the markerSelectionChanged event. */ + onMarkerSelectionChanged?: (e: { + target: Marker; + component: dxVectorMap; + element: Element; + }) => void; + /** Disables the panning capability. */ + panningEnabled?: boolean; + } + export interface Legend extends viz.core.BaseLegend { + /** Specifies text for legend items. */ + customizeText?: (itemInfo: { start: number; end: number; index: number; color: string; size: number; }) => string; + /** Specifies text for a hint that appears when a user hovers the mouse pointer over the text of a legend item. */ + customizeHint?: (itemInfo: { start: number; end: number; index: number; color: string; size: number }) => string; + /** Specifies the source of data for the legend. */ + source?: string; + } + /** A vector map widget. */ + export class dxVectorMap extends viz.core.BaseWidget { + constructor(element: JQuery, options?: dxVectorMapOptions); + constructor(element: Element, options?: dxVectorMapOptions); + /** Displays the loading indicator. */ + showLoadingIndicator(): void; + /** Conceals the loading indicator. */ + hideLoadingIndicator(): void; + /** Redraws a widget. */ + render(): void; + /** Gets the current coordinates of the map center. */ + center(): Array; + /** Sets the coordinates of the map center. */ + center(centerCoordinates: Array): void; + /** Deselects all the selected areas on a map. The areas are displayed in their initial style after. */ + clearAreaSelection(): void; + /** Deselects all the selected markers on a map. The markers are displayed in their initial style after. */ + clearMarkerSelection(): void; + /** Deselects all the selected area and markers on a map at once. The areas and markers are displayed in their initial style after. */ + clearSelection(): void; + /** Converts client area coordinates into map coordinates. */ + convertCoordinates(x: number, y: number): Array; + /** Returns an array with all the map areas. */ + getAreas(): Array; + /** Returns an array with all the map markers. */ + getMarkers(): Array; + /** Gets the current coordinates of the map viewport. */ + viewport(): Array; + /** Sets the coordinates of the map viewport. */ + viewport(viewportCoordinates: Array): void; + /** Gets the current value of the map zoom factor. */ + zoomFactor(): number; + /** Sets the value of the map zoom factor. */ + zoomFactor(zoomFactor: number): void; + } +} +interface JQuery { + dxVectorMap(options?: DevExpress.viz.map.dxVectorMapOptions): JQuery; + dxVectorMap(methodName: string, ...params: any[]): any; + dxVectorMap(methodName: "instance"): DevExpress.viz.map.dxVectorMap; +} +declare module DevExpress.viz.sparklines { + export interface SparklineTooltip extends viz.core.Tooltip { + /** + * Specifies how a tooltip is horizontally aligned relative to the graph. + * @deprecated Tooltip alignment is no more available. + */ + horizontalAlignment?: string; + /** + * Specifies how a tooltip is vertically aligned relative to the graph. + * @deprecated Tooltip alignment is no more available. + */ + verticalAlignment?: string; + } + export interface BaseSparklineOptions extends viz.core.BaseWidgetOptions { + /** Specifies the blank space between the widget's extreme elements and the boundaries of the area provided for the widget in pixels. */ + margin?: viz.core.Margins; + /** Specifies the size of the widget. */ + size?: viz.core.Size; + /** Specifies tooltip options. */ + tooltip?: SparklineTooltip; + /** A handler for the tooltipShown event. */ + onTooltipShown?: (e: { + component: BaseSparkline; + element: Element; + }) => void; + /** A handler for the tooltipHidden event. */ + onTooltipHidden?: (e: { + component: BaseSparkline; + element: Element; + }) => void; + } + /** Overridden by descriptions for particular widgets. */ + export class BaseSparkline extends viz.core.BaseWidget { + /** Redraws a widget. */ + render(): void; + } + export interface dxBulletOptions extends BaseSparkline { + /** Specifies a color for the bullet bar. */ + color?: string; + /** Specifies an end value for the invisible scale. */ + endScaleValue?: number; + /** Specifies whether or not to show the target line. */ + showTarget?: boolean; + /** Specifies whether or not to show the line indicating zero on the invisible scale. */ + showZeroLevel?: boolean; + /** Specifies a start value for the invisible scale. */ + startScaleValue?: number; + /** Specifies the value indicated by the target line. */ + target?: number; + /** Specifies a color for both the target and zero level lines. */ + targetColor?: string; + /** Specifies the width of the target line. */ + targetWidth?: number; + /** Specifies the primary value indicated by the bullet bar. */ + value?: number; + } + /** A bullet graph widget. */ + export class dxBullet extends BaseSparkline { + constructor(element: JQuery, options?: dxBulletOptions); + constructor(element: Element, options?: dxBulletOptions); + } + export interface dxSparklineOptions extends BaseSparklineOptions { + /** Specifies the data source field that provides arguments for a sparkline. */ + argumentField?: string; + /** Sets a color for the bars indicating negative values. Available for a sparkline of the bar type only. */ + barNegativeColor?: string; + /** Sets a color for the bars indicating positive values. Available for a sparkline of the bar type only. */ + barPositiveColor?: string; + /** Specifies a data source for the sparkline. */ + dataSource?: Array; + /** Sets a color for the boundary of both the first and last points on a sparkline. */ + firstLastColor?: string; + /** Specifies whether a sparkline ignores null data points or not. */ + ignoreEmptyPoints?: boolean; + /** Sets a color for a line on a sparkline. Available for the sparklines of the line- and area-like types. */ + lineColor?: string; + /** Specifies a width for a line on a sparkline. Available for the sparklines of the line- and area-like types. */ + lineWidth?: number; + /** Sets a color for the bars indicating the values that are less than the winloss threshold. Available for a sparkline of the winloss type only. */ + lossColor?: string; + /** Sets a color for the boundary of the maximum point on a sparkline. */ + maxColor?: string; + /** Sets a color for the boundary of the minimum point on a sparkline. */ + minColor?: string; + /** Sets a color for points on a sparkline. Available for the sparklines of the line- and area-like types. */ + pointColor?: string; + /** Specifies the diameter of sparkline points in pixels. Available for the sparklines of line- and area-like types. */ + pointSize?: number; + /** Specifies a symbol to use as a point marker on a sparkline. Available for the sparklines of the line- and area-like types. */ + pointSymbol?: string; + /** Specifies whether or not to indicate both the first and last values on a sparkline. */ + showFirstLast?: boolean; + /** Specifies whether or not to indicate both the minimum and maximum values on a sparkline. */ + showMinMax?: boolean; + /** Determines the type of a sparkline. */ + type?: string; + /** Specifies the data source field that provides values for a sparkline. */ + valueField?: string; + /** Sets a color for the bars indicating the values greater than a winloss threshold. Available for a sparkline of the winloss type only. */ + winColor?: string; + /** Specifies a value that serves as a threshold for the sparkline of the winloss type. */ + winlossThreshold?: number; + /** Specifies the minimum value of the sparkline value axis. */ + minValue?: number; + /** Specifies the maximum value of the sparkline's value axis. */ + maxValue?: number; + } + /** A sparkline widget. */ + export class dxSparkline extends BaseSparkline { + constructor(element: JQuery, options?: dxSparklineOptions); + constructor(element: Element, options?: dxSparklineOptions); + } +} +interface JQuery { + dxBullet(options?: DevExpress.viz.sparklines.dxBulletOptions): JQuery; + dxBullet(methodName: string, ...params: any[]): any; + dxBullet(methodName: "instance"): DevExpress.viz.sparklines.dxBullet; + dxSparkline(options?: DevExpress.viz.sparklines.dxSparklineOptions): JQuery; + dxSparkline(methodName: string, ...params: any[]): any; + dxSparkline(methodName: "instance"): DevExpress.viz.sparklines.dxSparkline; +} diff --git a/devextreme/dx.devextreme.d.ts b/devextreme/dx.devextreme.d.ts index fdb7df96c..5d4d0a4fc 100644 --- a/devextreme/dx.devextreme.d.ts +++ b/devextreme/dx.devextreme.d.ts @@ -1,4 +1,4 @@ -// Type definitions for DevExtreme 15.1.6 +// Type definitions for DevExtreme 15.1.7 // Project: http://js.devexpress.com/ // Definitions by: DevExpress Inc. // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -61,6 +61,8 @@ declare module DevExpress { export var hardwareBackButton: JQueryCallback; /** Processes the hardware back button click. */ export function processHardwareBackButton(): void; + /** Hides the last displayed overlay widget. */ + export function hideTopOverlay(): boolean; /** Specifies whether or not the entire application/site supports right-to-left representation. */ export var rtlEnabled: boolean; /** Registers a new component in the DevExpress.ui namespace as a jQuery plugin, Angular directive and Knockout binding. */ @@ -328,11 +330,9 @@ declare module DevExpress { /** Removes the data item specified by the key. */ remove(key: any): JQueryPromise; /** Obtains the total count of items that will be returned by the load() function. */ - totalCount(obj?: { + totalCount(options?: { filter?: Object; - select?: Object; group?: Object; - sort?: Object; }): JQueryPromise; /** Updates the data item specified by the key. */ update(key: any, values: Object): JQueryPromise; @@ -396,7 +396,10 @@ declare module DevExpress { /** The user implementation of the remove(key) method. */ remove?: (key: any) => Promise; /** The user implementation of the totalCount(options) method. */ - totalCount?: () => Promise; + totalCount?: (options?: { + filter?: Object; + group?: Object; + }) => Promise; /** The user implementation of the update(key, values) method. */ update?: (key: any, values: Object) => Promise; } @@ -701,7 +704,7 @@ declare module DevExpress { repaint(): void; /** Sets focus on the widget. */ focus(): void; - /** Registers a handler for pressing of the specified key. */ + /** Registers a handler when a specified key is pressed. */ registerKeyHandler(key: string, handler: Function): void; } export interface CollectionWidgetOptions extends WidgetOptions { @@ -1033,7 +1036,7 @@ declare module DevExpress.ui { focusStateEnabled?: boolean; /** A Boolean value specifying whether or not the widget changes its state when being hovered by an end user. */ hoverStateEnabled?: boolean; - /** The editor mask, which specifies the format of the entered string. */ + /** The editor mask that specifies the format of the entered string. */ mask?: string; /** Specifies a mask placeholder character. */ maskChar?: string; @@ -1361,6 +1364,8 @@ declare module DevExpress.ui { selectedIndex?: number; /** A Boolean value specifying whether or not to allow users to change the selected index by swiping. */ swipeEnabled?: boolean; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; } /** A widget used to display a view and to switch between several views. */ export class dxMultiView extends CollectionWidget { @@ -1370,81 +1375,71 @@ declare module DevExpress.ui { export interface dxMapOptions extends WidgetOptions { /** Specifies whether or not the widget automatically adjusts center and zoom option values when adding a new marker or route. */ autoAdjust?: boolean; - bounds?: { - northEast?: { - lat?: number; - lng?: number; - }; - southWest?: { - lat?: number; - lng?: number; - }; - /** An object, a string, or an array specifying the location displayed at the center of the widget. */ - center?: { - /** The latitude location displayed in the center of the widget. */ - lat?: number; - /** The longitude location displayed in the center of the widget. */ - lng?: number; - }; - /** A handler for the click event. */ - onClick?: any; - clickAction?: any; - /** Specifies whether or not map widget controls are available. */ - controls?: boolean; - /** Specifies the height of the widget. */ - height?: number; - /** A key used to authenticate the application within the required map provider. */ - key?: { - /** A key used to authenticate the application within the "Bing" map provider. */ - bing?: string; - /** A key used to authenticate the application within the "Google" map provider. */ - google?: string; - /** A key used to authenticate the application within the "Google Static" map provider. */ - googleStatic?: string; - } - /** A handler for the markerAdded event. */ - onMarkerAdded?: Function; - markerAddedAction?: Function; - /** A URL pointing to the custom icon to be used for map markers. */ - markerIconSrc?: string; - /** A handler for the markerRemoved event. */ - onMarkerRemoved?: Function; - markerRemovedAction?: Function; - /** An array of markers displayed on a map. */ - markers?: Array; - /** The name of the current map data provider. */ - provider?: string; - /** A handler for the ready event. */ - onReady?: Function; - readyAction?: Function; - /** A handler for the routeAdded event. */ - onRouteAdded?: Function; - routeAddedAction?: Function; - /** A handler for the routeRemoved event. */ - onRouteRemoved?: Function; - routeRemovedAction?: Function; - /** An array of routes shown on the map. */ - routes?: Array; - /** The type of a map to display. */ - type?: string; - /** Specifies the width of the widget. */ - width?: number; - /** The zoom level of the map. */ - zoom?: number; - /** Adds a marker to the map. */ - addMarker(markerOptions: Object): JQueryPromise; - /** Adds a route to the map. */ - addRoute(options: Object): JQueryPromise; - /** Removes a marker from the map. */ - removeMarker(marker: Object): JQueryPromise; - /** Removes a route from the map. */ - removeRoute(route: any): JQueryPromise; + /** An object, a string, or an array specifying the location displayed at the center of the widget. */ + center?: { + /** The latitude location displayed in the center of the widget. */ + lat?: number; + /** The longitude location displayed in the center of the widget. */ + lng?: number; }; + /** A handler for the click event. */ + onClick?: any; + clickAction?: any; + /** Specifies whether or not map widget controls are available. */ + controls?: boolean; + /** Specifies the height of the widget. */ + height?: number; + /** A key used to authenticate the application within the required map provider. */ + key?: { + /** A key used to authenticate the application within the "Bing" map provider. */ + bing?: string; + /** A key used to authenticate the application within the "Google" map provider. */ + google?: string; + /** A key used to authenticate the application within the "Google Static" map provider. */ + googleStatic?: string; + } + /** A handler for the markerAdded event. */ + onMarkerAdded?: Function; + markerAddedAction?: Function; + /** A URL pointing to the custom icon to be used for map markers. */ + markerIconSrc?: string; + /** A handler for the markerRemoved event. */ + onMarkerRemoved?: Function; + markerRemovedAction?: Function; + /** An array of markers displayed on a map. */ + markers?: Array; + /** The name of the current map data provider. */ + provider?: string; + /** A handler for the ready event. */ + onReady?: Function; + readyAction?: Function; + /** A handler for the routeAdded event. */ + onRouteAdded?: Function; + routeAddedAction?: Function; + /** A handler for the routeRemoved event. */ + onRouteRemoved?: Function; + routeRemovedAction?: Function; + /** An array of routes shown on the map. */ + routes?: Array; + /** The type of a map to display. */ + type?: string; + /** Specifies the width of the widget. */ + width?: number; + /** The zoom level of the map. */ + zoom?: number; } /** An interactive map widget. */ export class dxMap extends Widget { constructor(element: JQuery, options?: dxMapOptions); constructor(element: Element, options?: dxMapOptions); + /** Adds a marker to the map. */ + addMarker(markerOptions: Object): JQueryPromise; + /** Adds a route to the map. */ + addRoute(options: Object): JQueryPromise; + /** Removes a marker from the map. */ + removeMarker(marker: Object): JQueryPromise; + /** Removes a route from the map. */ + removeRoute(route: any): JQueryPromise; } export interface dxLookupOptions extends dxDropDownListOptions { /** An object defining widget animation options. */ @@ -1628,7 +1623,7 @@ declare module DevExpress.ui { pageLoadMode?: string; /** Specifies whether or not to display controls used to select list items. */ showSelectionControls?: boolean; - /** Specifies whether the list supports single item selection or multi-selection. */ + /** Specifies item selection mode. */ selectionMode?: string; selectAllText?: string; /** Specifies the array of items for a context menu called for a list item. */ @@ -1643,6 +1638,7 @@ declare module DevExpress.ui { allowItemReordering?: boolean; /** Specifies whether or not to show the loading panel when the DataSource bound to the widget is loading data. */ indicateLoading?: boolean; + activeStateEnabled?: boolean; } /** A list widget. */ export class dxList extends CollectionWidget { @@ -1746,6 +1742,8 @@ declare module DevExpress.ui { editEnabled?: boolean; /** Specifies the way an end-user applies the selected value. */ applyValueMode?: string; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; } /** A drop-down editor widget. */ export class dxDropDownEditor extends dxTextBox { @@ -1887,77 +1885,14 @@ declare module DevExpress.ui { constructor(element: Element, options?: dxBoxOptions); } export interface dxAutocompleteOptions extends dxDropDownListOptions { - accessKey?: string; - activeStateEnabled?: boolean; - attr?: any; - dataSource?: any; - disabled?: boolean; - displayValue?: string; - fieldEditEnabled?: boolean; - focusStateEnabled?: boolean; - height?: string | number | (() => string | number); - hint?: string; - hoverStateEnabled?: boolean; - isValid?: boolean; - items?: any[]; - /** - * The template to be used for rendering items. - * Defaults Value: "item" - */ - itemTemplate?: string | Node | JQuery | (() => string | Node | JQuery); - /** Specifies the maximum count of items displayed by the widget. */ - maxItemCount?: number; - - maxLength?: string | number; - /** The minimum number of characters that must be entered into the text box to begin a search. */ - minSearchLength?: number; - - - mode?: string; // "text" | "email" | "search" | "tel" | "url" | "password" - onChange?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; - onClosed?: (e: { component: any; element: JQuery; model: any }) => void; - onContentReady?: (e: { component: any; element: JQuery; model: any }) => void; - onCopy?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; - onCut?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; - onDisposing?: (e: { component: any; element: JQuery; model: any }) => void; - onEnterKey?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; - onFocusIn?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; - onFocusOut?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; - onInitialized?: (e: { component: any; element: JQuery }) => void; - onInput?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; - onItemClick?: (e: { component: any; element: JQuery; model: any; itemElement: HTMLElement }) => void; - onKeyDown?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; - onKeyPress?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; - onKeyUp?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; - onOpened?: (e: { component: any; element: JQuery; model: any }) => void; - onOptionChanged?: (e: { component: any; element: JQuery; model: any; value: any }) => void; - onPaste?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; - onSelectionChanged?: (e: { component: any; element: JQuery; model: any; selectedItem: any }) => void; - onValueChanged?: (e: { component: any; element: JQuery; model: any; value: any; previousValue: any; itemData: any; jQueryEvent: JQueryEventObject }) => void; - opened?: boolean; - placeholder?: string; - readOnly?: boolean; - rtlEnabled?: boolean; - searchExpr?: string; - searchMode?: string; // "contains" | "startswith" - searchTimeout?: number; - /** Gets the currently selected item. */ - selectedItem?: any; - showClearButton?: boolean; - spellcheck?: boolean; - tabIndex?: number; - text?: string; - validationError?: any; - validationMessageMode?: string; // "auto" | "always" /** Specifies the current value displayed by the widget. */ value?: string; - /** - * CAn be any DOM event names separated by spaces. - */ - valueChangeEvent?: string; - valueExpr?: string | Function; - visible?: boolean; - width?: string | number | (() => string | number); + /** The minimum number of characters that must be entered into the text box to begin a search. */ + minSearchLength?: number; + /** Specifies the maximum count of items displayed by the widget. */ + maxItemCount?: number; + /** Gets the currently selected item. */ + selectedItem?: Object; } /** A textbox widget that supports autocompletion. */ export class dxAutocomplete extends dxDropDownList { @@ -1987,6 +1922,8 @@ declare module DevExpress.ui { itemTitleTemplate?: any; /** The index number of the currently selected item. */ selectedIndex?: number; + /** Specifies whether widget content is rendered when the widget is shown or when rendering the widget. */ + deferRendering?: boolean; } /** A widget that displays data source items on collapsible panels. */ export class dxAccordion extends CollectionWidget { @@ -1996,6 +1933,8 @@ declare module DevExpress.ui { collapseItem(index: number): JQueryPromise; /** Expands the specified item. */ expandItem(index: number): JQueryPromise; + /** Updates the dimensions of the widget contents. */ + updateDimensions(): JQueryPromise; } export interface dxFileUploaderOptions extends EditorOptions { /** A read-only option that holds a File instance representing the selected file. */ @@ -2031,6 +1970,12 @@ declare module DevExpress.ui { uploadFailedMessage?: string; /** Specifies how the widget uploads files. */ uploadMode?: string; + /** A handler for the uploaded event. */ + onUploaded?: Function; + /** A handler for the uploaded event. */ + onProgress?: Function; + /** A handler for the uploadError event. */ + onUploadError?: Function; } /** A widget used to select and upload a file or multiple files. */ export class dxFileUploader extends Editor { @@ -2135,6 +2080,7 @@ interface JQuery { dxValidator(options: "instance"): DevExpress.ui.dxValidator; dxValidator(options: string): any; dxValidator(options: string, ...params: any[]): any; + dxValidator(options: DevExpress.ui.dxValidatorOptions): JQuery; dxValidationGroup(): JQuery; dxValidationGroup(options: "instance"): DevExpress.ui.dxValidationGroup; dxValidationGroup(options: string): any; @@ -2143,6 +2089,7 @@ interface JQuery { dxValidationSummary(options: "instance"): DevExpress.ui.dxValidationSummary; dxValidationSummary(options: string): any; dxValidationSummary(options: string, ...params: any[]): any; + dxValidationSummary(options: DevExpress.ui.dxValidationSummaryOptions): JQuery; dxTooltip(): JQuery; dxTooltip(options: "instance"): DevExpress.ui.dxTooltip; dxTooltip(options: string): any; @@ -2308,6 +2255,11 @@ interface JQuery { dxAccordion(options: string): any; dxAccordion(options: string, ...params: any[]): any; dxAccordion(options: DevExpress.ui.dxAccordionOptions): JQuery; + dxResponsiveBox(): JQuery; + dxResponsiveBox(options: "instance"): DevExpress.ui.dxResponsiveBox; + dxResponsiveBox(options: string): any; + dxResponsiveBox(options: string, ...params: any[]): any; + dxResponsiveBox(options: DevExpress.ui.dxResponsiveBoxOptions): JQuery; dxAutocomplete(): JQuery; dxAutocomplete(options: "instance"): DevExpress.ui.dxAutocomplete; dxAutocomplete(options: string): any; @@ -2415,6 +2367,8 @@ declare module DevExpress.ui { swipeEnabled?: boolean; /** A template to be used for rendering widget content. */ contentTemplate?: any; + /** The template to be used for rendering an item title. */ + itemTitleTemplate?: any; } /** A widget that is similar to a traditional tab control, but optimized for the phone with simplified end-user interaction. */ export class dxPivot extends CollectionWidget { @@ -2666,13 +2620,17 @@ declare module DevExpress.data { /** Sets the fields option. */ fields(fields: Array): void; /** Gets current options of a specified field. */ - field(id: number): PivotGridField; + field(id: any): PivotGridField; /** Sets one or more options of a specified field. */ - field(id: number, field: PivotGridField): void; + field(id: any, field: PivotGridField): void; /** Collapses a specified header item. */ collapseHeaderItem(area: string, path: Array): void; /** Expands a specified header item. */ expandHeaderItem(area: string, path: Array): void; + /** Expands all header items of a field. */ + expandAll(id: any): void; + /** Collapses all header items of a field. */ + collapseAll(id: any): void; /** Disposes of all resources associated with this PivotGridDataSource. */ dispose(): void; on(eventName: string, eventHandler: Function): PivotGridDataSource; @@ -2685,6 +2643,10 @@ declare module DevExpress.ui { export interface dxSchedulerOptions extends WidgetOptions { /** Specifies a date displayed on the current scheduler view by default. */ currentDate?: Date; + /** The earliest date the widget allows you to select. */ + min?: Date; + /** The latest date the widget allows you to select. */ + max?: Date; /** Specifies the view used in the scheduler by default. */ currentView?: string; /** A data source used to fetch data to be displayed by the widget. */ @@ -2720,15 +2682,15 @@ declare module DevExpress.ui { /** Specifies the label of the Appointment popup window field that allows end users to assign a resource of this kind. */ label?: string; }>; - /** A handler for the AppoinmentAdding event. */ + /** A handler for the AppointmentAdding event. */ onAppointmentAdding?: Function; /** A handler for the appointmentAdded event. */ onAppointmentAdded?: Function; - /** A handler for the AppoinmentUpdating event. */ + /** A handler for the AppointmentUpdating event. */ onAppointmentUpdating?: Function; /** A handler for the appointmentUpdated event. */ onAppointmentUpdated?: Function; - /** A handler for the AppoinmentDeleting event. */ + /** A handler for the AppointmentDeleting event. */ onAppointmentDeleting?: Function; /** A handler for the appointmentDeleted event. */ onAppointmentDeleted?: Function; @@ -2973,11 +2935,11 @@ declare module DevExpress.ui { alignment?: string; /** Specifies whether the values in a column can be edited at runtime. Setting this option makes sense only when editing is enabled for a grid. */ allowEditing?: boolean; - /** Specifies whether or not a column can be used for filtering grid records. Setting this option makes sense only when the filter row and column header filtering are visible. */ + /** Specifies whether or not a column can be used for filtering grid records. Setting this option makes sense only when the filter row and column header filtering are visible. */ allowFiltering?: boolean; /** Specifies whether or not the column can be anchored to a grid edge by end users. Setting this option makes sense only when the columnFixing | enabled option is set to true. */ allowFixing?: boolean; - /** Specifies if a column can be used for searching grid records. Setting this option makes sense only when the search panel is visible. */ + /** Specifies if a column can be used for searching grid records. Setting this option makes sense only when the search panel is visible. */ allowSearch?: boolean; /** Specifies whether a column can be used for grouping grid records at runtime. Setting this option makes sense only when the group panel is visible. */ allowGrouping?: boolean; @@ -3001,9 +2963,9 @@ declare module DevExpress.ui { cellTemplate?: any; /** Specifies a CSS class to be applied to a column. */ cssClass?: string; - /** Specifies a callback function that determines values for column cells to be used for grouping. */ + /** Specifies a field name or a function that returns a field name or a value to be used for grouping column cells. */ calculateGroupValue?: any; - /** Specifies a callback function that returns a value or the name of the field to be used for sorting column cells. */ + /** Specifies a field name or a function that returns a field name or a value to be used for sorting column cells. */ calculateSortValue?: any; /** Specifies a callback function that returns the text to be displayed in the cells of a column. */ customizeText?: (cellInfo: { value: any; valueText: string }) => string; @@ -3041,9 +3003,7 @@ declare module DevExpress.ui { lookup?: { /** Specifies whether or not a user can nullify values of a lookup column. */ allowClearing?: boolean; - /** - * Specifies the data source providing data for a lookup column. - */ + /** Specifies the data source providing data for a lookup column. */ dataSource?: any; /** Specifies the expression defining the data source field whose values must be displayed. */ displayExpr?: any; @@ -3137,7 +3097,7 @@ declare module DevExpress.ui { /** Specifies the width of the column chooser panel. */ width?: number; }; - /** Specifies options for column fixing. */ + /** Specifies options for column fixing. */ columnFixing?: { /** Indicates if column fixing is enabled. */ enabled?: boolean; @@ -3171,10 +3131,8 @@ declare module DevExpress.ui { cancel?: string; } }; - /** - * An array of grid columns. - */ - columns?: dxDataGridColumn[]; + /** An array of grid columns. */ + columns?: Array; onContentReady?: Function; contentReadyAction?: Function; /** Specifies a function that customizes grid columns after they are created. */ @@ -3271,9 +3229,7 @@ declare module DevExpress.ui { autoExpandAll?: boolean; /** Specifies the message displayed in a group row when the corresponding group is continued from the previous page. */ groupContinuedMessage?: string; - /** - * Specifies the message displayed in a group row when the corresponding group continues on the next page. - */ + /** Specifies the message displayed in a group row when the corresponding group continues on the next page. */ groupContinuesMessage?: string; }; /** Specifies options that configure the group panel. */ @@ -3321,7 +3277,7 @@ declare module DevExpress.ui { }; /** Specifies paging options. */ paging?: { - /** Specifies whether dxDataGrid loads data page by page or all at once. */ + /** Specifies whether dxDataGrid loads data page by page or all at once. */ enabled?: boolean; /** Specifies the grid page that should be displayed by default. */ pageIndex?: number; @@ -3518,7 +3474,7 @@ declare module DevExpress.ui { precision?: number; /** Specifies whether or not a summary item must be displayed in the group footer. */ showInGroupFooter?: boolean; - /** Indicates whether to display group summary items in brackets of the group row header or to align them by the corresponding columns within the group row. */ + /** Indicates whether to display group summary items in parentheses after the group row header or to align them by the corresponding columns within the group row. */ alignByColumn?: boolean; /** Specifies the column that must hold the summary item when this item is displayed in the group footer or aligned by a column in the group row. */ showInColumn?: string; @@ -3587,7 +3543,7 @@ declare module DevExpress.ui { getKeyByRowIndex(rowIndex: number): any; /** Adds a new column to a grid. */ addColumn(columnOptions: dxDataGridColumn): void; - /** Displays the load panel. */ + /** Displays the load panel. */ beginCustomLoading(messageText: string): void; /** Discards changes made in a grid. */ cancelEditData(): void; @@ -3602,9 +3558,9 @@ declare module DevExpress.ui { /** Returns the number of data columns in a grid. */ columnCount(): number; /** Returns the value of a specific column option. */ - columnOption(id: number, optionName: string): any; + columnOption(id: any, optionName: string): any; /** Sets an option of a specific column. */ - columnOption(id: number, optionName: string, optionValue: any): void; + columnOption(id: any, optionName: string, optionValue: any): void; /** Returns the options of a column by an identifier. */ columnOption(id: any): Object; /** Sets several options of a column at once. */ @@ -3613,7 +3569,7 @@ declare module DevExpress.ui { editCell(rowIndex: number, columnIndex: number): void; /** Sets a specific row into the editing state. */ editRow(rowIndex: number): void; - /** Hides the load panel. */ + /** Hides the load panel. */ endCustomLoading(): void; /** Expands groups or master rows in a grid. */ expandAll(groupIndex: number): void; @@ -3629,9 +3585,9 @@ declare module DevExpress.ui { filter(): any; /** Returns a filter expression applied to the grid using all possible scenarious. */ getCombinedFilter(): any; - /** Gets the keys of currently selected grid records. */ + /** Gets the keys of currently selected grid records. */ getSelectedRowKeys(): Array; - /** Gets the data objects of currently selected grid records. */ + /** Gets the data objects of currently selected grid records. */ getSelectedRowsData(): Array; /** Hides the column chooser panel. */ hideColumnChooser(): void; @@ -3653,9 +3609,7 @@ declare module DevExpress.ui { removeRow(rowIndex: number): void; /** Saves changes made in a grid. */ saveEditData(): void; - /** - * Searches grid records by a search string. - */ + /** Searches grid records by a search string. */ searchByText(text: string): void; /** Selects all grid records. */ selectAll(): void; @@ -3790,6 +3744,8 @@ declare module DevExpress.ui { updateDimensions(): void; } export interface dxPivotGridFieldChooserOptions extends WidgetOptions { + /** Specifies the height of the widget. */ + height?: any; /** Specifies the field chooser layout. */ layout?: number; /** The data source of a dxPivotGrid widget. */ @@ -3885,7 +3841,7 @@ declare module DevExpress.framework { onExecute?: any; /** Indicates whether or not the widget that displays this command is disabled. */ disabled?: boolean; - /** Specifies whether the current command should is rendered when a view is being rendered, or after a view has been shown. */ + /** Specifies whether the current command is rendered when a view is being rendered or after a view is shown. */ renderStage?: string; /** Specifies the name of the icon shown inside the widget associated with this command. */ icon?: string; @@ -3916,7 +3872,7 @@ declare module DevExpress.framework { format(obj: Object): string; } export interface StateManagerOptions { - /** A storage to which the state manager saves the application state. */ + /** A storage to which the state manager saves the application state. */ storage?: Object; } /** An object used to store the current application state. */ @@ -4000,7 +3956,7 @@ declare module DevExpress.framework { canBack(): boolean; /** Calls the clearState() method of the application's StateManager object. */ clearState(): void; - /** Creates global navigation commands. */ + /** Creates global navigation commands. */ createNavigation(navigationConfig: Array): void; /** Returns an HTML template of the specified view. */ getViewTemplate(viewName: string): JQuery; @@ -4193,7 +4149,6 @@ declare module DevExpress.viz.core { weight?: number; } export interface Hatching { - /** Specifies how to apply hatching to highlight a selected series. */ direction?: string; /** Specifies the opacity of hatching lines. */ opacity?: number; @@ -4227,6 +4182,7 @@ declare module DevExpress.viz.core { color?: string; /** Specifies the z-index for tooltips. */ zIndex?: number; + container?: any; /** Specifies text and appearance of a set of tooltips. */ customizeTooltip?: (arg: Object) => { color?: string; text?: string }; /** Specifies whether or not the tooltip is enabled. */ @@ -4300,7 +4256,7 @@ declare module DevExpress.viz.core { margin?: viz.core.Margins; /** Specifies the size of item markers in the legend in pixels. */ markerSize?: number; - /** Specifies whether to arrange legend items horizontally or vertically. */ + /** Specifies whether to arrange legend items horizontally or vertically. */ orientation?: string; /** Specifies the spacing between the legend left/right border and legend items in pixels. */ paddingLeftRight?: number; @@ -4585,7 +4541,6 @@ declare module DevExpress.viz.charts { /** Specifies the dash style of the series' line. */ dashStyle?: string; hoverMode?: string; - /** An object defining configuration options for a hovered series. */ hoverStyle?: { /** An object defining the border options for a hovered series. */ border?: viz.core.DashedBorder; @@ -4593,7 +4548,6 @@ declare module DevExpress.viz.charts { color?: string; /** Specifies the dash style for the line in a hovered series. */ dashStyle?: string; - /** Specifies the hatching options to be applied when a series is hovered over. */ hatching?: viz.core.Hatching; /** Specifies the width of a line in a hovered series. */ width?: number; @@ -4608,7 +4562,6 @@ declare module DevExpress.viz.charts { opacity?: number; /** Specifies the series elements to highlight when the series is selected. */ selectionMode?: string; - /** An object defining configuration options for a selected series. */ selectionStyle?: { /** An object defining the border options for a selected series. */ border?: viz.core.DashedBorder; @@ -4616,7 +4569,6 @@ declare module DevExpress.viz.charts { color?: string; /** Specifies the dash style for the line in a selected series. */ dashStyle?: string; - /** Specifies the hatching options to be applied when a series is selected. */ hatching?: viz.core.Hatching; /** Specifies the width of a line in a selected series. */ width?: number; @@ -5579,7 +5531,7 @@ declare module DevExpress.viz.charts { /** A handler for the legendClick event. */ onLegendClick?: any; legendClick?: any; - /** Specifies how the chart must behave when series point labels overlap. */ + /** Specifies how a chart must behave when series point labels overlap. */ resolveLabelOverlapping?: string; } /** A circular chart widget for HTML JS applications. */ @@ -5952,9 +5904,7 @@ declare module DevExpress.viz.rangeSelector { behavior?: { /** Indicates whether or not you can swap sliders. */ allowSlidersSwap?: boolean; - /** -Indicates whether or not animation is enabled. - */ + /** Indicates whether or not animation is enabled. */ animationEnabled?: boolean; /** Specifies when to call the onSelectedRangeChanged function. */ callSelectedRangeChanged?: string; @@ -6067,9 +6017,7 @@ Indicates whether or not animation is enabled. maxRange?: any; /** Specifies the number of minor ticks between neighboring major ticks. */ minorTickCount?: number; - /** -Specifies an interval between minor ticks. - */ + /** Specifies an interval between minor ticks. */ minorTickInterval?: any; /** Specifies the minimum range that can be selected. */ minRange?: any; From a1a5ef64361e3379d0e2829853d793b05086b80e Mon Sep 17 00:00:00 2001 From: ntilwalli Date: Wed, 7 Oct 2015 10:17:08 -0400 Subject: [PATCH 15/30] Update map function to allow Element argument The map(...) function allows both string and Element types as the first argument, documented here, https://www.mapbox.com/mapbox.js/api/v2.2.2/l-mapbox-map/ I've updated accordingly. --- mapbox/mapbox.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapbox/mapbox.d.ts b/mapbox/mapbox.d.ts index 3c774bdf6..1d4d7e19f 100644 --- a/mapbox/mapbox.d.ts +++ b/mapbox/mapbox.d.ts @@ -18,8 +18,8 @@ declare module L.mapbox { /** * Create and automatically configure a map with layers, markers, and interactivity. */ - function map(element: string, id: string, options?: MapOptions): L.mapbox.Map; - function map(element: string, tilejson: any, options?: MapOptions): L.mapbox.Map; + function map(element: string|Element, id: string, options?: MapOptions): L.mapbox.Map; + function map(element: string|Element, tilejson: any, options?: MapOptions): L.mapbox.Map; interface MapOptions extends L.Map.MapOptions { featureLayer? : FeatureLayerOptions; From 76534619dd2e00ef7575225fec70eec5bd67a62a Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 7 Oct 2015 11:43:26 -0700 Subject: [PATCH 16/30] Added `target` property to ScrollSpyOptions The [docs](http://getbootstrap.com/javascript/#via-javascript-2) show this usage. ```js $('body').scrollspy({ target: '#navbar-example' }) ``` --- bootstrap/bootstrap.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap/bootstrap.d.ts b/bootstrap/bootstrap.d.ts index 3545eb310..491eb3045 100644 --- a/bootstrap/bootstrap.d.ts +++ b/bootstrap/bootstrap.d.ts @@ -22,6 +22,7 @@ interface ModalOptionsBackdropString { interface ScrollSpyOptions { offset?: number; + target?: string; } interface TooltipOptions { From bd0b6d16f83b72157f5b6335571b18792d33627b Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 7 Oct 2015 11:46:26 -0700 Subject: [PATCH 17/30] Adding test for scrollspy with target --- bootstrap/bootstrap-tests.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap/bootstrap-tests.ts b/bootstrap/bootstrap-tests.ts index 71698101f..fa4409fe3 100644 --- a/bootstrap/bootstrap-tests.ts +++ b/bootstrap/bootstrap-tests.ts @@ -17,6 +17,7 @@ $('#myModal').modal('toggle'); $('.dropdown-toggle').dropdown(); $('#navbar').scrollspy(); +$('body').scrollspy({ target: '#navbar-example' }); $('#element').tooltip('show'); @@ -42,4 +43,4 @@ $('.typeahead').typeahead({ highlighter: item => "" }); -$('#navbar').affix(); \ No newline at end of file +$('#navbar').affix(); From 22d5a3bccc039004944982be9967f52a12d9d8c7 Mon Sep 17 00:00:00 2001 From: Dave Allen Date: Wed, 7 Oct 2015 14:25:59 -0700 Subject: [PATCH 18/30] Updated definitions for Meteor version 1.2.0.2 --- meteor/meteor-tests.ts | 288 ++++++++++++++++++++++++++++++----------- meteor/meteor.d.ts | 82 +++++------- 2 files changed, 245 insertions(+), 125 deletions(-) diff --git a/meteor/meteor-tests.ts b/meteor/meteor-tests.ts index 6c5c24083..e6f1e6f28 100644 --- a/meteor/meteor-tests.ts +++ b/meteor/meteor-tests.ts @@ -1,16 +1,25 @@ /// + /** * All code below was copied from the examples at http://docs.meteor.com/. * When necessary, code was added to make the examples work (e.g. declaring a variable * that was assumed to have been declared earlier) */ + + /*********************************** Begin setup for tests ******************************/ var Rooms = new Mongo.Collection('rooms'); var Messages = new Mongo.Collection('messages'); -var Monkeys = new Mongo.Collection('monkeys'); +interface MonkeyDAO { + _id: string; + name: string; +} +var Monkeys = new Mongo.Collection('monkeys'); //var x = new Mongo.Collection('x'); //var y = new Mongo.Collection('y'); /********************************** End setup for tests *********************************/ + + /** * From Core, Meteor.startup section * Tests Meteor.isServer, Meteor.startup, Collection.insert(), Collection.find() @@ -18,26 +27,30 @@ var Monkeys = new Mongo.Collection('monkeys'); if (Meteor.isServer) { Meteor.startup(function () { if (Rooms.find().count() === 0) { - Rooms.insert({ name: "Initial room" }); + Rooms.insert({name: "Initial room"}); } }); } + /** * From Publish and Subscribe, Meteor.publish section **/ Meteor.publish("rooms", function () { - return Rooms.find({}, { fields: { secretInfo: 0 } }); + return Rooms.find({}, {fields: {secretInfo: 0}}); }); + Meteor.publish("adminSecretInfo", function () { - return Rooms.find({ admin: this.userId }, { fields: { secretInfo: 1 } }); + return Rooms.find({admin: this.userId}, {fields: {secretInfo: 1}}); }); + Meteor.publish("roomAndMessages", function (roomId) { check(roomId, String); return [ - Rooms.find({ _id: roomId }, { fields: { secretInfo: 0 } }), - Messages.find({ roomId: roomId }) + Rooms.find({_id: roomId}, {fields: {secretInfo: 0}}), + Messages.find({roomId: roomId}) ]; }); + /** * Also from Publish and Subscribe, Meteor.publish section */ @@ -46,45 +59,55 @@ Meteor.publish("counts-by-room", function (roomId) { check(roomId, String); var count = 0; var initializing = true; - var handle = Messages.find({ roomId: roomId }).observeChanges({ + var handle = Messages.find({roomId: roomId}).observeChanges({ added: function (id) { count++; - // if (!initializing) - // Todo: Not sure how to define in typescript - // self.changed("counts", roomId, {count: count}); +// if (!initializing) + +// Todo: Not sure how to define in typescript +// self.changed("counts", roomId, {count: count}); }, removed: function (id) { count--; - // Todo: Not sure how to define in typescript - // self.changed("counts", roomId, {count: count}); +// Todo: Not sure how to define in typescript +// self.changed("counts", roomId, {count: count}); } }); + initializing = false; - // Todo: Not sure how to define in typescript - // self.added("counts", roomId, {count: count}); + +// Todo: Not sure how to define in typescript +// self.added("counts", roomId, {count: count}); self.ready(); + self.onStop(function () { handle.stop(); }); }); + var Counts = new Mongo.Collection("counts"); + Tracker.autorun(function () { Meteor.subscribe("counts-by-room", Session.get("roomId")); }); + console.log("Current room has " + Counts.find(Session.get("roomId")).count + " messages."); + /** * From Publish and Subscribe, Meteor.subscribe section */ Meteor.subscribe("allplayers"); + /** * Also from Meteor.subscribe section */ Tracker.autorun(function () { - Meteor.subscribe("chat", { room: Session.get("current-room") }); + Meteor.subscribe("chat", {room: Session.get("current-room")}); Meteor.subscribe("privateMessages"); }); + /** * From Methods, Meteor.methods section */ @@ -92,20 +115,25 @@ Meteor.methods({ foo: function (arg1, arg2) { check(arg1, String); check(arg2, [Number]); + var you_want_to_throw_an_error = true; if (you_want_to_throw_an_error) throw new Meteor.Error("404", "Can't find my pants"); return "some return value"; }, + bar: function () { // .. do other stuff .. return "baz"; } }); + /** * From Methods, Meteor.Error section */ -throw new Meteor.Error("logged-out", "The user must be logged in to post a comment."); +throw new Meteor.Error("logged-out", + "The user must be logged in to post a comment."); + Meteor.call("methodName", function (error) { if (error.error === "logged-out") { Session.set("errorMessage", "Please log in to post a comment."); @@ -115,20 +143,39 @@ var error = new Meteor.Error("logged-out", "The user must be logged in to post a console.log(error.error === "logged-out"); console.log(error.reason === "The user must be logged in to post a comment."); console.log(error.details !== ""); + /** * From Methods, Meteor.call section */ -Meteor.call('foo', 1, 2, function (error, result) { }); +Meteor.call('foo', 1, 2, function (error, result) {} ); var result = Meteor.call('foo', 1, 2); -var Chatrooms = new Mongo.Collection("chatrooms"); -Messages = new Mongo.Collection("messages"); -var myMessages = Messages.find({ userId: Session.get('myUserId') }).fetch(); -Messages.insert({ text: "Hello, world!" }); -Messages.update(myMessages[0]._id, { $set: { important: true } }); + +/** + * From Collections, Mongo.Collection section + */ +// DA: I added the "var" keyword in there + +interface ChatroomsDAO { + _id?: string; +} +interface MessagesDAO { + _id?: string; +} +var Chatrooms = new Mongo.Collection("chatrooms"); +Messages = new Mongo.Collection("messages"); + +var myMessages = Messages.find({userId: Session.get('myUserId')}).fetch(); + +Messages.insert({text: "Hello, world!"}); + +Messages.update(myMessages[0]._id, {$set: {important: true}}); + var Posts = new Mongo.Collection("posts"); -Posts.insert({ title: "Hello world", body: "First post" }); +Posts.insert({title: "Hello world", body: "First post"}); + // Couldn't find assert() in the meteor docs //assert(Posts.find().count() === 1); + /** * Todo: couldn't figure out how to make this next line work with Typescript * since there is already a Collection constructor with a different signature @@ -138,48 +185,68 @@ Posts.insert({ title: "Hello world", body: "First post" }); Scratchpad.insert({number: i * 2}); assert(Scratchpad.find({number: {$lt: 9}}).count() === 5); **/ + var Animal = function (doc) { - // _.extend(this, doc); +// _.extend(this, doc); }; + // DA: I altered this to remove dependencies on Underscore Animal.prototype = { makeNoise: function () { console.log(this.sound); } }; + + +interface AnimalDAO { + _id?: string; + name: string; + sound: string; + makeNoise?: () => void; +} + // Define a Collection that uses Animal as its document -var Animals = new Mongo.Collection("Animals", { +var Animals = new Mongo.Collection("Animals", { transform: function (doc) { return new Animal(doc); } }); + // Create an Animal and call its makeNoise method -Animals.insert({ name: "raptor", sound: "roar" }); -Animals.findOne({ name: "raptor" }).makeNoise(); // prints "roar" +Animals.insert({name: "raptor", sound: "roar"}); +Animals.findOne({name: "raptor"}).makeNoise(); // prints "roar" + /** * From Collections, Collection.insert section */ // DA: I added the variable declaration statements to make this work var Lists = new Mongo.Collection('Lists'); var Items = new Mongo.Collection('Lists'); -var groceriesId = Lists.insert({ name: "Groceries" }); -Items.insert({ list: groceriesId, name: "Watercress" }); -Items.insert({ list: groceriesId, name: "Persimmons" }); + +var groceriesId = Lists.insert({name: "Groceries"}); +Items.insert({list: groceriesId, name: "Watercress"}); +Items.insert({list: groceriesId, name: "Persimmons"}); + /** * From Collections, collection.update section */ var Players = new Mongo.Collection('Players'); + Template['adminDashboard'].events({ 'click .givePoints': function () { - Players.update(Session.get("currentPlayer"), { $inc: { score: 5 } }); + Players.update(Session.get("currentPlayer"), {$inc: {score: 5}}); } }); + /** * Also from Collections, collection.update section */ Meteor.methods({ declareWinners: function () { - Players.update({ score: { $gt: 10 } }, { $addToSet: { badges: "Winner" } }, { multi: true }); + Players.update({score: {$gt: 10}}, + {$addToSet: {badges: "Winner"}}, + {multi: true}); } }); + /** * From Collections, collection.remove section */ @@ -188,57 +255,76 @@ Template['chat'].events({ Messages.remove(this._id); } }); + // DA: I added this next line var Logs = new Mongo.Collection('logs'); + Meteor.startup(function () { if (Meteor.isServer) { Logs.remove({}); - Players.remove({ karma: { $lt: -2 } }); + Players.remove({karma: {$lt: -2}}); } }); -Posts = new Mongo.Collection("posts"); + +/*** + * From Collections, collection.allow section + */ + +interface iPost { + _id: string; + owner: string; + userId: string; + locked: boolean; +} + +Posts = new Mongo.Collection("posts"); + Posts.allow({ - insert: function (userId, doc) { + insert: function (userId, doc: iPost) { // the user must be logged in, and the document must be owned by the user return (userId && doc.owner === userId); }, - update: function (userId, doc, fields, modifier) { + update: function (userId, doc: iPost, fields, modifier) { // can only change your own documents return doc.owner === userId; }, - remove: function (userId, doc) { + remove: function (userId, doc: iPost) { // can only remove your own documents return doc.owner === userId; }, fetch: ['owner'] }); + Posts.deny({ - update: function (userId, doc, fields, modifier) { + update: function (userId, doc: iPost, fields, modifier) { // can't change owners return doc.userId !== userId; }, - remove: function (userId, doc) { + remove: function (userId, doc: iPost) { // can't remove locked documents return doc.locked; }, fetch: ['locked'] // no need to fetch 'owner' }); + /** * From Collections, cursor.forEach section */ -var topPosts = Posts.find({}, { sort: { score: -1 }, limit: 5 }); +var topPosts = Posts.find({}, {sort: {score: -1}, limit: 5}); var count = 0; topPosts.forEach(function (post) { console.log("Title of post " + count + ": " + post.title); count += 1; }); + /** * From Collections, cursor.observeChanges section */ // DA: I added this line to make it work var Users = new Mongo.Collection('users'); + var count1 = 0; -var query = Users.find({ admin: true, onlineNow: true }); +var query = Users.find({admin: true, onlineNow: true}); var handle = query.observeChanges({ added: function (id, user) { count1++; @@ -249,38 +335,49 @@ var handle = query.observeChanges({ console.log("Lost one. We're now down to " + count1 + " admins."); } }); + // After five seconds, stop keeping the count. -setTimeout(function () { handle.stop(); }, 5000); +setTimeout(function () {handle.stop();}, 5000); + /** * From Sessions, Session.set section */ Tracker.autorun(function () { - Meteor.subscribe("chat-history", { room: Session.get("currentRoomId") }); + Meteor.subscribe("chat-history", {room: Session.get("currentRoomId")}); }); + // Causes the function passed to Tracker.autorun to be re-run, so // that the chat-history subscription is moved to the room "home". Session.set("currentRoomId", "home"); + /** * From Sessions, Session.get section */ // Page will say "We've always been at war with Eastasia" + // DA: commented out since transpiler didn't like append() //document.body.append(frag1); + // Page will change to say "We've always been at war with Eurasia" Session.set("enemy", "Eurasia"); + /** * From Sessions, Session.equals section */ var value; Session.get("key") === value; Session.equals("key", value); + /** * From Accounts, Meteor.users section */ Meteor.publish("userData", function () { - return Meteor.users.find({ _id: this.userId }, { fields: { 'other': 1, 'things': 1 } }); + return Meteor.users.find({_id: this.userId}, + {fields: {'other': 1, 'things': 1}}); }); -Meteor.users.deny({ update: function () { return true; } }); + +Meteor.users.deny({update: function () { return true; }}); + /** * From Accounts, Meteor.loginWithExternalService section */ @@ -290,6 +387,7 @@ Meteor.loginWithGithub({ if (err) Session.set('errorMessage', err.reason || 'Unknown error'); }); + /** * From Accounts, Accounts.ui.config section */ @@ -303,6 +401,7 @@ Accounts.ui.config({ }, passwordSignupFields: 'USERNAME_AND_OPTIONAL_EMAIL' }); + /** * From Accounts, Accounts.validateNewUser section */ @@ -315,10 +414,11 @@ Accounts.validateNewUser(function (user) { Accounts.validateNewUser(function (user) { return user.username !== "root"; }); + /** * From Accounts, Accounts.onCreateUser section */ -Accounts.onCreateUser(function (options, user) { +Accounts.onCreateUser(function(options, user) { var d6 = function () { return Math.floor(Math.random() * 6) + 1; }; user.dexterity = d6() + d6() + d6(); // We still want the default hook's 'profile' behavior. @@ -326,6 +426,7 @@ Accounts.onCreateUser(function (options, user) { user.profile = options.profile; return user; }); + /** * From Passwords, Accounts.emailTemplates section */ @@ -339,6 +440,7 @@ Accounts.emailTemplates.enrollAccount.text = function (user, url) { + " To activate your account, simply click the link below:\n\n" + url; }; + /** * From Templates, Template.myTemplate.helpers section */ @@ -351,33 +453,45 @@ Template['newTemplate'].helpers({ helperName: function () { } }); + Template['newTemplate'].created = function () { + }; + Template['newTemplate'].rendered = function () { + }; + Template['newTemplate'].destroyed = function () { + }; + Template['newTemplate'].events({ - 'click .something': function (event, template) { + 'click .something': function (event: Meteor.Event, template: Blaze.TemplateInstance) { } }); -Template.registerHelper('testHelper', function () { + +Template.registerHelper('testHelper', function() { return 'tester'; }); + var instance = Template.instance(); var data = Template.currentData(); var data = Template.parentData(1); var body = Template.body; + /** * From Match section */ var Chats = new Mongo.Collection('chats'); + Meteor.publish("chats-in-room", function (roomId) { // Make sure roomId is a string, not an arbitrary mongo selector object. check(roomId, String); - return Chats.find({ room: roomId }); + return Chats.find({room: roomId}); }); -Meteor.methods({ addChat: function (roomId, message) { + +Meteor.methods({addChat: function (roomId, message) { check(roomId, String); check(message, { text: String, @@ -385,31 +499,39 @@ Meteor.methods({ addChat: function (roomId, message) { // Optional, but if present must be an array of strings. tags: Match.Optional('Test String') }); + // ... do something with the message ... -} }); +}}); + /** * From Match patterns section */ var pat = { name: Match.Optional('test') }; -check({ name: "something" }, pat); // OK -check({}, pat); // OK -check({ name: undefined }, pat); // Throws an exception +check({ name: "something" }, pat) // OK +check({}, pat) // OK +check({ name: undefined }, pat) // Throws an exception + // Outside an object check(undefined, Match.Optional('test')); // OK + /** * From Deps, Tracker.autorun section */ Tracker.autorun(function () { var oldest = Monkeys.findOne('age = 20'); + if (oldest) Session.set("oldest", oldest.name); }); + Tracker.autorun(function (c) { - if (!Session.equals("shouldAlert", true)) + if (! Session.equals("shouldAlert", true)) return; + c.stop(); alert("Oh no!"); }); + /** * From Deps, Deps.Computation */ @@ -418,64 +540,84 @@ if (Tracker.active) { console.log('invalidated'); }); } + /** * From Tracker, Tracker.Dependency */ var weather = "sunny"; var weatherDep = new Tracker.Dependency; + var getWeather = function () { weatherDep.depend(); return weather; }; + var setWeather = function (w) { weather = w; // (could add logic here to only call changed() // if the new value is different from the old) weatherDep.changed(); }; + /** * From HTTP, HTTP.call section */ -Meteor.methods({ checkTwitter: function (userId) { +Meteor.methods({checkTwitter: function (userId) { check(userId, String); this.unblock(); - var result = HTTP.call("GET", "http://api.twitter.com/xyz", { params: { user: userId } }); + var result = HTTP.call("GET", "http://api.twitter.com/xyz", + {params: {user: userId}}); if (result.statusCode === 200) - return true; + return true return false; -} }); -HTTP.call("POST", "http://api.twitter.com/xyz", { data: { some: "json", stuff: 1 } }, function (error, result) { - if (result.statusCode === 200) { - Session.set("twizzled", true); - } -}); +}}); + + +HTTP.call("POST", "http://api.twitter.com/xyz", + {data: {some: "json", stuff: 1}}, + function (error, result) { + if (result.statusCode === 200) { + Session.set("twizzled", true); + } + }); + /** * From Email, Email.send section */ Meteor.methods({ sendEmail: function (to, from, subject, text) { check([to, from, subject, text], [String]); + // Let other method calls from the same client start running, // without waiting for the email sending to complete. this.unblock(); } }); + // In your client code: asynchronously send an email -Meteor.call('sendEmail', 'alice@example.com', 'Hello from Meteor!', 'This is a test of Email.send.'); +Meteor.call('sendEmail', + 'alice@example.com', + 'Hello from Meteor!', + 'This is a test of Email.send.'); + var testTemplate = new Blaze.Template(); var testView = new Blaze.View(); + +declare var el: HTMLElement; Blaze.render(testTemplate, el); -Blaze.renderWithData(testTemplate, { testData: 123 }, el); +Blaze.renderWithData(testTemplate, {testData: 123}, el); Blaze.remove(testView); Blaze.getData(el); Blaze.getData(testView); Blaze.toHTML(testTemplate); Blaze.toHTML(testView); -Blaze.toHTMLWithData(testTemplate, { test: 1 }); -Blaze.toHTMLWithData(testTemplate, function () { }); -Blaze.toHTMLWithData(testView, { test: 1 }); -Blaze.toHTMLWithData(testView, function () { }); -var reactiveVar1 = new ReactiveVar('test value'); -var reactiveVar2 = new ReactiveVar('test value', function (oldVal) { return true; }); -var varValue = reactiveVar1.get(); +Blaze.toHTMLWithData(testTemplate, {test: 1}); +Blaze.toHTMLWithData(testTemplate, function() {}); +Blaze.toHTMLWithData(testView, {test: 1}); +Blaze.toHTMLWithData(testView, function() {}); + +var reactiveVar1 = new ReactiveVar('test value'); +var reactiveVar2 = new ReactiveVar('test value', function(oldVal) { return true; }); + +var varValue: string = reactiveVar1.get(); reactiveVar1.set('new value'); diff --git a/meteor/meteor.d.ts b/meteor/meteor.d.ts index 54fe020b7..ee6c1db41 100644 --- a/meteor/meteor.d.ts +++ b/meteor/meteor.d.ts @@ -59,7 +59,7 @@ declare module Meteor { declare module DDP { interface DDPStatic { - subscribe(name: string, ...rest: any[]); + subscribe(name: string, ...rest: any[]): Meteor.SubscriptionHandle; call(method: string, ...parameters: any[]):void; apply(method: string, ...parameters: any[]):void; methods(IMeteorMethodsDictionary: any): any; @@ -290,8 +290,8 @@ interface MailComposerStatic { interface MailComposer { addHeader(name: string, value: string): void; setMessageOption(from: string, to: string, body: string, html: string): void; - streamMessage(); - pipe(stream: any /** fs.WriteStream **/); + streamMessage(): void; + pipe(stream: any /** fs.WriteStream **/): void; } /** * These are the modules and interfaces for packages that can't be automatically generated from the Meteor data.js file @@ -342,8 +342,8 @@ declare module Meteor { } declare module Accounts { - function addEmail(userId: string, newEmail: string, verified?: boolean); /** TODO: add return value **/ -function changePassword(oldPassword: string, newPassword: string, callback?: Function): void; + function addEmail(userId: string, newEmail: string, verified?: boolean): void; + function changePassword(oldPassword: string, newPassword: string, callback?: Function): void; function createUser(options: { username?: string; email?: string; @@ -359,23 +359,23 @@ function changePassword(oldPassword: string, newPassword: string, callback?: Fun function onEmailVerificationLink(callback: Function): void; function onEnrollmentLink(callback: Function): void; function onResetPasswordLink(callback: Function): void; - function removeEmail(userId: string, email: string); /** TODO: add return value **/ -function resetPassword(token: string, newPassword: string, callback?: Function): void; + function removeEmail(userId: string, email: string): void; + function resetPassword(token: string, newPassword: string, callback?: Function): void; function sendEnrollmentEmail(userId: string, email?: string): void; function sendResetPasswordEmail(userId: string, email?: string): void; function sendVerificationEmail(userId: string, email?: string): void; function setPassword(userId: string, newPassword: string, options?: { logout?: Object; }): void; - function setUsername(userId: string, newUsername: string); /** TODO: add return value **/ -var ui: { - config(options: { - requestPermissions?: Object; - requestOfflineToken?: Object; - forceApprovalPrompt?: Object; - passwordSignupFields?: string; - }): void; - }; + function setUsername(userId: string, newUsername: string): void; + var ui: { + config(options: { + requestPermissions?: Object; + requestOfflineToken?: Object; + forceApprovalPrompt?: Object; + passwordSignupFields?: string; + }): void; + }; function verifyEmail(token: string, callback?: Function): void; function config(options: { sendVerificationEmail?: boolean; @@ -383,39 +383,17 @@ var ui: { restrictCreationByEmailDomain?: string | Function; loginExpirationInDays?: number; oauthSecretKey?: string; - }); /** TODO: add return value **/ -function onLogin(func: Function); /** TODO: add return value **/ -function onLoginFailure(func: Function); /** TODO: add return value **/ -function user(); /** TODO: add return value **/ -function userId(); /** TODO: add return value **/ -function config(options: { - sendVerificationEmail?: boolean; - forbidClientAccountCreation?: boolean; - restrictCreationByEmailDomain?: string | Function; - loginExpirationInDays?: number; - oauthSecretKey?: string; -}); /** TODO: add return value **/ -function loggingIn(); /** TODO: add return value **/ -function logout(callback?: Function); /** TODO: add return value **/ -function logoutOtherClients(callback?: Function); /** TODO: add return value **/ -function onLogin(func: Function); /** TODO: add return value **/ -function onLoginFailure(func: Function); /** TODO: add return value **/ -function user(); /** TODO: add return value **/ -function userId(); /** TODO: add return value **/ -function config(options: { - sendVerificationEmail?: boolean; - forbidClientAccountCreation?: boolean; - restrictCreationByEmailDomain?: string | Function; - loginExpirationInDays?: number; - oauthSecretKey?: string; -}); /** TODO: add return value **/ -function onCreateUser(func: Function); /** TODO: add return value **/ -function onLogin(func: Function); /** TODO: add return value **/ -function onLoginFailure(func: Function); /** TODO: add return value **/ -function user(); /** TODO: add return value **/ -function userId(); /** TODO: add return value **/ -function validateLoginAttempt(func: Function); /** TODO: add return value **/ -function validateNewUser(func: Function); /** TODO: add return value **/ + }): void; + function onLogin(func: Function): { stop: () => void }; + function onLoginFailure(func: Function): { stop: () => void }; + function user(): Meteor.User; + function userId(): string; + function loggingIn(): boolean; + function logout(callback?: Function): void; + function logoutOtherClients(callback?: Function): void; + function onCreateUser(func: Function): void; + function validateLoginAttempt(func: Function): { stop: () => void }; + function validateNewUser(func: Function): boolean; } declare module App { @@ -636,8 +614,8 @@ declare module Mongo { transform?: Function; }): T; insert(doc: T, callback?: Function): string; - rawCollection(); /** TODO: add return value **/ - rawDatabase(); /** TODO: add return value **/ + rawCollection(): any; + rawDatabase(): any; remove(selector: Mongo.Selector | Mongo.ObjectID | string, callback?: Function): void; update(selector: Mongo.Selector | Mongo.ObjectID | string, modifier: Mongo.Modifier, options?: { multi?: boolean; @@ -808,7 +786,7 @@ interface PackageAPIStatic { new(): PackageAPI; } interface PackageAPI { - addAssets(filenames: string | string[], architecture: string | string[]); /** TODO: add return value **/ + addAssets(filenames: string | string[], architecture: string | string[]): void; addFiles(filenames: string | string[], architecture?: string | string[], options?: { bare?: boolean; }): void; From 31b6fe5575e371c1734188c158b4f685ae348ceb Mon Sep 17 00:00:00 2001 From: Phips Peter Date: Wed, 7 Oct 2015 16:16:18 -0700 Subject: [PATCH 19/30] Fix react-dnd HTML5 Backend The type signatures previously did not match the JavaScript definition for this module. --- react-dnd/react-dnd-tests.ts | 8 ++++---- react-dnd/react-dnd.d.ts | 10 +++------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/react-dnd/react-dnd-tests.ts b/react-dnd/react-dnd-tests.ts index 9846c6c83..2c92b7b33 100644 --- a/react-dnd/react-dnd-tests.ts +++ b/react-dnd/react-dnd-tests.ts @@ -13,7 +13,7 @@ import DragSource = ReactDnd.DragSource; import DropTarget = ReactDnd.DropTarget; import DragLayer = ReactDnd.DragLayer; import DragDropContext = ReactDnd.DragDropContext; -import HTML5Backend = require('react-dnd/modules/backends/HTML5'); +import HTML5Backend, { getEmptyImage } from 'react-dnd/modules/backends/HTML5'; import TestBackend = require('react-dnd/modules/backends/Test'); // Game Component @@ -82,11 +82,11 @@ module Knight { export class Knight extends React.Component { static defaultProps: KnightP; - + static create = React.createFactory(Knight); componentDidMount() { - var img = HTML5Backend.getEmptyImage(); + var img = getEmptyImage(); img.onload = () => this.props.connectDragPreview(img); } @@ -157,7 +157,7 @@ module BoardSquare { export class BoardSquare extends React.Component { static defaultProps: BoardSquareP; - + private _renderOverlay = (color: string) => { return r.div({ style: { diff --git a/react-dnd/react-dnd.d.ts b/react-dnd/react-dnd.d.ts index 151f0a404..982478f78 100644 --- a/react-dnd/react-dnd.d.ts +++ b/react-dnd/react-dnd.d.ts @@ -176,13 +176,9 @@ declare module "react-dnd" { } declare module "react-dnd/modules/backends/HTML5" { - enum _NativeTypes { FILE, URL, TEXT } - class HTML5Backend implements __ReactDnd.Backend { - static getEmptyImage(): any; // Image - static NativeTypes: _NativeTypes; - } - - export = HTML5Backend; + export enum NativeTypes { FILE, URL, TEXT } + export function getEmptyImage(): any; // Image + export default class HTML5Backend implements __ReactDnd.Backend {} } declare module "react-dnd/modules/backends/Test" { From de9e6a4867113dd11ca8aa4d7dc7913e55697152 Mon Sep 17 00:00:00 2001 From: Jason Young Date: Wed, 7 Oct 2015 18:05:10 -0700 Subject: [PATCH 20/30] Remove hard reference to underscore typings I removed the hard reference to the underscore typings. Keeping this reference in here makes it impossible to mix lodash and underscore in the same projects. In my case, another library is bringing in lodash, so I don't really have a choice. By leaving out this reference, underscore or lodash can be included separately, and the user will still get typing information on that. --- backbone/backbone.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/backbone/backbone.d.ts b/backbone/backbone.d.ts index f7c5945ad..4e40687a8 100644 --- a/backbone/backbone.d.ts +++ b/backbone/backbone.d.ts @@ -4,7 +4,6 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped /// -/// declare module Backbone { From 96c613b2cf23ce77524222ada3554b1c1f851bc0 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Thu, 8 Oct 2015 06:45:14 +0500 Subject: [PATCH 21/30] lodash: added signatures of the method _.dropRightWhile --- lodash/lodash-tests.ts | 48 ++++++++++++++++++--- lodash/lodash.d.ts | 94 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+), 6 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index db15ebc4a..fdc0016e4 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -240,6 +240,42 @@ module TestDropRight { result = _(list).dropRight(42).value(); } +// _.dropRightWhile +module TestDropRightWhile { + let array: TResult[]; + let list: _.List; + let predicateFn: (value: TResult, index: number, collection: _.List) => boolean; + let result: TResult[]; + + result = _.dropRightWhile(array); + result = _.dropRightWhile(array, predicateFn); + result = _.dropRightWhile(array, predicateFn, any); + result = _.dropRightWhile(array, ''); + result = _.dropRightWhile(array, '', any); + result = _.dropRightWhile<{a: number;}, TResult>(array, {a: 42}); + + result = _.dropRightWhile(list); + result = _.dropRightWhile(list, predicateFn); + result = _.dropRightWhile(list, predicateFn, any); + result = _.dropRightWhile(list, ''); + result = _.dropRightWhile(list, '', any); + result = _.dropRightWhile<{a: number;}, TResult>(list, {a: 42}); + + result = _(array).dropRightWhile().value(); + result = _(array).dropRightWhile(predicateFn).value(); + result = _(array).dropRightWhile(predicateFn, any).value(); + result = _(array).dropRightWhile('').value(); + result = _(array).dropRightWhile('', any).value(); + result = _(array).dropRightWhile<{a: number;}>({a: 42}).value(); + + result = _(list).dropRightWhile().value(); + result = _(list).dropRightWhile(predicateFn).value(); + result = _(list).dropRightWhile(predicateFn, any).value(); + result = _(list).dropRightWhile('').value(); + result = _(list).dropRightWhile('', any).value(); + result = _(list).dropRightWhile<{a: number;}, TResult>({a: 42}).value(); +} + // _.dropWhile module TestDropWhile { let array: TResult[]; @@ -250,14 +286,14 @@ module TestDropWhile { result = _.dropWhile(array); result = _.dropWhile(array, predicateFn); result = _.dropWhile(array, predicateFn, any); - result = _.dropWhile(array, '') + result = _.dropWhile(array, ''); result = _.dropWhile(array, '', any); result = _.dropWhile<{a: number;}, TResult>(array, {a: 42}); result = _.dropWhile(list); result = _.dropWhile(list, predicateFn); result = _.dropWhile(list, predicateFn, any); - result = _.dropWhile(list, '') + result = _.dropWhile(list, ''); result = _.dropWhile(list, '', any); result = _.dropWhile<{a: number;}, TResult>(list, {a: 42}); @@ -648,14 +684,14 @@ module TestTakeRightWhile { result = _.takeRightWhile(array); result = _.takeRightWhile(array, predicateFn); result = _.takeRightWhile(array, predicateFn, any); - result = _.takeRightWhile(array, '') + result = _.takeRightWhile(array, ''); result = _.takeRightWhile(array, '', any); result = _.takeRightWhile<{a: number;}, TResult>(array, {a: 42}); result = _.takeRightWhile(list); result = _.takeRightWhile(list, predicateFn); result = _.takeRightWhile(list, predicateFn, any); - result = _.takeRightWhile(list, '') + result = _.takeRightWhile(list, ''); result = _.takeRightWhile(list, '', any); result = _.takeRightWhile<{a: number;}, TResult>(list, {a: 42}); @@ -684,14 +720,14 @@ module TestTakeWhile { result = _.takeWhile(array); result = _.takeWhile(array, predicateFn); result = _.takeWhile(array, predicateFn, any); - result = _.takeWhile(array, '') + result = _.takeWhile(array, ''); result = _.takeWhile(array, '', any); result = _.takeWhile<{a: number;}, TResult>(array, {a: 42}); result = _.takeWhile(list); result = _.takeWhile(list, predicateFn); result = _.takeWhile(list, predicateFn, any); - result = _.takeWhile(list, '') + result = _.takeWhile(list, ''); result = _.takeWhile(list, '', any); result = _.takeWhile<{a: number;}, TResult>(list, {a: 42}); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 5a3e0df9e..dd084788e 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -457,6 +457,100 @@ declare module _ { dropRight(n?: number): LoDashArrayWrapper; } + //_.dropRightWhile + interface LoDashStatic { + /** + * Creates a slice of array excluding elements dropped from the end. Elements are dropped until predicate + * returns falsey. The predicate is bound to thisArg and invoked with three arguments: (value, index, array). + * + * If a property name is provided for predicate the created _.property style callback returns the property + * value of the given element. + * + * If a value is also provided for thisArg the created _.matchesProperty style callback returns true for + * elements that have a matching property value, else false. + * + * If an object is provided for predicate the created _.matches style callback returns true for elements that + * match the properties of the given object, else false. + * + * @param array The array to query. + * @param predicate The function invoked per iteration. + * @param thisArg The this binding of predicate. + * @return Returns the slice of array. + */ + dropRightWhile( + array: List, + predicate?: ListIterator, + thisArg?: any + ): TValue[]; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + array: List, + predicate?: string, + thisArg?: any + ): TValue[]; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + array: List, + predicate?: TWhere + ): TValue[]; + } + + interface LoDashArrayWrapper { + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashArrayWrapper; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: string, + thisArg?: any + ): LoDashArrayWrapper; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: TWhere + ): LoDashArrayWrapper; + } + + interface LoDashObjectWrapper { + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: ListIterator, + thisArg?: any + ): LoDashArrayWrapper; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: string, + thisArg?: any + ): LoDashArrayWrapper; + + /** + * @see _.dropRightWhile + */ + dropRightWhile( + predicate?: TWhere + ): LoDashArrayWrapper; + } + //_.dropWhile interface LoDashStatic { /** From 843e046e8a33650a706032640847c964de5855d1 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Thu, 8 Oct 2015 07:19:25 +0500 Subject: [PATCH 22/30] lodash: changed signatures of the method _.union --- lodash/lodash-tests.ts | 29 +++++++++++++++++++++++++++-- lodash/lodash.d.ts | 34 +++++++++++++++++++++------------- 2 files changed, 48 insertions(+), 15 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index db15ebc4a..ff18106b0 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -710,9 +710,34 @@ module TestTakeWhile { result = _(list).takeWhile<{a: number;}, TResult>({a: 42}).value(); } -result = _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); +// _.union +module TestUnion { + let array: TResult[]; + let list: _.List; + let result: TResult[]; -result = _([1, 2, 3]).union([101, 2, 1, 10], [2, 1]).value(); + result = _.union(); + + result = _.union(array); + result = _.union(array, list); + result = _.union(array, list, array); + + result = _.union(list); + result = _.union(list, array); + result = _.union(list, array, list); + + result = _(array).union().value(); + result = _(array).union(list).value(); + result = _(array).union(list, array).value(); + + result = _(array).union().value(); + result = _(array).union(list).value(); + result = _(array).union(list, array).value(); + + result = _(list).union().value(); + result = _(list).union(array).value(); + result = _(list).union(array, list).value(); +} result = _.uniq([1, 2, 1, 3, 1]); result = _.uniq([1, 1, 2, 2, 3], true); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 5a3e0df9e..ca36002d5 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -1662,24 +1662,32 @@ declare module _ { //_.union interface LoDashStatic { /** - * Creates an array of unique values, in order, of the provided arrays using strict - * equality for comparisons, i.e. ===. - * @param arrays The arrays to inspect. - * @return Returns an array of composite values. - **/ - union(...arrays: Array[]): T[]; - - /** - * @see _.union - **/ + * Creates an array of unique values, in order, from all of the provided arrays using SameValueZero for + * equality comparisons. + * + * @param arrays The arrays to inspect. + * @return Returns the new array of combined values. + */ union(...arrays: List[]): T[]; } interface LoDashArrayWrapper { /** - * @see _.union - **/ - union(...arrays: (Array|List)[]): LoDashArrayWrapper; + * @see _.union + */ + union(...arrays: List[]): LoDashArrayWrapper; + + /** + * @see _.union + */ + union(...arrays: List[]): LoDashArrayWrapper; + } + + interface LoDashObjectWrapper { + /** + * @see _.union + */ + union(...arrays: List[]): LoDashArrayWrapper; } //_.uniq From 215df3cd35b31329629bb0dd191b84bf6d4e4d6f Mon Sep 17 00:00:00 2001 From: Moes Date: Thu, 8 Oct 2015 15:04:28 +1000 Subject: [PATCH 23/30] Update Knockout.d.ts update `objectForEach` to include key value add `addOrRemoveItem` consolidate `arrayPushAll` into one line using the `|` operator enabling `setTextContent` IT's PART OF THE MINIFIED API SURFACE https://github.com/knockout/knockout/blob/master/src/utils.js#L599 --- knockout/knockout.d.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/knockout/knockout.d.ts b/knockout/knockout.d.ts index 0fbe8cbad..e3e0cd49e 100644 --- a/knockout/knockout.d.ts +++ b/knockout/knockout.d.ts @@ -275,9 +275,7 @@ interface KnockoutUtils { arrayFilter(array: T[], predicate: (item: T) => boolean): T[]; - arrayPushAll(array: T[], valuesToPush: T[]): T[]; - - arrayPushAll(array: KnockoutObservableArray, valuesToPush: T[]): T[]; + arrayPushAll(array: T[] | KnockoutObservableArray, valuesToPush: T[]): T[]; extend(target: Object, source: Object): Object; @@ -313,8 +311,8 @@ interface KnockoutUtils { toggleDomNodeCssClass(node: any, className: string, shouldHaveClass: boolean): void; - //setTextContent(element: any, textContent: string): void; // NOT PART OF THE MINIFIED API SURFACE (ONLY IN knockout-{version}.debug.js) https://github.com/SteveSanderson/knockout/issues/670 - + setTextContent(element: any, textContent: string | KnockoutObservable): void; // IT's PART OF THE MINIFIED API SURFACE https://github.com/knockout/knockout/blob/master/src/utils.js#L599 + setElementName(element: any, name: string): void; forceRefresh(node: any): void; @@ -339,9 +337,9 @@ interface KnockoutUtils { isIe7: boolean; - objectForEach(obj: any, action: Function): void; - - setPrototypeOf(obj: any, proto: any): void; + objectForEach(obj: any, action: (key: any, value: any) => void): void; + + addOrRemoveItem(array: T[] | KnockoutObservable, value: T, included: T): void; } interface KnockoutArrayChange { From 444692c0f656d2a98830e3752352dbf1fadefffa Mon Sep 17 00:00:00 2001 From: Igor Kriklivetc Date: Thu, 8 Oct 2015 09:14:56 +0300 Subject: [PATCH 24/30] Renaming from dx.devextreme* to devextreme* --- .../{dx.devextreme-15.1.3.d.ts => devextreme-15.1.3.d.ts} | 0 .../{dx.devextreme-15.1.4.d.ts => devextreme-15.1.4.d.ts} | 0 .../{dx.devextreme-15.1.5.d.ts => devextreme-15.1.5.d.ts} | 0 .../{dx.devextreme-15.1.6.d.ts => devextreme-15.1.6.d.ts} | 0 devextreme/{dx.devextreme-tests.ts => devextreme-tests.ts} | 2 +- devextreme/{dx.devextreme.d.ts => devextreme.d.ts} | 0 6 files changed, 1 insertion(+), 1 deletion(-) rename devextreme/{dx.devextreme-15.1.3.d.ts => devextreme-15.1.3.d.ts} (100%) rename devextreme/{dx.devextreme-15.1.4.d.ts => devextreme-15.1.4.d.ts} (100%) rename devextreme/{dx.devextreme-15.1.5.d.ts => devextreme-15.1.5.d.ts} (100%) rename devextreme/{dx.devextreme-15.1.6.d.ts => devextreme-15.1.6.d.ts} (100%) rename devextreme/{dx.devextreme-tests.ts => devextreme-tests.ts} (99%) rename devextreme/{dx.devextreme.d.ts => devextreme.d.ts} (100%) diff --git a/devextreme/dx.devextreme-15.1.3.d.ts b/devextreme/devextreme-15.1.3.d.ts similarity index 100% rename from devextreme/dx.devextreme-15.1.3.d.ts rename to devextreme/devextreme-15.1.3.d.ts diff --git a/devextreme/dx.devextreme-15.1.4.d.ts b/devextreme/devextreme-15.1.4.d.ts similarity index 100% rename from devextreme/dx.devextreme-15.1.4.d.ts rename to devextreme/devextreme-15.1.4.d.ts diff --git a/devextreme/dx.devextreme-15.1.5.d.ts b/devextreme/devextreme-15.1.5.d.ts similarity index 100% rename from devextreme/dx.devextreme-15.1.5.d.ts rename to devextreme/devextreme-15.1.5.d.ts diff --git a/devextreme/dx.devextreme-15.1.6.d.ts b/devextreme/devextreme-15.1.6.d.ts similarity index 100% rename from devextreme/dx.devextreme-15.1.6.d.ts rename to devextreme/devextreme-15.1.6.d.ts diff --git a/devextreme/dx.devextreme-tests.ts b/devextreme/devextreme-tests.ts similarity index 99% rename from devextreme/dx.devextreme-tests.ts rename to devextreme/devextreme-tests.ts index 78b09d15a..6a0582574 100644 --- a/devextreme/dx.devextreme-tests.ts +++ b/devextreme/devextreme-tests.ts @@ -1,4 +1,4 @@ -/// +/// module Tests.ui { var dataGridOptions: DevExpress.ui.dxDataGridOptions = { diff --git a/devextreme/dx.devextreme.d.ts b/devextreme/devextreme.d.ts similarity index 100% rename from devextreme/dx.devextreme.d.ts rename to devextreme/devextreme.d.ts From 0a06dbb59ec998649abf3683fc67909d172c8bee Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Thu, 8 Oct 2015 09:41:59 -0700 Subject: [PATCH 25/30] Update typings for 1.6.2 release --- .../typescriptServices-tests.ts | 25 +- typescript-services/typescriptServices.d.ts | 11462 +++------------- typescript/typescript.d.ts | 1916 +-- 3 files changed, 3273 insertions(+), 10130 deletions(-) diff --git a/typescript-services/typescriptServices-tests.ts b/typescript-services/typescriptServices-tests.ts index ab0da7a09..1c704b14e 100644 --- a/typescript-services/typescriptServices-tests.ts +++ b/typescript-services/typescriptServices-tests.ts @@ -1,8 +1,23 @@ /// -import ts = require('typescript-services'); +// transpile +function transpile(input: string): string { + return ts.transpile(input, { module: ts.ModuleKind.CommonJS }); +} -// formatter: -var snapshot = ts.SimpleText.fromString('var foo = 123;'); -var formatter = new ts.Services.Formatting.TextSnapshot(snapshot); -console.log(formatter); +// compile +function compile(fileNames: string[], options: ts.CompilerOptions): number { + let program = ts.createProgram(fileNames, options); + let emitResult = program.emit(); + + let allDiagnostics = ts.getPreEmitDiagnostics(program).concat(emitResult.diagnostics); + + allDiagnostics.forEach(diagnostic => { + let { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); + let message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); + console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`); + }); + + let exitCode = emitResult.emitSkipped ? 1 : 0; + return exitCode; +} diff --git a/typescript-services/typescriptServices.d.ts b/typescript-services/typescriptServices.d.ts index dfa2c633d..dbd4919bf 100644 --- a/typescript-services/typescriptServices.d.ts +++ b/typescript-services/typescriptServices.d.ts @@ -1,9314 +1,2148 @@ -// Type definitions for TypeScript-Services -// Project: https://www.npmjs.org/package/typescript-services -// Definitions by: Basarat Ali Syed -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare module TypeScript { - var DiagnosticCode: { - error_TS_0_1: string; - warning_TS_0_1: string; - Unrecognized_escape_sequence: string; - Unexpected_character_0: string; - Missing_close_quote_character: string; - Identifier_expected: string; - _0_keyword_expected: string; - _0_expected: string; - Identifier_expected_0_is_a_keyword: string; - Automatic_semicolon_insertion_not_allowed: string; - Unexpected_token_0_expected: string; - Trailing_separator_not_allowed: string; - AsteriskSlash_expected: string; - public_or_private_modifier_must_precede_static: string; - Unexpected_token: string; - Catch_clause_parameter_cannot_have_a_type_annotation: string; - Rest_parameter_must_be_last_in_list: string; - Parameter_cannot_have_question_mark_and_initializer: string; - Required_parameter_cannot_follow_optional_parameter: string; - Index_signatures_cannot_have_rest_parameters: string; - Index_signature_parameter_cannot_have_accessibility_modifiers: string; - Index_signature_parameter_cannot_have_a_question_mark: string; - Index_signature_parameter_cannot_have_an_initializer: string; - Index_signature_must_have_a_type_annotation: string; - Index_signature_parameter_must_have_a_type_annotation: string; - Index_signature_parameter_type_must_be_string_or_number: string; - extends_clause_already_seen: string; - extends_clause_must_precede_implements_clause: string; - Classes_can_only_extend_a_single_class: string; - implements_clause_already_seen: string; - Accessibility_modifier_already_seen: string; - _0_modifier_must_precede_1_modifier: string; - _0_modifier_already_seen: string; - _0_modifier_cannot_appear_on_a_class_element: string; - Interface_declaration_cannot_have_implements_clause: string; - super_invocation_cannot_have_type_arguments: string; - Only_ambient_modules_can_use_quoted_names: string; - Statements_are_not_allowed_in_ambient_contexts: string; - Implementations_are_not_allowed_in_ambient_contexts: string; - declare_modifier_not_allowed_for_code_already_in_an_ambient_context: string; - Initializers_are_not_allowed_in_ambient_contexts: string; - Parameter_property_declarations_can_only_be_used_in_a_non_ambient_constructor_declaration: string; - Function_implementation_expected: string; - Constructor_implementation_expected: string; - Function_overload_name_must_be_0: string; - _0_modifier_cannot_appear_on_a_module_element: string; - declare_modifier_cannot_appear_on_an_interface_declaration: string; - declare_modifier_required_for_top_level_element: string; - Rest_parameter_cannot_be_optional: string; - Rest_parameter_cannot_have_an_initializer: string; - set_accessor_must_have_one_and_only_one_parameter: string; - set_accessor_parameter_cannot_be_optional: string; - set_accessor_parameter_cannot_have_an_initializer: string; - set_accessor_cannot_have_rest_parameter: string; - get_accessor_cannot_have_parameters: string; - Modifiers_cannot_appear_here: string; - Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: string; - Class_name_cannot_be_0: string; - Interface_name_cannot_be_0: string; - Enum_name_cannot_be_0: string; - Module_name_cannot_be_0: string; - Enum_member_must_have_initializer: string; - Export_assignment_cannot_be_used_in_internal_modules: string; - Export_assignment_not_allowed_in_module_with_exported_element: string; - Module_cannot_have_multiple_export_assignments: string; - Ambient_enum_elements_can_only_have_integer_literal_initializers: string; - module_class_interface_enum_import_or_statement: string; - constructor_function_accessor_or_variable: string; - statement: string; - case_or_default_clause: string; - identifier: string; - call_construct_index_property_or_function_signature: string; - expression: string; - type_name: string; - property_or_accessor: string; - parameter: string; - type: string; - type_parameter: string; - declare_modifier_not_allowed_on_import_declaration: string; - Function_overload_must_be_static: string; - Function_overload_must_not_be_static: string; - Parameter_property_declarations_cannot_be_used_in_a_constructor_overload: string; - Invalid_reference_directive_syntax: string; - Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: string; - Accessors_are_not_allowed_in_ambient_contexts: string; - _0_modifier_cannot_appear_on_a_constructor_declaration: string; - _0_modifier_cannot_appear_on_a_parameter: string; - Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: string; - Type_parameters_cannot_appear_on_a_constructor_declaration: string; - Type_annotation_cannot_appear_on_a_constructor_declaration: string; - Duplicate_identifier_0: string; - The_name_0_does_not_exist_in_the_current_scope: string; - The_name_0_does_not_refer_to_a_value: string; - super_can_only_be_used_inside_a_class_instance_method: string; - The_left_hand_side_of_an_assignment_expression_must_be_a_variable_property_or_indexer: string; - Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: string; - Value_of_type_0_is_not_callable: string; - Value_of_type_0_is_not_newable: string; - Value_of_type_0_is_not_indexable_by_type_1: string; - Operator_0_cannot_be_applied_to_types_1_and_2: string; - Operator_0_cannot_be_applied_to_types_1_and_2_3: string; - Cannot_convert_0_to_1: string; - Cannot_convert_0_to_1_NL_2: string; - Expected_var_class_interface_or_module: string; - Operator_0_cannot_be_applied_to_type_1: string; - Getter_0_already_declared: string; - Setter_0_already_declared: string; - Exported_class_0_extends_private_class_1: string; - Exported_class_0_implements_private_interface_1: string; - Exported_interface_0_extends_private_interface_1: string; - Exported_class_0_extends_class_from_inaccessible_module_1: string; - Exported_class_0_implements_interface_from_inaccessible_module_1: string; - Exported_interface_0_extends_interface_from_inaccessible_module_1: string; - Public_static_property_0_of_exported_class_has_or_is_using_private_type_1: string; - Public_property_0_of_exported_class_has_or_is_using_private_type_1: string; - Property_0_of_exported_interface_has_or_is_using_private_type_1: string; - Exported_variable_0_has_or_is_using_private_type_1: string; - Public_static_property_0_of_exported_class_is_using_inaccessible_module_1: string; - Public_property_0_of_exported_class_is_using_inaccessible_module_1: string; - Property_0_of_exported_interface_is_using_inaccessible_module_1: string; - Exported_variable_0_is_using_inaccessible_module_1: string; - Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_type_1: string; - Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_type_1: string; - Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_type_1: string; - Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_type_1: string; - Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_type_1: string; - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_type_1: string; - Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_type_1: string; - Parameter_0_of_method_from_exported_interface_has_or_is_using_private_type_1: string; - Parameter_0_of_exported_function_has_or_is_using_private_type_1: string; - Parameter_0_of_constructor_from_exported_class_is_using_inaccessible_module_1: string; - Parameter_0_of_public_static_property_setter_from_exported_class_is_using_inaccessible_module_1: string; - Parameter_0_of_public_property_setter_from_exported_class_is_using_inaccessible_module_1: string; - Parameter_0_of_constructor_signature_from_exported_interface_is_using_inaccessible_module_1: string; - Parameter_0_of_call_signature_from_exported_interface_is_using_inaccessible_module_1: string; - Parameter_0_of_public_static_method_from_exported_class_is_using_inaccessible_module_1: string; - Parameter_0_of_public_method_from_exported_class_is_using_inaccessible_module_1: string; - Parameter_0_of_method_from_exported_interface_is_using_inaccessible_module_1: string; - Parameter_0_of_exported_function_is_using_inaccessible_module_1: string; - Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_type_0: string; - Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_type_0: string; - Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_type_0: string; - Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_type_0: string; - Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_type_0: string; - Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_type_0: string; - Return_type_of_public_method_from_exported_class_has_or_is_using_private_type_0: string; - Return_type_of_method_from_exported_interface_has_or_is_using_private_type_0: string; - Return_type_of_exported_function_has_or_is_using_private_type_0: string; - Return_type_of_public_static_property_getter_from_exported_class_is_using_inaccessible_module_0: string; - Return_type_of_public_property_getter_from_exported_class_is_using_inaccessible_module_0: string; - Return_type_of_constructor_signature_from_exported_interface_is_using_inaccessible_module_0: string; - Return_type_of_call_signature_from_exported_interface_is_using_inaccessible_module_0: string; - Return_type_of_index_signature_from_exported_interface_is_using_inaccessible_module_0: string; - Return_type_of_public_static_method_from_exported_class_is_using_inaccessible_module_0: string; - Return_type_of_public_method_from_exported_class_is_using_inaccessible_module_0: string; - Return_type_of_method_from_exported_interface_is_using_inaccessible_module_0: string; - Return_type_of_exported_function_is_using_inaccessible_module_0: string; - new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: string; - A_parameter_list_must_follow_a_generic_type_argument_list_expected: string; - Multiple_constructor_implementations_are_not_allowed: string; - Unable_to_resolve_external_module_0: string; - Module_cannot_be_aliased_to_a_non_module_type: string; - A_class_may_only_extend_another_class: string; - A_class_may_only_implement_another_class_or_interface: string; - An_interface_may_only_extend_another_class_or_interface: string; - Unable_to_resolve_type: string; - Unable_to_resolve_type_of_0: string; - Unable_to_resolve_type_parameter_constraint: string; - Type_parameter_constraint_cannot_be_a_primitive_type: string; - Supplied_parameters_do_not_match_any_signature_of_call_target: string; - Supplied_parameters_do_not_match_any_signature_of_call_target_NL_0: string; - Invalid_new_expression: string; - Call_signatures_used_in_a_new_expression_must_have_a_void_return_type: string; - Could_not_select_overload_for_new_expression: string; - Type_0_does_not_satisfy_the_constraint_1_for_type_parameter_2: string; - Could_not_select_overload_for_call_expression: string; - Cannot_invoke_an_expression_whose_type_lacks_a_call_signature: string; - Calls_to_super_are_only_valid_inside_a_class: string; - Generic_type_0_requires_1_type_argument_s: string; - Type_of_array_literal_cannot_be_determined_Best_common_type_could_not_be_found_for_array_elements: string; - Could_not_find_enclosing_symbol_for_dotted_name_0: string; - The_property_0_does_not_exist_on_value_of_type_1: string; - Could_not_find_symbol_0: string; - get_and_set_accessor_must_have_the_same_type: string; - this_cannot_be_referenced_in_current_location: string; - Static_members_cannot_reference_class_type_parameters: string; - Class_0_is_recursively_referenced_as_a_base_type_of_itself: string; - Interface_0_is_recursively_referenced_as_a_base_type_of_itself: string; - super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: string; - super_cannot_be_referenced_in_non_derived_classes: string; - A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties: string; - Constructors_for_derived_classes_must_contain_a_super_call: string; - Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: string; - _0_1_is_inaccessible: string; - this_cannot_be_referenced_within_module_bodies: string; - Invalid_expression_types_not_known_to_support_the_addition_operator: string; - The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: string; - The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: string; - The_type_of_a_unary_arithmetic_operation_operand_must_be_of_type_any_number_or_an_enum_type: string; - Variable_declarations_of_a_for_statement_cannot_use_a_type_annotation: string; - Variable_declarations_of_a_for_statement_must_be_of_types_string_or_any: string; - The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: string; - The_left_hand_side_of_an_in_expression_must_be_of_types_any_string_or_number: string; - The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: string; - The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: string; - The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: string; - Setters_cannot_return_a_value: string; - Tried_to_query_type_of_uninitialized_module_0: string; - Tried_to_set_variable_type_to_uninitialized_module_type_0: string; - Type_0_does_not_have_type_parameters: string; - Getters_must_return_a_value: string; - Getter_and_setter_accessors_do_not_agree_in_visibility: string; - Invalid_left_hand_side_of_assignment_expression: string; - Function_declared_a_non_void_return_type_but_has_no_return_expression: string; - Cannot_resolve_return_type_reference: string; - Constructors_cannot_have_a_return_type_of_void: string; - Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: string; - All_symbols_within_a_with_block_will_be_resolved_to_any: string; - Import_declarations_in_an_internal_module_cannot_reference_an_external_module: string; - Class_0_declares_interface_1_but_does_not_implement_it_NL_2: string; - Class_0_declares_class_1_as_an_interface_but_does_not_implement_it_NL_2: string; - The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer: string; - this_cannot_be_referenced_in_static_initializers_in_a_class_body: string; - Class_0_cannot_extend_class_1_NL_2: string; - Interface_0_cannot_extend_class_1_NL_2: string; - Interface_0_cannot_extend_interface_1_NL_2: string; - Duplicate_overload_signature_for_0: string; - Duplicate_constructor_overload_signature: string; - Duplicate_overload_call_signature: string; - Duplicate_overload_construct_signature: string; - Overload_signature_is_not_compatible_with_function_definition: string; - Overload_signature_is_not_compatible_with_function_definition_NL_0: string; - Overload_signatures_must_all_be_public_or_private: string; - Overload_signatures_must_all_be_exported_or_not_exported: string; - Overload_signatures_must_all_be_ambient_or_non_ambient: string; - Overload_signatures_must_all_be_optional_or_required: string; - Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: string; - this_cannot_be_referenced_in_constructor_arguments: string; - Instance_member_cannot_be_accessed_off_a_class: string; - Untyped_function_calls_may_not_accept_type_arguments: string; - Non_generic_functions_may_not_accept_type_arguments: string; - A_generic_type_may_not_reference_itself_with_a_wrapped_form_of_its_own_type_parameters: string; - Rest_parameters_must_be_array_types: string; - Overload_signature_implementation_cannot_use_specialized_type: string; - Export_assignments_may_only_be_used_at_the_top_level_of_external_modules: string; - Export_assignments_may_only_be_made_with_variables_functions_classes_interfaces_enums_and_internal_modules: string; - Only_public_methods_of_the_base_class_are_accessible_via_the_super_keyword: string; - Numeric_indexer_type_0_must_be_assignable_to_string_indexer_type_1: string; - Numeric_indexer_type_0_must_be_assignable_to_string_indexer_type_1_NL_2: string; - All_numerically_named_properties_must_be_assignable_to_numeric_indexer_type_0: string; - All_numerically_named_properties_must_be_assignable_to_numeric_indexer_type_0_NL_1: string; - All_named_properties_must_be_assignable_to_string_indexer_type_0: string; - All_named_properties_must_be_assignable_to_string_indexer_type_0_NL_1: string; - Generic_type_references_must_include_all_type_arguments: string; - Default_arguments_are_only_allowed_in_implementation: string; - Overloads_cannot_differ_only_by_return_type: string; - Function_expression_declared_a_non_void_return_type_but_has_no_return_expression: string; - Import_declaration_referencing_identifier_from_internal_module_can_only_be_made_with_variables_functions_classes_interfaces_enums_and_internal_modules: string; - Could_not_find_symbol_0_in_module_1: string; - Unable_to_resolve_module_reference_0: string; - Could_not_find_module_0_in_module_1: string; - Exported_import_declaration_0_is_assigned_value_with_type_that_has_or_is_using_private_type_1: string; - Exported_import_declaration_0_is_assigned_value_with_type_that_is_using_inaccessible_module_1: string; - Exported_import_declaration_0_is_assigned_type_that_has_or_is_using_private_type_1: string; - Exported_import_declaration_0_is_assigned_type_that_is_using_inaccessible_module_1: string; - Exported_import_declaration_0_is_assigned_container_that_is_or_is_using_inaccessible_module_1: string; - Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_1: string; - Internal_module_reference_0_in_import_declaration_does_not_reference_module_instance_for_1: string; - Module_0_cannot_merge_with_previous_declaration_of_1_in_a_different_file_2: string; - Interface_0_cannot_simultaneously_extend_types_1_and_2_NL_3: string; - Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: string; - Ambient_external_module_declaration_cannot_be_reopened: string; - All_declarations_of_merged_declaration_0_must_be_exported_or_not_exported: string; - super_cannot_be_referenced_in_constructor_arguments: string; - Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: string; - Ambient_external_module_declaration_must_be_defined_in_global_context: string; - Ambient_external_module_declaration_cannot_specify_relative_module_name: string; - Import_declaration_in_an_ambient_external_module_declaration_cannot_reference_external_module_through_relative_external_module_name: string; - Could_not_find_the_best_common_type_of_types_of_all_return_statement_expressions: string; - Import_declaration_cannot_refer_to_external_module_reference_when_noResolve_option_is_set: string; - Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: string; - continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: string; - break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: string; - Jump_target_not_found: string; - Jump_target_cannot_cross_function_boundary: string; - Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: string; - Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: string; - Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: string; - TypeParameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_type_1: string; - TypeParameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_type_1: string; - TypeParameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_type_1: string; - TypeParameter_0_of_public_method_from_exported_class_has_or_is_using_private_type_1: string; - TypeParameter_0_of_method_from_exported_interface_has_or_is_using_private_type_1: string; - TypeParameter_0_of_exported_function_has_or_is_using_private_type_1: string; - TypeParameter_0_of_constructor_signature_from_exported_interface_is_using_inaccessible_module_1: string; - TypeParameter_0_of_call_signature_from_exported_interface_is_using_inaccessible_module_1: string; - TypeParameter_0_of_public_static_method_from_exported_class_is_using_inaccessible_module_1: string; - TypeParameter_0_of_public_method_from_exported_class_is_using_inaccessible_module_1: string; - TypeParameter_0_of_method_from_exported_interface_is_using_inaccessible_module_1: string; - TypeParameter_0_of_exported_function_is_using_inaccessible_module_1: string; - TypeParameter_0_of_exported_class_has_or_is_using_private_type_1: string; - TypeParameter_0_of_exported_interface_has_or_is_using_private_type_1: string; - TypeParameter_0_of_exported_class_is_using_inaccessible_module_1: string; - TypeParameter_0_of_exported_interface_is_using_inaccessible_module_1: string; - Duplicate_identifier_i_Compiler_uses_i_to_initialize_rest_parameter: string; - Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: string; - Type_of_conditional_0_must_be_identical_to_1_or_2: string; - Type_of_conditional_0_must_be_identical_to_1_2_or_3: string; - Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_an_external_module: string; - Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list: string; - Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: string; - Parameter_0_cannot_be_referenced_in_its_initializer: string; - Duplicate_string_index_signature: string; - Duplicate_number_index_signature: string; - All_declarations_of_an_interface_must_have_identical_type_parameters: string; - Expression_resolves_to_variable_declaration_i_that_compiler_uses_to_initialize_rest_parameter: string; - Type_0_is_missing_property_1_from_type_2: string; - Types_of_property_0_of_types_1_and_2_are_incompatible: string; - Types_of_property_0_of_types_1_and_2_are_incompatible_NL_3: string; - Property_0_defined_as_private_in_type_1_is_defined_as_public_in_type_2: string; - Property_0_defined_as_public_in_type_1_is_defined_as_private_in_type_2: string; - Types_0_and_1_define_property_2_as_private: string; - Call_signatures_of_types_0_and_1_are_incompatible: string; - Call_signatures_of_types_0_and_1_are_incompatible_NL_2: string; - Type_0_requires_a_call_signature_but_type_1_lacks_one: string; - Construct_signatures_of_types_0_and_1_are_incompatible: string; - Construct_signatures_of_types_0_and_1_are_incompatible_NL_2: string; - Type_0_requires_a_construct_signature_but_type_1_lacks_one: string; - Index_signatures_of_types_0_and_1_are_incompatible: string; - Index_signatures_of_types_0_and_1_are_incompatible_NL_2: string; - Call_signature_expects_0_or_fewer_parameters: string; - Could_not_apply_type_0_to_argument_1_which_is_of_type_2: string; - Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: string; - Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: string; - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: string; - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: string; - Types_of_static_property_0_of_class_1_and_class_2_are_incompatible: string; - Types_of_static_property_0_of_class_1_and_class_2_are_incompatible_NL_3: string; - Type_reference_cannot_refer_to_container_0: string; - Type_reference_must_refer_to_type: string; - In_enums_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_the_first_enum_element: string; - _0_overload_s: string; - Variable_declaration_cannot_have_the_same_name_as_an_import_declaration: string; - Signature_expected_0_type_arguments_got_1_instead: string; - Property_0_defined_as_optional_in_type_1_but_is_required_in_type_2: string; - Types_0_and_1_originating_in_infinitely_expanding_type_reference_do_not_refer_to_same_named_type: string; - Types_0_and_1_originating_in_infinitely_expanding_type_reference_have_incompatible_type_arguments: string; - Types_0_and_1_originating_in_infinitely_expanding_type_reference_have_incompatible_type_arguments_NL_2: string; - Named_properties_0_of_types_1_and_2_are_not_identical: string; - Types_of_string_indexer_of_types_0_and_1_are_not_identical: string; - Types_of_number_indexer_of_types_0_and_1_are_not_identical: string; - Type_of_number_indexer_in_type_0_is_not_assignable_to_string_indexer_type_in_type_1_NL_2: string; - Type_of_property_0_in_type_1_is_not_assignable_to_string_indexer_type_in_type_2_NL_3: string; - Type_of_property_0_in_type_1_is_not_assignable_to_number_indexer_type_in_type_2_NL_3: string; - Static_property_0_defined_as_private_in_type_1_is_defined_as_public_in_type_2: string; - Static_property_0_defined_as_public_in_type_1_is_defined_as_private_in_type_2: string; - Types_0_and_1_define_static_property_2_as_private: string; - Current_host_does_not_support_0_option: string; - ECMAScript_target_version_0_not_supported_Specify_a_valid_target_version_1_default_or_2: string; - Module_code_generation_0_not_supported: string; - Could_not_find_file_0: string; - A_file_cannot_have_a_reference_to_itself: string; - Cannot_resolve_referenced_file_0: string; - Cannot_find_the_common_subdirectory_path_for_the_input_files: string; - Emit_Error_0: string; - Cannot_read_file_0_1: string; - Unsupported_file_encoding: string; - Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: string; - Unsupported_locale_0: string; - Execution_Failed_NL: string; - Invalid_call_to_up: string; - Invalid_call_to_down: string; - Base64_value_0_finished_with_a_continuation_bit: string; - Unknown_option_0: string; - Expected_0_arguments_to_message_got_1_instead: string; - Expected_the_message_0_to_have_1_arguments_but_it_had_2: string; - Could_not_delete_file_0: string; - Could_not_create_directory_0: string; - Error_while_executing_file_0: string; - Cannot_compile_external_modules_unless_the_module_flag_is_provided: string; - Option_mapRoot_cannot_be_specified_without_specifying_sourcemap_option: string; - Option_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option: string; - Options_mapRoot_and_sourceRoot_cannot_be_specified_without_specifying_sourcemap_option: string; - Option_0_specified_without_1: string; - codepage_option_not_supported_on_current_platform: string; - Concatenate_and_emit_output_to_single_file: string; - Generates_corresponding_0_file: string; - Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: string; - Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: string; - Watch_input_files: string; - Redirect_output_structure_to_the_directory: string; - Do_not_emit_comments_to_output: string; - Skip_resolution_and_preprocessing: string; - Specify_ECMAScript_target_version_0_default_or_1: string; - Specify_module_code_generation_0_or_1: string; - Print_this_message: string; - Print_the_compiler_s_version_0: string; - Allow_use_of_deprecated_0_keyword_when_referencing_an_external_module: string; - Specify_locale_for_errors_and_messages_For_example_0_or_1: string; - Syntax_0: string; - options: string; - file1: string; - Examples: string; - Options: string; - Insert_command_line_options_and_files_from_a_file: string; - Version_0: string; - Use_the_0_flag_to_see_options: string; - NL_Recompiling_0: string; - STRING: string; - KIND: string; - file2: string; - VERSION: string; - LOCATION: string; - DIRECTORY: string; - NUMBER: string; - Specify_the_codepage_to_use_when_opening_source_files: string; - Additional_locations: string; - This_version_of_the_Javascript_runtime_does_not_support_the_0_function: string; - Unknown_rule: string; - Invalid_line_number_0: string; - Warn_on_expressions_and_declarations_with_an_implied_any_type: string; - Variable_0_implicitly_has_an_any_type: string; - Parameter_0_of_1_implicitly_has_an_any_type: string; - Parameter_0_of_function_type_implicitly_has_an_any_type: string; - Member_0_of_object_type_implicitly_has_an_any_type: string; - new_expression_which_lacks_a_constructor_signature_implicitly_has_an_any_type: string; - _0_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: string; - Function_expression_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: string; - Parameter_0_of_lambda_function_implicitly_has_an_any_type: string; - Constructor_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: string; - Lambda_Function_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: string; - Array_Literal_implicitly_has_an_any_type_from_widening: string; - _0_which_lacks_get_accessor_and_parameter_type_annotation_on_set_accessor_implicitly_has_an_any_type: string; - Index_signature_of_object_type_implicitly_has_an_any_type: string; - Object_literal_s_property_0_implicitly_has_an_any_type_from_widening: string; - }; -} -declare module TypeScript { - class ArrayUtilities { - static isArray(value: any): boolean; - static sequenceEquals(array1: T[], array2: T[], equals: (v1: T, v2: T) => boolean): boolean; - static contains(array: T[], value: T): boolean; - static groupBy(array: T[], func: (v: T) => string): any; - static distinct(array: T[], equalsFn?: (a: T, b: T) => boolean): T[]; - static min(array: T[], func: (v: T) => number): number; - static max(array: T[], func: (v: T) => number): number; - static last(array: T[]): T; - static lastOrDefault(array: T[], predicate: (v: T, index: number) => boolean): T; - static firstOrDefault(array: T[], func: (v: T, index: number) => boolean): T; - static first(array: T[], func?: (v: T, index: number) => boolean): T; - static sum(array: T[], func: (v: T) => number): number; - static select(values: T[], func: (v: T) => S): S[]; - static where(values: T[], func: (v: T) => boolean): T[]; - static any(array: T[], func: (v: T) => boolean): boolean; - static all(array: T[], func: (v: T) => boolean): boolean; - static binarySearch(array: number[], value: number): number; - static createArray(length: number, defaultValue: any): T[]; - static grow(array: T[], length: number, defaultValue: T): void; - static copy(sourceArray: T[], sourceIndex: number, destinationArray: T[], destinationIndex: number, length: number): void; - static indexOf(array: T[], predicate: (v: T) => boolean): number; - } -} -declare module TypeScript { - interface IBitVector { - valueAt(index: number): boolean; - setValueAt(index: number, value: boolean): void; - release(): void; - } - module BitVector { - function getBitVector(allowUndefinedValues: boolean): IBitVector; - } -} -declare module TypeScript { - interface IBitMatrix { - valueAt(x: number, y: number): boolean; - setValueAt(x: number, y: number, value: boolean): void; - release(): void; - } - module BitMatrix { - function getBitMatrix(allowUndefinedValues: boolean): IBitMatrix; - } -} -declare module TypeScript { - enum Constants { - Max31BitInteger = 1073741823, - Min31BitInteger = -1073741824, - } -} -declare module TypeScript { - enum AssertionLevel { - None = 0, - Normal = 1, - Aggressive = 2, - VeryAggressive = 3, - } - class Debug { - private static currentAssertionLevel; - static shouldAssert(level: AssertionLevel): boolean; - static assert(expression: any, message?: string, verboseDebugInfo?: () => string): void; - static fail(message?: string): void; - } -} -declare module TypeScript { - var LocalizedDiagnosticMessages: IIndexable; - class Location { - private _fileName; - private _lineMap; - private _start; - private _length; - constructor(fileName: string, lineMap: LineMap, start: number, length: number); - public fileName(): string; - public lineMap(): LineMap; - public line(): number; - public character(): number; - public start(): number; - public length(): number; - static equals(location1: Location, location2: Location): boolean; - } - class Diagnostic extends Location { - private _diagnosticKey; - private _arguments; - private _additionalLocations; - constructor(fileName: string, lineMap: LineMap, start: number, length: number, diagnosticKey: string, _arguments?: any[], additionalLocations?: Location[]); - public toJSON(key: any): any; - public diagnosticKey(): string; - public arguments(): any[]; - public text(): string; - public message(): string; - public additionalLocations(): Location[]; - static equals(diagnostic1: Diagnostic, diagnostic2: Diagnostic): boolean; - public info(): DiagnosticInfo; - } - function newLine(): string; - function getLocalizedText(diagnosticKey: string, args: any[]): string; - function getDiagnosticMessage(diagnosticKey: string, args: any[]): string; -} -declare module TypeScript { - interface DiagnosticInfo { - category: DiagnosticCategory; - message: string; - code: number; - } -} -declare module TypeScript { - class Errors { - static argument(argument: string, message?: string): Error; - static argumentOutOfRange(argument: string): Error; - static argumentNull(argument: string): Error; - static abstract(): Error; - static notYetImplemented(): Error; - static invalidOperation(message?: string): Error; - } -} -declare module TypeScript { - class Hash { - private static FNV_BASE; - private static FNV_PRIME; - private static computeFnv1aCharArrayHashCode(text, start, len); - static computeSimple31BitCharArrayHashCode(key: number[], start: number, len: number): number; - static computeSimple31BitStringHashCode(key: string): number; - static computeMurmur2StringHashCode(key: string, seed: number): number; - private static primes; - static getPrime(min: number): number; - static expandPrime(oldSize: number): number; - static combine(value: number, currentHash: number): number; - } -} -declare module TypeScript.Collections { - var DefaultHashTableCapacity: number; - class HashTable { - private hash; - private entries; - private count; - constructor(capacity: number, hash: (k: TKey) => number); - public set(key: TKey, value: TValue): void; - public add(key: TKey, value: TValue): void; - public containsKey(key: TKey): boolean; - public get(key: TKey): TValue; - private computeHashCode(key); - private addOrSet(key, value, throwOnExistingEntry); - private findEntry(key, hashCode); - private addEntry(key, value, hashCode); - private grow(); - } - function createHashTable(capacity?: number, hash?: (k: TKey) => number): HashTable; - function identityHashCode(value: any): number; -} -declare module TypeScript { - var nodeMakeDirectoryTime: number; - var nodeCreateBufferTime: number; - var nodeWriteFileSyncTime: number; - enum ByteOrderMark { - None = 0, - Utf8 = 1, - Utf16BigEndian = 2, - Utf16LittleEndian = 3, - } - class FileInformation { - public contents: string; - public byteOrderMark: ByteOrderMark; - constructor(contents: string, byteOrderMark: ByteOrderMark); - } - interface IEnvironment { - supportsCodePage(): boolean; - readFile(path: string, codepage: number): FileInformation; - writeFile(path: string, contents: string, writeByteOrderMark: boolean): void; - deleteFile(path: string): void; - fileExists(path: string): boolean; - directoryExists(path: string): boolean; - listFiles(path: string, re?: RegExp, options?: { - recursive?: boolean; - }): string[]; - arguments: string[]; - standardOut: ITextWriter; - currentDirectory(): string; - newLine: string; - } - var Environment: IEnvironment; -} -declare module TypeScript { - interface IIndexable { - [s: string]: T; - } -} -declare module TypeScript { - module IntegerUtilities { - function integerDivide(numerator: number, denominator: number): number; - function integerMultiplyLow32Bits(n1: number, n2: number): number; - function integerMultiplyHigh32Bits(n1: number, n2: number): number; - function isInteger(text: string): boolean; - function isHexInteger(text: string): boolean; - } -} -declare module TypeScript { - interface Iterator { - moveNext(): boolean; - current(): T; - } -} -declare module TypeScript { - interface ILineAndCharacter { - line: number; - character: number; - } -} -declare module TypeScript { - class LineMap { - private _computeLineStarts; - private length; - static empty: LineMap; - private _lineStarts; - constructor(_computeLineStarts: () => number[], length: number); - public toJSON(key: any): { - lineStarts: number[]; - length: number; - }; - public equals(other: LineMap): boolean; - public lineStarts(): number[]; - public lineCount(): number; - public getPosition(line: number, character: number): number; - public getLineNumberFromPosition(position: number): number; - public getLineStartPosition(lineNumber: number): number; - public fillLineAndCharacterFromPosition(position: number, lineAndCharacter: ILineAndCharacter): void; - public getLineAndCharacterFromPosition(position: number): LineAndCharacter; - } -} -declare module TypeScript { - class LineAndCharacter { - private _line; - private _character; - constructor(line: number, character: number); - public line(): number; - public character(): number; - } -} -declare module TypeScript { - class MathPrototype { - static max(a: number, b: number): number; - static min(a: number, b: number): number; - } -} -declare module TypeScript.Collections { - var DefaultStringTableCapacity: number; - class StringTable { - private entries; - private count; - constructor(capacity: number); - public addCharArray(key: number[], start: number, len: number): string; - private findCharArrayEntry(key, start, len, hashCode); - private addEntry(text, hashCode); - private grow(); - private static textCharArrayEquals(text, array, start, length); - } - var DefaultStringTable: StringTable; -} -declare module TypeScript { - class StringUtilities { - static isString(value: any): boolean; - static fromCharCodeArray(array: number[]): string; - static endsWith(string: string, value: string): boolean; - static startsWith(string: string, value: string): boolean; - static copyTo(source: string, sourceIndex: number, destination: number[], destinationIndex: number, count: number): void; - static repeat(value: string, count: number): string; - static stringEquals(val1: string, val2: string): boolean; - } -} -declare module TypeScript { - class Timer { - public startTime: number; - public time: number; - public start(): void; - public end(): void; - } -} -declare module TypeScript { - enum DiagnosticCategory { - Warning = 0, - Error = 1, - Message = 2, - NoPrefix = 3, - } -} -declare module TypeScript { - var diagnosticInformationMap: IIndexable; -} -declare module TypeScript { - enum CharacterCodes { - nullCharacter = 0, - maxAsciiCharacter = 127, - lineFeed = 10, - carriageReturn = 13, - lineSeparator = 8232, - paragraphSeparator = 8233, - nextLine = 133, - space = 32, - nonBreakingSpace = 160, - enQuad = 8192, - emQuad = 8193, - enSpace = 8194, - emSpace = 8195, - threePerEmSpace = 8196, - fourPerEmSpace = 8197, - sixPerEmSpace = 8198, - figureSpace = 8199, - punctuationSpace = 8200, - thinSpace = 8201, - hairSpace = 8202, - zeroWidthSpace = 8203, - narrowNoBreakSpace = 8239, - ideographicSpace = 12288, - _ = 95, - $ = 36, - _0 = 48, - _7 = 55, - _9 = 57, - a = 97, - b = 98, - c = 99, - d = 100, - e = 101, - f = 102, - g = 103, - h = 104, - i = 105, - k = 107, - l = 108, - m = 109, - n = 110, - o = 111, - p = 112, - q = 113, - r = 114, - s = 115, - t = 116, - u = 117, - v = 118, - w = 119, - x = 120, - y = 121, - z = 122, - A = 65, - E = 69, - F = 70, - X = 88, - Z = 90, - ampersand = 38, - asterisk = 42, - at = 64, - backslash = 92, - bar = 124, - caret = 94, - closeBrace = 125, - closeBracket = 93, - closeParen = 41, - colon = 58, - comma = 44, - dot = 46, - doubleQuote = 34, - equals = 61, - exclamation = 33, - greaterThan = 62, - lessThan = 60, - minus = 45, - openBrace = 123, - openBracket = 91, - openParen = 40, - percent = 37, - plus = 43, - question = 63, - semicolon = 59, - singleQuote = 39, - slash = 47, - tilde = 126, - backspace = 8, - formFeed = 12, - byteOrderMark = 65279, - tab = 9, - verticalTab = 11, - } -} -declare module TypeScript { - interface IScriptSnapshot { - getText(start: number, end: number): string; - getLength(): number; - getLineStartPositions(): number[]; - getTextChangeRangeSinceVersion(scriptVersion: number): TextChangeRange; - } - module ScriptSnapshot { - function fromString(text: string): IScriptSnapshot; - } -} -declare module TypeScript { - interface ISimpleText { - length(): number; - copyTo(sourceIndex: number, destination: number[], destinationIndex: number, count: number): void; - substr(start: number, length: number, intern: boolean): string; - subText(span: TextSpan): ISimpleText; - charCodeAt(index: number): number; - lineMap(): LineMap; - } - interface IText extends ISimpleText { - lineCount(): number; - lines(): ITextLine[]; - charCodeAt(position: number): number; - getLineFromLineNumber(lineNumber: number): ITextLine; - getLineFromPosition(position: number): ITextLine; - getLineNumberFromPosition(position: number): number; - getLinePosition(position: number): LineAndCharacter; - toString(span?: TextSpan): string; - } -} -declare module TypeScript { - interface ITextLine { - start(): number; - end(): number; - endIncludingLineBreak(): number; - extent(): TextSpan; - extentIncludingLineBreak(): TextSpan; - toString(): string; - lineNumber(): number; - } -} -declare module TypeScript { - module LineMap1 { - function fromSimpleText(text: ISimpleText): LineMap; - function fromScriptSnapshot(scriptSnapshot: IScriptSnapshot): LineMap; - function fromString(text: string): LineMap; - } -} -declare module TypeScript.TextFactory { - function createText(value: string): IText; -} -declare module TypeScript.SimpleText { - function fromString(value: string): ISimpleText; - function fromScriptSnapshot(scriptSnapshot: IScriptSnapshot): ISimpleText; -} -declare module TypeScript.TextUtilities { - interface ICharacterSequence { - charCodeAt(index: number): number; - length: number; - } - function parseLineStarts(text: ICharacterSequence): number[]; - function getLengthOfLineBreakSlow(text: ICharacterSequence, index: number, c: number): number; - function getLengthOfLineBreak(text: ICharacterSequence, index: number): number; - function isAnyLineBreakCharacter(c: number): boolean; -} -declare module TypeScript { - class TextSpan { - private _start; - private _length; - constructor(start: number, length: number); - public start(): number; - public length(): number; - public end(): number; - public isEmpty(): boolean; - public containsPosition(position: number): boolean; - public containsTextSpan(span: TextSpan): boolean; - public overlapsWith(span: TextSpan): boolean; - public overlap(span: TextSpan): TextSpan; - public intersectsWithTextSpan(span: TextSpan): boolean; - public intersectsWith(start: number, length: number): boolean; - public intersectsWithPosition(position: number): boolean; - public intersection(span: TextSpan): TextSpan; - static fromBounds(start: number, end: number): TextSpan; - } -} -declare module TypeScript { - class TextChangeRange { - static unchanged: TextChangeRange; - private _span; - private _newLength; - constructor(span: TextSpan, newLength: number); - public span(): TextSpan; - public newLength(): number; - public newSpan(): TextSpan; - public isUnchanged(): boolean; - static collapseChangesFromSingleVersion(changes: TextChangeRange[]): TextChangeRange; - static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; - } -} -declare module TypeScript { - class CharacterInfo { - static isDecimalDigit(c: number): boolean; - static isOctalDigit(c: number): boolean; - static isHexDigit(c: number): boolean; - static hexValue(c: number): number; - static isWhitespace(ch: number): boolean; - static isLineTerminator(ch: number): boolean; - } -} -declare module TypeScript { - enum SyntaxConstants { - TriviaNewLineMask = 1, - TriviaCommentMask = 2, - TriviaFullWidthShift = 2, - NodeDataComputed = 1, - NodeIncrementallyUnusableMask = 2, - NodeParsedInStrictModeMask = 4, - NodeFullWidthShift = 3, - IsVariableWidthKeyword = -2147483648, - } -} -declare class FormattingOptions { - public useTabs: boolean; - public spacesPerTab: number; - public indentSpaces: number; - public newLineCharacter: string; - constructor(useTabs: boolean, spacesPerTab: number, indentSpaces: number, newLineCharacter: string); - static defaultOptions: FormattingOptions; -} -declare module TypeScript.Indentation { - function columnForEndOfToken(token: ISyntaxToken, syntaxInformationMap: SyntaxInformationMap, options: FormattingOptions): number; - function columnForStartOfToken(token: ISyntaxToken, syntaxInformationMap: SyntaxInformationMap, options: FormattingOptions): number; - function columnForStartOfFirstTokenInLineContainingToken(token: ISyntaxToken, syntaxInformationMap: SyntaxInformationMap, options: FormattingOptions): number; - function columnForPositionInString(input: string, position: number, options: FormattingOptions): number; - function indentationString(column: number, options: FormattingOptions): string; - function indentationTrivia(column: number, options: FormattingOptions): ISyntaxTrivia; - function firstNonWhitespacePosition(value: string): number; -} -declare module TypeScript { - enum LanguageVersion { - EcmaScript3 = 0, - EcmaScript5 = 1, - } -} -declare module TypeScript { - class ParseOptions { - private _languageVersion; - private _allowAutomaticSemicolonInsertion; - constructor(languageVersion: LanguageVersion, allowAutomaticSemicolonInsertion: boolean); - public toJSON(key: any): { - allowAutomaticSemicolonInsertion: boolean; - }; - public languageVersion(): LanguageVersion; - public allowAutomaticSemicolonInsertion(): boolean; - } -} -declare module TypeScript { - class PositionedElement { - private _parent; - private _element; - private _fullStart; - constructor(parent: PositionedElement, element: ISyntaxElement, fullStart: number); - static create(parent: PositionedElement, element: ISyntaxElement, fullStart: number): PositionedElement; - public parent(): PositionedElement; - public parentElement(): ISyntaxElement; - public element(): ISyntaxElement; - public kind(): SyntaxKind; - public childIndex(child: ISyntaxElement): number; - public childCount(): number; - public childAt(index: number): PositionedElement; - public childStart(child: ISyntaxElement): number; - public childEnd(child: ISyntaxElement): number; - public childStartAt(index: number): number; - public childEndAt(index: number): number; - public getPositionedChild(child: ISyntaxElement): PositionedElement; - public fullStart(): number; - public fullEnd(): number; - public fullWidth(): number; - public start(): number; - public end(): number; - public root(): PositionedNode; - public containingNode(): PositionedNode; - } - class PositionedNodeOrToken extends PositionedElement { - constructor(parent: PositionedElement, nodeOrToken: ISyntaxNodeOrToken, fullStart: number); - public nodeOrToken(): ISyntaxNodeOrToken; - } - class PositionedNode extends PositionedNodeOrToken { - constructor(parent: PositionedElement, node: SyntaxNode, fullStart: number); - public node(): SyntaxNode; - } - class PositionedToken extends PositionedNodeOrToken { - constructor(parent: PositionedElement, token: ISyntaxToken, fullStart: number); - public token(): ISyntaxToken; - public previousToken(includeSkippedTokens?: boolean): PositionedToken; - public nextToken(includeSkippedTokens?: boolean): PositionedToken; - } - class PositionedList extends PositionedElement { - constructor(parent: PositionedElement, list: ISyntaxList, fullStart: number); - public list(): ISyntaxList; - } - class PositionedSeparatedList extends PositionedElement { - constructor(parent: PositionedElement, list: ISeparatedSyntaxList, fullStart: number); - public list(): ISeparatedSyntaxList; - } - class PositionedSkippedToken extends PositionedToken { - private _parentToken; - constructor(parentToken: PositionedToken, token: ISyntaxToken, fullStart: number); - public parentToken(): PositionedToken; - public previousToken(includeSkippedTokens?: boolean): PositionedToken; - public nextToken(includeSkippedTokens?: boolean): PositionedToken; - } -} -declare module TypeScript { - enum SyntaxKind { - None = 0, - List = 1, - SeparatedList = 2, - TriviaList = 3, - WhitespaceTrivia = 4, - NewLineTrivia = 5, - MultiLineCommentTrivia = 6, - SingleLineCommentTrivia = 7, - SkippedTokenTrivia = 8, - ErrorToken = 9, - EndOfFileToken = 10, - IdentifierName = 11, - RegularExpressionLiteral = 12, - NumericLiteral = 13, - StringLiteral = 14, - BreakKeyword = 15, - CaseKeyword = 16, - CatchKeyword = 17, - ContinueKeyword = 18, - DebuggerKeyword = 19, - DefaultKeyword = 20, - DeleteKeyword = 21, - DoKeyword = 22, - ElseKeyword = 23, - FalseKeyword = 24, - FinallyKeyword = 25, - ForKeyword = 26, - FunctionKeyword = 27, - IfKeyword = 28, - InKeyword = 29, - InstanceOfKeyword = 30, - NewKeyword = 31, - NullKeyword = 32, - ReturnKeyword = 33, - SwitchKeyword = 34, - ThisKeyword = 35, - ThrowKeyword = 36, - TrueKeyword = 37, - TryKeyword = 38, - TypeOfKeyword = 39, - VarKeyword = 40, - VoidKeyword = 41, - WhileKeyword = 42, - WithKeyword = 43, - ClassKeyword = 44, - ConstKeyword = 45, - EnumKeyword = 46, - ExportKeyword = 47, - ExtendsKeyword = 48, - ImportKeyword = 49, - SuperKeyword = 50, - ImplementsKeyword = 51, - InterfaceKeyword = 52, - LetKeyword = 53, - PackageKeyword = 54, - PrivateKeyword = 55, - ProtectedKeyword = 56, - PublicKeyword = 57, - StaticKeyword = 58, - YieldKeyword = 59, - AnyKeyword = 60, - BooleanKeyword = 61, - ConstructorKeyword = 62, - DeclareKeyword = 63, - GetKeyword = 64, - ModuleKeyword = 65, - RequireKeyword = 66, - NumberKeyword = 67, - SetKeyword = 68, - StringKeyword = 69, - OpenBraceToken = 70, - CloseBraceToken = 71, - OpenParenToken = 72, - CloseParenToken = 73, - OpenBracketToken = 74, - CloseBracketToken = 75, - DotToken = 76, - DotDotDotToken = 77, - SemicolonToken = 78, - CommaToken = 79, - LessThanToken = 80, - GreaterThanToken = 81, - LessThanEqualsToken = 82, - GreaterThanEqualsToken = 83, - EqualsEqualsToken = 84, - EqualsGreaterThanToken = 85, - ExclamationEqualsToken = 86, - EqualsEqualsEqualsToken = 87, - ExclamationEqualsEqualsToken = 88, - PlusToken = 89, - MinusToken = 90, - AsteriskToken = 91, - PercentToken = 92, - PlusPlusToken = 93, - MinusMinusToken = 94, - LessThanLessThanToken = 95, - GreaterThanGreaterThanToken = 96, - GreaterThanGreaterThanGreaterThanToken = 97, - AmpersandToken = 98, - BarToken = 99, - CaretToken = 100, - ExclamationToken = 101, - TildeToken = 102, - AmpersandAmpersandToken = 103, - BarBarToken = 104, - QuestionToken = 105, - ColonToken = 106, - EqualsToken = 107, - PlusEqualsToken = 108, - MinusEqualsToken = 109, - AsteriskEqualsToken = 110, - PercentEqualsToken = 111, - LessThanLessThanEqualsToken = 112, - GreaterThanGreaterThanEqualsToken = 113, - GreaterThanGreaterThanGreaterThanEqualsToken = 114, - AmpersandEqualsToken = 115, - BarEqualsToken = 116, - CaretEqualsToken = 117, - SlashToken = 118, - SlashEqualsToken = 119, - SourceUnit = 120, - QualifiedName = 121, - ObjectType = 122, - FunctionType = 123, - ArrayType = 124, - ConstructorType = 125, - GenericType = 126, - TypeQuery = 127, - InterfaceDeclaration = 128, - FunctionDeclaration = 129, - ModuleDeclaration = 130, - ClassDeclaration = 131, - EnumDeclaration = 132, - ImportDeclaration = 133, - ExportAssignment = 134, - MemberFunctionDeclaration = 135, - MemberVariableDeclaration = 136, - ConstructorDeclaration = 137, - IndexMemberDeclaration = 138, - GetAccessor = 139, - SetAccessor = 140, - PropertySignature = 141, - CallSignature = 142, - ConstructSignature = 143, - IndexSignature = 144, - MethodSignature = 145, - Block = 146, - IfStatement = 147, - VariableStatement = 148, - ExpressionStatement = 149, - ReturnStatement = 150, - SwitchStatement = 151, - BreakStatement = 152, - ContinueStatement = 153, - ForStatement = 154, - ForInStatement = 155, - EmptyStatement = 156, - ThrowStatement = 157, - WhileStatement = 158, - TryStatement = 159, - LabeledStatement = 160, - DoStatement = 161, - DebuggerStatement = 162, - WithStatement = 163, - PlusExpression = 164, - NegateExpression = 165, - BitwiseNotExpression = 166, - LogicalNotExpression = 167, - PreIncrementExpression = 168, - PreDecrementExpression = 169, - DeleteExpression = 170, - TypeOfExpression = 171, - VoidExpression = 172, - CommaExpression = 173, - AssignmentExpression = 174, - AddAssignmentExpression = 175, - SubtractAssignmentExpression = 176, - MultiplyAssignmentExpression = 177, - DivideAssignmentExpression = 178, - ModuloAssignmentExpression = 179, - AndAssignmentExpression = 180, - ExclusiveOrAssignmentExpression = 181, - OrAssignmentExpression = 182, - LeftShiftAssignmentExpression = 183, - SignedRightShiftAssignmentExpression = 184, - UnsignedRightShiftAssignmentExpression = 185, - ConditionalExpression = 186, - LogicalOrExpression = 187, - LogicalAndExpression = 188, - BitwiseOrExpression = 189, - BitwiseExclusiveOrExpression = 190, - BitwiseAndExpression = 191, - EqualsWithTypeConversionExpression = 192, - NotEqualsWithTypeConversionExpression = 193, - EqualsExpression = 194, - NotEqualsExpression = 195, - LessThanExpression = 196, - GreaterThanExpression = 197, - LessThanOrEqualExpression = 198, - GreaterThanOrEqualExpression = 199, - InstanceOfExpression = 200, - InExpression = 201, - LeftShiftExpression = 202, - SignedRightShiftExpression = 203, - UnsignedRightShiftExpression = 204, - MultiplyExpression = 205, - DivideExpression = 206, - ModuloExpression = 207, - AddExpression = 208, - SubtractExpression = 209, - PostIncrementExpression = 210, - PostDecrementExpression = 211, - MemberAccessExpression = 212, - InvocationExpression = 213, - ArrayLiteralExpression = 214, - ObjectLiteralExpression = 215, - ObjectCreationExpression = 216, - ParenthesizedExpression = 217, - ParenthesizedArrowFunctionExpression = 218, - SimpleArrowFunctionExpression = 219, - CastExpression = 220, - ElementAccessExpression = 221, - FunctionExpression = 222, - OmittedExpression = 223, - VariableDeclaration = 224, - VariableDeclarator = 225, - ArgumentList = 226, - ParameterList = 227, - TypeArgumentList = 228, - TypeParameterList = 229, - ExtendsHeritageClause = 230, - ImplementsHeritageClause = 231, - EqualsValueClause = 232, - CaseSwitchClause = 233, - DefaultSwitchClause = 234, - ElseClause = 235, - CatchClause = 236, - FinallyClause = 237, - TypeParameter = 238, - Constraint = 239, - SimplePropertyAssignment = 240, - FunctionPropertyAssignment = 241, - Parameter = 242, - EnumElement = 243, - TypeAnnotation = 244, - ExternalModuleReference = 245, - ModuleNameModuleReference = 246, - Last = 246, - FirstStandardKeyword = 15, - LastStandardKeyword = 43, - FirstFutureReservedKeyword = 44, - LastFutureReservedKeyword = 50, - FirstFutureReservedStrictKeyword = 51, - LastFutureReservedStrictKeyword = 59, - FirstTypeScriptKeyword = 60, - LastTypeScriptKeyword = 69, - FirstKeyword = 15, - LastKeyword = 69, - FirstToken = 9, - LastToken = 119, - FirstPunctuation = 70, - LastPunctuation = 119, - FirstFixedWidth = 15, - LastFixedWidth = 119, - FirstTrivia = 4, - LastTrivia = 8, - } -} -declare module TypeScript.SyntaxFacts { - function getTokenKind(text: string): SyntaxKind; - function getText(kind: SyntaxKind): string; - function isTokenKind(kind: SyntaxKind): boolean; - function isAnyKeyword(kind: SyntaxKind): boolean; - function isStandardKeyword(kind: SyntaxKind): boolean; - function isFutureReservedKeyword(kind: SyntaxKind): boolean; - function isFutureReservedStrictKeyword(kind: SyntaxKind): boolean; - function isAnyPunctuation(kind: SyntaxKind): boolean; - function isPrefixUnaryExpressionOperatorToken(tokenKind: SyntaxKind): boolean; - function isBinaryExpressionOperatorToken(tokenKind: SyntaxKind): boolean; - function getPrefixUnaryExpressionFromOperatorToken(tokenKind: SyntaxKind): SyntaxKind; - function getPostfixUnaryExpressionFromOperatorToken(tokenKind: SyntaxKind): SyntaxKind; - function getBinaryExpressionFromOperatorToken(tokenKind: SyntaxKind): SyntaxKind; - function getOperatorTokenFromBinaryExpression(tokenKind: SyntaxKind): SyntaxKind; - function isAnyDivideToken(kind: SyntaxKind): boolean; - function isAnyDivideOrRegularExpressionToken(kind: SyntaxKind): boolean; -} -declare module TypeScript { - class Scanner implements ISlidingWindowSource { - private slidingWindow; - private fileName; - private text; - private _languageVersion; - constructor(fileName: string, text: ISimpleText, languageVersion: LanguageVersion, window?: number[]); - public languageVersion(): LanguageVersion; - public fetchMoreItems(argument: any, sourceIndex: number, window: number[], destinationIndex: number, spaceAvailable: number): number; - private currentCharCode(); - public absoluteIndex(): number; - public setAbsoluteIndex(index: number): void; - public scan(diagnostics: Diagnostic[], allowRegularExpression: boolean): ISyntaxToken; - private createToken(fullStart, leadingTriviaInfo, start, kind, end, fullEnd, trailingTriviaInfo, isVariableWidthKeyword); - private static triviaWindow; - static scanTrivia(text: ISimpleText, start: number, length: number, isTrailing: boolean): ISyntaxTriviaList; - private scanTrivia(underlyingText, underlyingTextStart, isTrailing); - private scanTriviaInfo(diagnostics, isTrailing); - private isNewLineCharacter(ch); - private scanWhitespaceTrivia(underlyingText, underlyingTextStart); - private scanSingleLineCommentTrivia(underlyingText, underlyingTextStart); - private scanSingleLineCommentTriviaLength(); - private scanMultiLineCommentTrivia(underlyingText, underlyingTextStart); - private scanMultiLineCommentTriviaLength(diagnostics); - private scanLineTerminatorSequenceTrivia(ch); - private scanLineTerminatorSequenceLength(ch); - private scanSyntaxToken(diagnostics, allowRegularExpression); - private isIdentifierStart(interpretedChar); - private isIdentifierPart(interpretedChar); - private tryFastScanIdentifierOrKeyword(firstCharacter); - private slowScanIdentifierOrKeyword(diagnostics); - private scanNumericLiteral(diagnostics); - private isOctalNumericLiteral(); - private scanOctalNumericLiteral(diagnostics); - private scanDecimalDigits(); - private scanDecimalNumericLiteral(); - private scanHexNumericLiteral(); - private isHexNumericLiteral(); - private advanceAndSetTokenKind(kind); - private scanLessThanToken(); - private scanBarToken(); - private scanCaretToken(); - private scanAmpersandToken(); - private scanPercentToken(); - private scanMinusToken(); - private scanPlusToken(); - private scanAsteriskToken(); - private scanEqualsToken(); - private isDotPrefixedNumericLiteral(); - private scanDotToken(diagnostics); - private scanSlashToken(allowRegularExpression); - private tryScanRegularExpressionToken(); - private scanExclamationToken(); - private scanDefaultCharacter(character, diagnostics); - private getErrorMessageText(text); - private skipEscapeSequence(diagnostics); - private scanStringLiteral(diagnostics); - private isUnicodeEscape(character); - private peekCharOrUnicodeEscape(); - private peekUnicodeOrHexEscape(); - private scanCharOrUnicodeEscape(errors); - private scanUnicodeOrHexEscape(errors); - public substring(start: number, end: number, intern: boolean): string; - private createIllegalEscapeDiagnostic(start, end); - static isValidIdentifier(text: ISimpleText, languageVersion: LanguageVersion): boolean; - } -} -declare module TypeScript { - class ScannerUtilities { - static identifierKind(array: number[], startIndex: number, length: number): SyntaxKind; - } -} -declare module TypeScript { - interface ISeparatedSyntaxList extends ISyntaxElement { - childAt(index: number): ISyntaxNodeOrToken; - toArray(): ISyntaxNodeOrToken[]; - toNonSeparatorArray(): ISyntaxNodeOrToken[]; - separatorCount(): number; - separatorAt(index: number): ISyntaxToken; - nonSeparatorCount(): number; - nonSeparatorAt(index: number): ISyntaxNodeOrToken; - insertChildrenInto(array: ISyntaxElement[], index: number): void; - } -} -declare module TypeScript.Syntax { - var emptySeparatedList: ISeparatedSyntaxList; - function separatedList(nodes: ISyntaxNodeOrToken[]): ISeparatedSyntaxList; -} -declare module TypeScript { - interface ISlidingWindowSource { - fetchMoreItems(argument: any, sourceIndex: number, window: any[], destinationIndex: number, spaceAvailable: number): number; - } - class SlidingWindow { - private source; - public window: any[]; - private defaultValue; - private sourceLength; - public windowCount: number; - public windowAbsoluteStartIndex: number; - public currentRelativeItemIndex: number; - private _pinCount; - private firstPinnedAbsoluteIndex; - constructor(source: ISlidingWindowSource, window: any[], defaultValue: any, sourceLength?: number); - private windowAbsoluteEndIndex(); - private addMoreItemsToWindow(argument); - private tryShiftOrGrowWindow(); - public absoluteIndex(): number; - public isAtEndOfSource(): boolean; - public getAndPinAbsoluteIndex(): number; - public releaseAndUnpinAbsoluteIndex(absoluteIndex: number): void; - public rewindToPinnedIndex(absoluteIndex: number): void; - public currentItem(argument: any): any; - public peekItemN(n: number): any; - public moveToNextItem(): void; - public disgardAllItemsFromCurrentIndexOnwards(): void; - public setAbsoluteIndex(absoluteIndex: number): void; - public pinCount(): number; - } -} -declare module TypeScript { -} -declare module TypeScript.Syntax { - function emptySourceUnit(): SourceUnitSyntax; - function getStandaloneExpression(positionedToken: PositionedToken): PositionedNodeOrToken; - function isInModuleOrTypeContext(positionedToken: PositionedToken): boolean; - function isInTypeOnlyContext(positionedToken: PositionedToken): boolean; - function childOffset(parent: ISyntaxElement, child: ISyntaxElement): number; - function childOffsetAt(parent: ISyntaxElement, index: number): number; - function childIndex(parent: ISyntaxElement, child: ISyntaxElement): number; - function nodeStructuralEquals(node1: SyntaxNode, node2: SyntaxNode): boolean; - function nodeOrTokenStructuralEquals(node1: ISyntaxNodeOrToken, node2: ISyntaxNodeOrToken): boolean; - function tokenStructuralEquals(token1: ISyntaxToken, token2: ISyntaxToken): boolean; - function triviaListStructuralEquals(triviaList1: ISyntaxTriviaList, triviaList2: ISyntaxTriviaList): boolean; - function triviaStructuralEquals(trivia1: ISyntaxTrivia, trivia2: ISyntaxTrivia): boolean; - function listStructuralEquals(list1: ISyntaxList, list2: ISyntaxList): boolean; - function separatedListStructuralEquals(list1: ISeparatedSyntaxList, list2: ISeparatedSyntaxList): boolean; - function elementStructuralEquals(element1: ISyntaxElement, element2: ISyntaxElement): boolean; - function identifierName(text: string, info?: ITokenInfo): ISyntaxToken; - function trueExpression(): IUnaryExpressionSyntax; - function falseExpression(): IUnaryExpressionSyntax; - function numericLiteralExpression(text: string): IUnaryExpressionSyntax; - function stringLiteralExpression(text: string): IUnaryExpressionSyntax; - function isSuperInvocationExpression(node: IExpressionSyntax): boolean; - function isSuperInvocationExpressionStatement(node: SyntaxNode): boolean; - function isSuperMemberAccessExpression(node: IExpressionSyntax): boolean; - function isSuperMemberAccessInvocationExpression(node: SyntaxNode): boolean; - function assignmentExpression(left: IExpressionSyntax, token: ISyntaxToken, right: IExpressionSyntax): BinaryExpressionSyntax; - function nodeHasSkippedOrMissingTokens(node: SyntaxNode): boolean; - function isUnterminatedStringLiteral(token: ISyntaxToken): boolean; - function isUnterminatedMultilineCommentTrivia(trivia: ISyntaxTrivia): boolean; - function isEntirelyInsideCommentTrivia(trivia: ISyntaxTrivia, fullStart: number, position: number): boolean; - function isEntirelyInsideComment(sourceUnit: SourceUnitSyntax, position: number): boolean; - function isEntirelyInStringOrRegularExpressionLiteral(sourceUnit: SourceUnitSyntax, position: number): boolean; - function findSkippedTokenInLeadingTriviaList(positionedToken: PositionedToken, position: number): PositionedSkippedToken; - function findSkippedTokenInTrailingTriviaList(positionedToken: PositionedToken, position: number): PositionedSkippedToken; - function findSkippedTokenInPositionedToken(positionedToken: PositionedToken, position: number): PositionedSkippedToken; - function findSkippedTokenOnLeft(positionedToken: PositionedToken, position: number): PositionedSkippedToken; - function getAncestorOfKind(positionedToken: PositionedElement, kind: SyntaxKind): PositionedElement; - function hasAncestorOfKind(positionedToken: PositionedElement, kind: SyntaxKind): boolean; - function isIntegerLiteral(expression: IExpressionSyntax): boolean; -} -declare module TypeScript { - interface ISyntaxElement { - kind(): SyntaxKind; - isNode(): boolean; - isToken(): boolean; - isList(): boolean; - isSeparatedList(): boolean; - childCount(): number; - childAt(index: number): ISyntaxElement; - isTypeScriptSpecific(): boolean; - isIncrementallyUnusable(): boolean; - fullWidth(): number; - width(): number; - fullText(): string; - leadingTrivia(): ISyntaxTriviaList; - trailingTrivia(): ISyntaxTriviaList; - leadingTriviaWidth(): number; - trailingTriviaWidth(): number; - firstToken(): ISyntaxToken; - lastToken(): ISyntaxToken; - collectTextElements(elements: string[]): void; - } - interface ISyntaxNode extends ISyntaxNodeOrToken { - } - interface IModuleReferenceSyntax extends ISyntaxNode { - isModuleReference(): boolean; - } - interface IModuleElementSyntax extends ISyntaxNode { - } - interface IStatementSyntax extends IModuleElementSyntax { - isStatement(): boolean; - } - interface IIterationStatementSyntax extends IStatementSyntax { - isIterationStatement(): boolean; - } - interface ITypeMemberSyntax extends ISyntaxNode { - } - interface IClassElementSyntax extends ISyntaxNode { - } - interface IMemberDeclarationSyntax extends IClassElementSyntax { - } - interface IPropertyAssignmentSyntax extends IClassElementSyntax { - } - interface ISwitchClauseSyntax extends ISyntaxNode { - isSwitchClause(): boolean; - statements: ISyntaxList; - } - interface IExpressionSyntax extends ISyntaxNodeOrToken { - isExpression(): boolean; - withLeadingTrivia(trivia: ISyntaxTriviaList): IExpressionSyntax; - withTrailingTrivia(trivia: ISyntaxTriviaList): IExpressionSyntax; - } - interface IUnaryExpressionSyntax extends IExpressionSyntax { - isUnaryExpression(): boolean; - } - interface IArrowFunctionExpressionSyntax extends IUnaryExpressionSyntax { - isArrowFunctionExpression(): boolean; - equalsGreaterThanToken: ISyntaxToken; - block: BlockSyntax; - expression: IExpressionSyntax; - } - interface IPostfixExpressionSyntax extends IUnaryExpressionSyntax { - isPostfixExpression(): boolean; - } - interface IMemberExpressionSyntax extends IPostfixExpressionSyntax { - isMemberExpression(): boolean; - } - interface IPrimaryExpressionSyntax extends IMemberExpressionSyntax { - isPrimaryExpression(): boolean; - } - interface ITypeSyntax extends ISyntaxNodeOrToken { - } - interface INameSyntax extends ITypeSyntax { - } -} -declare module TypeScript.Syntax { - interface IFactory { - sourceUnit(moduleElements: ISyntaxList, endOfFileToken: ISyntaxToken): SourceUnitSyntax; - externalModuleReference(requireKeyword: ISyntaxToken, openParenToken: ISyntaxToken, stringLiteral: ISyntaxToken, closeParenToken: ISyntaxToken): ExternalModuleReferenceSyntax; - moduleNameModuleReference(moduleName: INameSyntax): ModuleNameModuleReferenceSyntax; - importDeclaration(modifiers: ISyntaxList, importKeyword: ISyntaxToken, identifier: ISyntaxToken, equalsToken: ISyntaxToken, moduleReference: IModuleReferenceSyntax, semicolonToken: ISyntaxToken): ImportDeclarationSyntax; - exportAssignment(exportKeyword: ISyntaxToken, equalsToken: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken): ExportAssignmentSyntax; - classDeclaration(modifiers: ISyntaxList, classKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: ISyntaxList, openBraceToken: ISyntaxToken, classElements: ISyntaxList, closeBraceToken: ISyntaxToken): ClassDeclarationSyntax; - interfaceDeclaration(modifiers: ISyntaxList, interfaceKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: ISyntaxList, body: ObjectTypeSyntax): InterfaceDeclarationSyntax; - heritageClause(kind: SyntaxKind, extendsOrImplementsKeyword: ISyntaxToken, typeNames: ISeparatedSyntaxList): HeritageClauseSyntax; - moduleDeclaration(modifiers: ISyntaxList, moduleKeyword: ISyntaxToken, name: INameSyntax, stringLiteral: ISyntaxToken, openBraceToken: ISyntaxToken, moduleElements: ISyntaxList, closeBraceToken: ISyntaxToken): ModuleDeclarationSyntax; - functionDeclaration(modifiers: ISyntaxList, functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): FunctionDeclarationSyntax; - variableStatement(modifiers: ISyntaxList, variableDeclaration: VariableDeclarationSyntax, semicolonToken: ISyntaxToken): VariableStatementSyntax; - variableDeclaration(varKeyword: ISyntaxToken, variableDeclarators: ISeparatedSyntaxList): VariableDeclarationSyntax; - variableDeclarator(propertyName: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax): VariableDeclaratorSyntax; - equalsValueClause(equalsToken: ISyntaxToken, value: IExpressionSyntax): EqualsValueClauseSyntax; - prefixUnaryExpression(kind: SyntaxKind, operatorToken: ISyntaxToken, operand: IUnaryExpressionSyntax): PrefixUnaryExpressionSyntax; - arrayLiteralExpression(openBracketToken: ISyntaxToken, expressions: ISeparatedSyntaxList, closeBracketToken: ISyntaxToken): ArrayLiteralExpressionSyntax; - omittedExpression(): OmittedExpressionSyntax; - parenthesizedExpression(openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken): ParenthesizedExpressionSyntax; - simpleArrowFunctionExpression(identifier: ISyntaxToken, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax): SimpleArrowFunctionExpressionSyntax; - parenthesizedArrowFunctionExpression(callSignature: CallSignatureSyntax, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax): ParenthesizedArrowFunctionExpressionSyntax; - qualifiedName(left: INameSyntax, dotToken: ISyntaxToken, right: ISyntaxToken): QualifiedNameSyntax; - typeArgumentList(lessThanToken: ISyntaxToken, typeArguments: ISeparatedSyntaxList, greaterThanToken: ISyntaxToken): TypeArgumentListSyntax; - constructorType(newKeyword: ISyntaxToken, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax): ConstructorTypeSyntax; - functionType(typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax): FunctionTypeSyntax; - objectType(openBraceToken: ISyntaxToken, typeMembers: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken): ObjectTypeSyntax; - arrayType(type: ITypeSyntax, openBracketToken: ISyntaxToken, closeBracketToken: ISyntaxToken): ArrayTypeSyntax; - genericType(name: INameSyntax, typeArgumentList: TypeArgumentListSyntax): GenericTypeSyntax; - typeQuery(typeOfKeyword: ISyntaxToken, name: INameSyntax): TypeQuerySyntax; - typeAnnotation(colonToken: ISyntaxToken, type: ITypeSyntax): TypeAnnotationSyntax; - block(openBraceToken: ISyntaxToken, statements: ISyntaxList, closeBraceToken: ISyntaxToken): BlockSyntax; - parameter(dotDotDotToken: ISyntaxToken, modifiers: ISyntaxList, identifier: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax): ParameterSyntax; - memberAccessExpression(expression: IExpressionSyntax, dotToken: ISyntaxToken, name: ISyntaxToken): MemberAccessExpressionSyntax; - postfixUnaryExpression(kind: SyntaxKind, operand: IMemberExpressionSyntax, operatorToken: ISyntaxToken): PostfixUnaryExpressionSyntax; - elementAccessExpression(expression: IExpressionSyntax, openBracketToken: ISyntaxToken, argumentExpression: IExpressionSyntax, closeBracketToken: ISyntaxToken): ElementAccessExpressionSyntax; - invocationExpression(expression: IMemberExpressionSyntax, argumentList: ArgumentListSyntax): InvocationExpressionSyntax; - argumentList(typeArgumentList: TypeArgumentListSyntax, openParenToken: ISyntaxToken, arguments: ISeparatedSyntaxList, closeParenToken: ISyntaxToken): ArgumentListSyntax; - binaryExpression(kind: SyntaxKind, left: IExpressionSyntax, operatorToken: ISyntaxToken, right: IExpressionSyntax): BinaryExpressionSyntax; - conditionalExpression(condition: IExpressionSyntax, questionToken: ISyntaxToken, whenTrue: IExpressionSyntax, colonToken: ISyntaxToken, whenFalse: IExpressionSyntax): ConditionalExpressionSyntax; - constructSignature(newKeyword: ISyntaxToken, callSignature: CallSignatureSyntax): ConstructSignatureSyntax; - methodSignature(propertyName: ISyntaxToken, questionToken: ISyntaxToken, callSignature: CallSignatureSyntax): MethodSignatureSyntax; - indexSignature(openBracketToken: ISyntaxToken, parameter: ParameterSyntax, closeBracketToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax): IndexSignatureSyntax; - propertySignature(propertyName: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax): PropertySignatureSyntax; - callSignature(typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, typeAnnotation: TypeAnnotationSyntax): CallSignatureSyntax; - parameterList(openParenToken: ISyntaxToken, parameters: ISeparatedSyntaxList, closeParenToken: ISyntaxToken): ParameterListSyntax; - typeParameterList(lessThanToken: ISyntaxToken, typeParameters: ISeparatedSyntaxList, greaterThanToken: ISyntaxToken): TypeParameterListSyntax; - typeParameter(identifier: ISyntaxToken, constraint: ConstraintSyntax): TypeParameterSyntax; - constraint(extendsKeyword: ISyntaxToken, type: ITypeSyntax): ConstraintSyntax; - elseClause(elseKeyword: ISyntaxToken, statement: IStatementSyntax): ElseClauseSyntax; - ifStatement(ifKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax, elseClause: ElseClauseSyntax): IfStatementSyntax; - expressionStatement(expression: IExpressionSyntax, semicolonToken: ISyntaxToken): ExpressionStatementSyntax; - constructorDeclaration(modifiers: ISyntaxList, constructorKeyword: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): ConstructorDeclarationSyntax; - memberFunctionDeclaration(modifiers: ISyntaxList, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): MemberFunctionDeclarationSyntax; - getAccessor(modifiers: ISyntaxList, getKeyword: ISyntaxToken, propertyName: ISyntaxToken, parameterList: ParameterListSyntax, typeAnnotation: TypeAnnotationSyntax, block: BlockSyntax): GetAccessorSyntax; - setAccessor(modifiers: ISyntaxList, setKeyword: ISyntaxToken, propertyName: ISyntaxToken, parameterList: ParameterListSyntax, block: BlockSyntax): SetAccessorSyntax; - memberVariableDeclaration(modifiers: ISyntaxList, variableDeclarator: VariableDeclaratorSyntax, semicolonToken: ISyntaxToken): MemberVariableDeclarationSyntax; - indexMemberDeclaration(modifiers: ISyntaxList, indexSignature: IndexSignatureSyntax, semicolonToken: ISyntaxToken): IndexMemberDeclarationSyntax; - throwStatement(throwKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken): ThrowStatementSyntax; - returnStatement(returnKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken): ReturnStatementSyntax; - objectCreationExpression(newKeyword: ISyntaxToken, expression: IMemberExpressionSyntax, argumentList: ArgumentListSyntax): ObjectCreationExpressionSyntax; - switchStatement(switchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, openBraceToken: ISyntaxToken, switchClauses: ISyntaxList, closeBraceToken: ISyntaxToken): SwitchStatementSyntax; - caseSwitchClause(caseKeyword: ISyntaxToken, expression: IExpressionSyntax, colonToken: ISyntaxToken, statements: ISyntaxList): CaseSwitchClauseSyntax; - defaultSwitchClause(defaultKeyword: ISyntaxToken, colonToken: ISyntaxToken, statements: ISyntaxList): DefaultSwitchClauseSyntax; - breakStatement(breakKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken): BreakStatementSyntax; - continueStatement(continueKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken): ContinueStatementSyntax; - forStatement(forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, initializer: IExpressionSyntax, firstSemicolonToken: ISyntaxToken, condition: IExpressionSyntax, secondSemicolonToken: ISyntaxToken, incrementor: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): ForStatementSyntax; - forInStatement(forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, left: IExpressionSyntax, inKeyword: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): ForInStatementSyntax; - whileStatement(whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): WhileStatementSyntax; - withStatement(withKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): WithStatementSyntax; - enumDeclaration(modifiers: ISyntaxList, enumKeyword: ISyntaxToken, identifier: ISyntaxToken, openBraceToken: ISyntaxToken, enumElements: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken): EnumDeclarationSyntax; - enumElement(propertyName: ISyntaxToken, equalsValueClause: EqualsValueClauseSyntax): EnumElementSyntax; - castExpression(lessThanToken: ISyntaxToken, type: ITypeSyntax, greaterThanToken: ISyntaxToken, expression: IUnaryExpressionSyntax): CastExpressionSyntax; - objectLiteralExpression(openBraceToken: ISyntaxToken, propertyAssignments: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken): ObjectLiteralExpressionSyntax; - simplePropertyAssignment(propertyName: ISyntaxToken, colonToken: ISyntaxToken, expression: IExpressionSyntax): SimplePropertyAssignmentSyntax; - functionPropertyAssignment(propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionPropertyAssignmentSyntax; - functionExpression(functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionExpressionSyntax; - emptyStatement(semicolonToken: ISyntaxToken): EmptyStatementSyntax; - tryStatement(tryKeyword: ISyntaxToken, block: BlockSyntax, catchClause: CatchClauseSyntax, finallyClause: FinallyClauseSyntax): TryStatementSyntax; - catchClause(catchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, identifier: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, closeParenToken: ISyntaxToken, block: BlockSyntax): CatchClauseSyntax; - finallyClause(finallyKeyword: ISyntaxToken, block: BlockSyntax): FinallyClauseSyntax; - labeledStatement(identifier: ISyntaxToken, colonToken: ISyntaxToken, statement: IStatementSyntax): LabeledStatementSyntax; - doStatement(doKeyword: ISyntaxToken, statement: IStatementSyntax, whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, semicolonToken: ISyntaxToken): DoStatementSyntax; - typeOfExpression(typeOfKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax): TypeOfExpressionSyntax; - deleteExpression(deleteKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax): DeleteExpressionSyntax; - voidExpression(voidKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax): VoidExpressionSyntax; - debuggerStatement(debuggerKeyword: ISyntaxToken, semicolonToken: ISyntaxToken): DebuggerStatementSyntax; - } - class NormalModeFactory implements IFactory { - public sourceUnit(moduleElements: ISyntaxList, endOfFileToken: ISyntaxToken): SourceUnitSyntax; - public externalModuleReference(requireKeyword: ISyntaxToken, openParenToken: ISyntaxToken, stringLiteral: ISyntaxToken, closeParenToken: ISyntaxToken): ExternalModuleReferenceSyntax; - public moduleNameModuleReference(moduleName: INameSyntax): ModuleNameModuleReferenceSyntax; - public importDeclaration(modifiers: ISyntaxList, importKeyword: ISyntaxToken, identifier: ISyntaxToken, equalsToken: ISyntaxToken, moduleReference: IModuleReferenceSyntax, semicolonToken: ISyntaxToken): ImportDeclarationSyntax; - public exportAssignment(exportKeyword: ISyntaxToken, equalsToken: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken): ExportAssignmentSyntax; - public classDeclaration(modifiers: ISyntaxList, classKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: ISyntaxList, openBraceToken: ISyntaxToken, classElements: ISyntaxList, closeBraceToken: ISyntaxToken): ClassDeclarationSyntax; - public interfaceDeclaration(modifiers: ISyntaxList, interfaceKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: ISyntaxList, body: ObjectTypeSyntax): InterfaceDeclarationSyntax; - public heritageClause(kind: SyntaxKind, extendsOrImplementsKeyword: ISyntaxToken, typeNames: ISeparatedSyntaxList): HeritageClauseSyntax; - public moduleDeclaration(modifiers: ISyntaxList, moduleKeyword: ISyntaxToken, name: INameSyntax, stringLiteral: ISyntaxToken, openBraceToken: ISyntaxToken, moduleElements: ISyntaxList, closeBraceToken: ISyntaxToken): ModuleDeclarationSyntax; - public functionDeclaration(modifiers: ISyntaxList, functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): FunctionDeclarationSyntax; - public variableStatement(modifiers: ISyntaxList, variableDeclaration: VariableDeclarationSyntax, semicolonToken: ISyntaxToken): VariableStatementSyntax; - public variableDeclaration(varKeyword: ISyntaxToken, variableDeclarators: ISeparatedSyntaxList): VariableDeclarationSyntax; - public variableDeclarator(propertyName: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax): VariableDeclaratorSyntax; - public equalsValueClause(equalsToken: ISyntaxToken, value: IExpressionSyntax): EqualsValueClauseSyntax; - public prefixUnaryExpression(kind: SyntaxKind, operatorToken: ISyntaxToken, operand: IUnaryExpressionSyntax): PrefixUnaryExpressionSyntax; - public arrayLiteralExpression(openBracketToken: ISyntaxToken, expressions: ISeparatedSyntaxList, closeBracketToken: ISyntaxToken): ArrayLiteralExpressionSyntax; - public omittedExpression(): OmittedExpressionSyntax; - public parenthesizedExpression(openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken): ParenthesizedExpressionSyntax; - public simpleArrowFunctionExpression(identifier: ISyntaxToken, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax): SimpleArrowFunctionExpressionSyntax; - public parenthesizedArrowFunctionExpression(callSignature: CallSignatureSyntax, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax): ParenthesizedArrowFunctionExpressionSyntax; - public qualifiedName(left: INameSyntax, dotToken: ISyntaxToken, right: ISyntaxToken): QualifiedNameSyntax; - public typeArgumentList(lessThanToken: ISyntaxToken, typeArguments: ISeparatedSyntaxList, greaterThanToken: ISyntaxToken): TypeArgumentListSyntax; - public constructorType(newKeyword: ISyntaxToken, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax): ConstructorTypeSyntax; - public functionType(typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax): FunctionTypeSyntax; - public objectType(openBraceToken: ISyntaxToken, typeMembers: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken): ObjectTypeSyntax; - public arrayType(type: ITypeSyntax, openBracketToken: ISyntaxToken, closeBracketToken: ISyntaxToken): ArrayTypeSyntax; - public genericType(name: INameSyntax, typeArgumentList: TypeArgumentListSyntax): GenericTypeSyntax; - public typeQuery(typeOfKeyword: ISyntaxToken, name: INameSyntax): TypeQuerySyntax; - public typeAnnotation(colonToken: ISyntaxToken, type: ITypeSyntax): TypeAnnotationSyntax; - public block(openBraceToken: ISyntaxToken, statements: ISyntaxList, closeBraceToken: ISyntaxToken): BlockSyntax; - public parameter(dotDotDotToken: ISyntaxToken, modifiers: ISyntaxList, identifier: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax): ParameterSyntax; - public memberAccessExpression(expression: IExpressionSyntax, dotToken: ISyntaxToken, name: ISyntaxToken): MemberAccessExpressionSyntax; - public postfixUnaryExpression(kind: SyntaxKind, operand: IMemberExpressionSyntax, operatorToken: ISyntaxToken): PostfixUnaryExpressionSyntax; - public elementAccessExpression(expression: IExpressionSyntax, openBracketToken: ISyntaxToken, argumentExpression: IExpressionSyntax, closeBracketToken: ISyntaxToken): ElementAccessExpressionSyntax; - public invocationExpression(expression: IMemberExpressionSyntax, argumentList: ArgumentListSyntax): InvocationExpressionSyntax; - public argumentList(typeArgumentList: TypeArgumentListSyntax, openParenToken: ISyntaxToken, _arguments: ISeparatedSyntaxList, closeParenToken: ISyntaxToken): ArgumentListSyntax; - public binaryExpression(kind: SyntaxKind, left: IExpressionSyntax, operatorToken: ISyntaxToken, right: IExpressionSyntax): BinaryExpressionSyntax; - public conditionalExpression(condition: IExpressionSyntax, questionToken: ISyntaxToken, whenTrue: IExpressionSyntax, colonToken: ISyntaxToken, whenFalse: IExpressionSyntax): ConditionalExpressionSyntax; - public constructSignature(newKeyword: ISyntaxToken, callSignature: CallSignatureSyntax): ConstructSignatureSyntax; - public methodSignature(propertyName: ISyntaxToken, questionToken: ISyntaxToken, callSignature: CallSignatureSyntax): MethodSignatureSyntax; - public indexSignature(openBracketToken: ISyntaxToken, parameter: ParameterSyntax, closeBracketToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax): IndexSignatureSyntax; - public propertySignature(propertyName: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax): PropertySignatureSyntax; - public callSignature(typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, typeAnnotation: TypeAnnotationSyntax): CallSignatureSyntax; - public parameterList(openParenToken: ISyntaxToken, parameters: ISeparatedSyntaxList, closeParenToken: ISyntaxToken): ParameterListSyntax; - public typeParameterList(lessThanToken: ISyntaxToken, typeParameters: ISeparatedSyntaxList, greaterThanToken: ISyntaxToken): TypeParameterListSyntax; - public typeParameter(identifier: ISyntaxToken, constraint: ConstraintSyntax): TypeParameterSyntax; - public constraint(extendsKeyword: ISyntaxToken, type: ITypeSyntax): ConstraintSyntax; - public elseClause(elseKeyword: ISyntaxToken, statement: IStatementSyntax): ElseClauseSyntax; - public ifStatement(ifKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax, elseClause: ElseClauseSyntax): IfStatementSyntax; - public expressionStatement(expression: IExpressionSyntax, semicolonToken: ISyntaxToken): ExpressionStatementSyntax; - public constructorDeclaration(modifiers: ISyntaxList, constructorKeyword: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): ConstructorDeclarationSyntax; - public memberFunctionDeclaration(modifiers: ISyntaxList, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): MemberFunctionDeclarationSyntax; - public getAccessor(modifiers: ISyntaxList, getKeyword: ISyntaxToken, propertyName: ISyntaxToken, parameterList: ParameterListSyntax, typeAnnotation: TypeAnnotationSyntax, block: BlockSyntax): GetAccessorSyntax; - public setAccessor(modifiers: ISyntaxList, setKeyword: ISyntaxToken, propertyName: ISyntaxToken, parameterList: ParameterListSyntax, block: BlockSyntax): SetAccessorSyntax; - public memberVariableDeclaration(modifiers: ISyntaxList, variableDeclarator: VariableDeclaratorSyntax, semicolonToken: ISyntaxToken): MemberVariableDeclarationSyntax; - public indexMemberDeclaration(modifiers: ISyntaxList, indexSignature: IndexSignatureSyntax, semicolonToken: ISyntaxToken): IndexMemberDeclarationSyntax; - public throwStatement(throwKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken): ThrowStatementSyntax; - public returnStatement(returnKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken): ReturnStatementSyntax; - public objectCreationExpression(newKeyword: ISyntaxToken, expression: IMemberExpressionSyntax, argumentList: ArgumentListSyntax): ObjectCreationExpressionSyntax; - public switchStatement(switchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, openBraceToken: ISyntaxToken, switchClauses: ISyntaxList, closeBraceToken: ISyntaxToken): SwitchStatementSyntax; - public caseSwitchClause(caseKeyword: ISyntaxToken, expression: IExpressionSyntax, colonToken: ISyntaxToken, statements: ISyntaxList): CaseSwitchClauseSyntax; - public defaultSwitchClause(defaultKeyword: ISyntaxToken, colonToken: ISyntaxToken, statements: ISyntaxList): DefaultSwitchClauseSyntax; - public breakStatement(breakKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken): BreakStatementSyntax; - public continueStatement(continueKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken): ContinueStatementSyntax; - public forStatement(forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, initializer: IExpressionSyntax, firstSemicolonToken: ISyntaxToken, condition: IExpressionSyntax, secondSemicolonToken: ISyntaxToken, incrementor: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): ForStatementSyntax; - public forInStatement(forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, left: IExpressionSyntax, inKeyword: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): ForInStatementSyntax; - public whileStatement(whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): WhileStatementSyntax; - public withStatement(withKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): WithStatementSyntax; - public enumDeclaration(modifiers: ISyntaxList, enumKeyword: ISyntaxToken, identifier: ISyntaxToken, openBraceToken: ISyntaxToken, enumElements: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken): EnumDeclarationSyntax; - public enumElement(propertyName: ISyntaxToken, equalsValueClause: EqualsValueClauseSyntax): EnumElementSyntax; - public castExpression(lessThanToken: ISyntaxToken, type: ITypeSyntax, greaterThanToken: ISyntaxToken, expression: IUnaryExpressionSyntax): CastExpressionSyntax; - public objectLiteralExpression(openBraceToken: ISyntaxToken, propertyAssignments: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken): ObjectLiteralExpressionSyntax; - public simplePropertyAssignment(propertyName: ISyntaxToken, colonToken: ISyntaxToken, expression: IExpressionSyntax): SimplePropertyAssignmentSyntax; - public functionPropertyAssignment(propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionPropertyAssignmentSyntax; - public functionExpression(functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionExpressionSyntax; - public emptyStatement(semicolonToken: ISyntaxToken): EmptyStatementSyntax; - public tryStatement(tryKeyword: ISyntaxToken, block: BlockSyntax, catchClause: CatchClauseSyntax, finallyClause: FinallyClauseSyntax): TryStatementSyntax; - public catchClause(catchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, identifier: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, closeParenToken: ISyntaxToken, block: BlockSyntax): CatchClauseSyntax; - public finallyClause(finallyKeyword: ISyntaxToken, block: BlockSyntax): FinallyClauseSyntax; - public labeledStatement(identifier: ISyntaxToken, colonToken: ISyntaxToken, statement: IStatementSyntax): LabeledStatementSyntax; - public doStatement(doKeyword: ISyntaxToken, statement: IStatementSyntax, whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, semicolonToken: ISyntaxToken): DoStatementSyntax; - public typeOfExpression(typeOfKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax): TypeOfExpressionSyntax; - public deleteExpression(deleteKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax): DeleteExpressionSyntax; - public voidExpression(voidKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax): VoidExpressionSyntax; - public debuggerStatement(debuggerKeyword: ISyntaxToken, semicolonToken: ISyntaxToken): DebuggerStatementSyntax; - } - class StrictModeFactory implements IFactory { - public sourceUnit(moduleElements: ISyntaxList, endOfFileToken: ISyntaxToken): SourceUnitSyntax; - public externalModuleReference(requireKeyword: ISyntaxToken, openParenToken: ISyntaxToken, stringLiteral: ISyntaxToken, closeParenToken: ISyntaxToken): ExternalModuleReferenceSyntax; - public moduleNameModuleReference(moduleName: INameSyntax): ModuleNameModuleReferenceSyntax; - public importDeclaration(modifiers: ISyntaxList, importKeyword: ISyntaxToken, identifier: ISyntaxToken, equalsToken: ISyntaxToken, moduleReference: IModuleReferenceSyntax, semicolonToken: ISyntaxToken): ImportDeclarationSyntax; - public exportAssignment(exportKeyword: ISyntaxToken, equalsToken: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken): ExportAssignmentSyntax; - public classDeclaration(modifiers: ISyntaxList, classKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: ISyntaxList, openBraceToken: ISyntaxToken, classElements: ISyntaxList, closeBraceToken: ISyntaxToken): ClassDeclarationSyntax; - public interfaceDeclaration(modifiers: ISyntaxList, interfaceKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: ISyntaxList, body: ObjectTypeSyntax): InterfaceDeclarationSyntax; - public heritageClause(kind: SyntaxKind, extendsOrImplementsKeyword: ISyntaxToken, typeNames: ISeparatedSyntaxList): HeritageClauseSyntax; - public moduleDeclaration(modifiers: ISyntaxList, moduleKeyword: ISyntaxToken, name: INameSyntax, stringLiteral: ISyntaxToken, openBraceToken: ISyntaxToken, moduleElements: ISyntaxList, closeBraceToken: ISyntaxToken): ModuleDeclarationSyntax; - public functionDeclaration(modifiers: ISyntaxList, functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): FunctionDeclarationSyntax; - public variableStatement(modifiers: ISyntaxList, variableDeclaration: VariableDeclarationSyntax, semicolonToken: ISyntaxToken): VariableStatementSyntax; - public variableDeclaration(varKeyword: ISyntaxToken, variableDeclarators: ISeparatedSyntaxList): VariableDeclarationSyntax; - public variableDeclarator(propertyName: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax): VariableDeclaratorSyntax; - public equalsValueClause(equalsToken: ISyntaxToken, value: IExpressionSyntax): EqualsValueClauseSyntax; - public prefixUnaryExpression(kind: SyntaxKind, operatorToken: ISyntaxToken, operand: IUnaryExpressionSyntax): PrefixUnaryExpressionSyntax; - public arrayLiteralExpression(openBracketToken: ISyntaxToken, expressions: ISeparatedSyntaxList, closeBracketToken: ISyntaxToken): ArrayLiteralExpressionSyntax; - public omittedExpression(): OmittedExpressionSyntax; - public parenthesizedExpression(openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken): ParenthesizedExpressionSyntax; - public simpleArrowFunctionExpression(identifier: ISyntaxToken, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax): SimpleArrowFunctionExpressionSyntax; - public parenthesizedArrowFunctionExpression(callSignature: CallSignatureSyntax, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax): ParenthesizedArrowFunctionExpressionSyntax; - public qualifiedName(left: INameSyntax, dotToken: ISyntaxToken, right: ISyntaxToken): QualifiedNameSyntax; - public typeArgumentList(lessThanToken: ISyntaxToken, typeArguments: ISeparatedSyntaxList, greaterThanToken: ISyntaxToken): TypeArgumentListSyntax; - public constructorType(newKeyword: ISyntaxToken, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax): ConstructorTypeSyntax; - public functionType(typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax): FunctionTypeSyntax; - public objectType(openBraceToken: ISyntaxToken, typeMembers: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken): ObjectTypeSyntax; - public arrayType(type: ITypeSyntax, openBracketToken: ISyntaxToken, closeBracketToken: ISyntaxToken): ArrayTypeSyntax; - public genericType(name: INameSyntax, typeArgumentList: TypeArgumentListSyntax): GenericTypeSyntax; - public typeQuery(typeOfKeyword: ISyntaxToken, name: INameSyntax): TypeQuerySyntax; - public typeAnnotation(colonToken: ISyntaxToken, type: ITypeSyntax): TypeAnnotationSyntax; - public block(openBraceToken: ISyntaxToken, statements: ISyntaxList, closeBraceToken: ISyntaxToken): BlockSyntax; - public parameter(dotDotDotToken: ISyntaxToken, modifiers: ISyntaxList, identifier: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax): ParameterSyntax; - public memberAccessExpression(expression: IExpressionSyntax, dotToken: ISyntaxToken, name: ISyntaxToken): MemberAccessExpressionSyntax; - public postfixUnaryExpression(kind: SyntaxKind, operand: IMemberExpressionSyntax, operatorToken: ISyntaxToken): PostfixUnaryExpressionSyntax; - public elementAccessExpression(expression: IExpressionSyntax, openBracketToken: ISyntaxToken, argumentExpression: IExpressionSyntax, closeBracketToken: ISyntaxToken): ElementAccessExpressionSyntax; - public invocationExpression(expression: IMemberExpressionSyntax, argumentList: ArgumentListSyntax): InvocationExpressionSyntax; - public argumentList(typeArgumentList: TypeArgumentListSyntax, openParenToken: ISyntaxToken, _arguments: ISeparatedSyntaxList, closeParenToken: ISyntaxToken): ArgumentListSyntax; - public binaryExpression(kind: SyntaxKind, left: IExpressionSyntax, operatorToken: ISyntaxToken, right: IExpressionSyntax): BinaryExpressionSyntax; - public conditionalExpression(condition: IExpressionSyntax, questionToken: ISyntaxToken, whenTrue: IExpressionSyntax, colonToken: ISyntaxToken, whenFalse: IExpressionSyntax): ConditionalExpressionSyntax; - public constructSignature(newKeyword: ISyntaxToken, callSignature: CallSignatureSyntax): ConstructSignatureSyntax; - public methodSignature(propertyName: ISyntaxToken, questionToken: ISyntaxToken, callSignature: CallSignatureSyntax): MethodSignatureSyntax; - public indexSignature(openBracketToken: ISyntaxToken, parameter: ParameterSyntax, closeBracketToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax): IndexSignatureSyntax; - public propertySignature(propertyName: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax): PropertySignatureSyntax; - public callSignature(typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, typeAnnotation: TypeAnnotationSyntax): CallSignatureSyntax; - public parameterList(openParenToken: ISyntaxToken, parameters: ISeparatedSyntaxList, closeParenToken: ISyntaxToken): ParameterListSyntax; - public typeParameterList(lessThanToken: ISyntaxToken, typeParameters: ISeparatedSyntaxList, greaterThanToken: ISyntaxToken): TypeParameterListSyntax; - public typeParameter(identifier: ISyntaxToken, constraint: ConstraintSyntax): TypeParameterSyntax; - public constraint(extendsKeyword: ISyntaxToken, type: ITypeSyntax): ConstraintSyntax; - public elseClause(elseKeyword: ISyntaxToken, statement: IStatementSyntax): ElseClauseSyntax; - public ifStatement(ifKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax, elseClause: ElseClauseSyntax): IfStatementSyntax; - public expressionStatement(expression: IExpressionSyntax, semicolonToken: ISyntaxToken): ExpressionStatementSyntax; - public constructorDeclaration(modifiers: ISyntaxList, constructorKeyword: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): ConstructorDeclarationSyntax; - public memberFunctionDeclaration(modifiers: ISyntaxList, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): MemberFunctionDeclarationSyntax; - public getAccessor(modifiers: ISyntaxList, getKeyword: ISyntaxToken, propertyName: ISyntaxToken, parameterList: ParameterListSyntax, typeAnnotation: TypeAnnotationSyntax, block: BlockSyntax): GetAccessorSyntax; - public setAccessor(modifiers: ISyntaxList, setKeyword: ISyntaxToken, propertyName: ISyntaxToken, parameterList: ParameterListSyntax, block: BlockSyntax): SetAccessorSyntax; - public memberVariableDeclaration(modifiers: ISyntaxList, variableDeclarator: VariableDeclaratorSyntax, semicolonToken: ISyntaxToken): MemberVariableDeclarationSyntax; - public indexMemberDeclaration(modifiers: ISyntaxList, indexSignature: IndexSignatureSyntax, semicolonToken: ISyntaxToken): IndexMemberDeclarationSyntax; - public throwStatement(throwKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken): ThrowStatementSyntax; - public returnStatement(returnKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken): ReturnStatementSyntax; - public objectCreationExpression(newKeyword: ISyntaxToken, expression: IMemberExpressionSyntax, argumentList: ArgumentListSyntax): ObjectCreationExpressionSyntax; - public switchStatement(switchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, openBraceToken: ISyntaxToken, switchClauses: ISyntaxList, closeBraceToken: ISyntaxToken): SwitchStatementSyntax; - public caseSwitchClause(caseKeyword: ISyntaxToken, expression: IExpressionSyntax, colonToken: ISyntaxToken, statements: ISyntaxList): CaseSwitchClauseSyntax; - public defaultSwitchClause(defaultKeyword: ISyntaxToken, colonToken: ISyntaxToken, statements: ISyntaxList): DefaultSwitchClauseSyntax; - public breakStatement(breakKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken): BreakStatementSyntax; - public continueStatement(continueKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken): ContinueStatementSyntax; - public forStatement(forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, initializer: IExpressionSyntax, firstSemicolonToken: ISyntaxToken, condition: IExpressionSyntax, secondSemicolonToken: ISyntaxToken, incrementor: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): ForStatementSyntax; - public forInStatement(forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, left: IExpressionSyntax, inKeyword: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): ForInStatementSyntax; - public whileStatement(whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): WhileStatementSyntax; - public withStatement(withKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): WithStatementSyntax; - public enumDeclaration(modifiers: ISyntaxList, enumKeyword: ISyntaxToken, identifier: ISyntaxToken, openBraceToken: ISyntaxToken, enumElements: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken): EnumDeclarationSyntax; - public enumElement(propertyName: ISyntaxToken, equalsValueClause: EqualsValueClauseSyntax): EnumElementSyntax; - public castExpression(lessThanToken: ISyntaxToken, type: ITypeSyntax, greaterThanToken: ISyntaxToken, expression: IUnaryExpressionSyntax): CastExpressionSyntax; - public objectLiteralExpression(openBraceToken: ISyntaxToken, propertyAssignments: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken): ObjectLiteralExpressionSyntax; - public simplePropertyAssignment(propertyName: ISyntaxToken, colonToken: ISyntaxToken, expression: IExpressionSyntax): SimplePropertyAssignmentSyntax; - public functionPropertyAssignment(propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionPropertyAssignmentSyntax; - public functionExpression(functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionExpressionSyntax; - public emptyStatement(semicolonToken: ISyntaxToken): EmptyStatementSyntax; - public tryStatement(tryKeyword: ISyntaxToken, block: BlockSyntax, catchClause: CatchClauseSyntax, finallyClause: FinallyClauseSyntax): TryStatementSyntax; - public catchClause(catchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, identifier: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, closeParenToken: ISyntaxToken, block: BlockSyntax): CatchClauseSyntax; - public finallyClause(finallyKeyword: ISyntaxToken, block: BlockSyntax): FinallyClauseSyntax; - public labeledStatement(identifier: ISyntaxToken, colonToken: ISyntaxToken, statement: IStatementSyntax): LabeledStatementSyntax; - public doStatement(doKeyword: ISyntaxToken, statement: IStatementSyntax, whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, semicolonToken: ISyntaxToken): DoStatementSyntax; - public typeOfExpression(typeOfKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax): TypeOfExpressionSyntax; - public deleteExpression(deleteKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax): DeleteExpressionSyntax; - public voidExpression(voidKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax): VoidExpressionSyntax; - public debuggerStatement(debuggerKeyword: ISyntaxToken, semicolonToken: ISyntaxToken): DebuggerStatementSyntax; - } - var normalModeFactory: IFactory; - var strictModeFactory: IFactory; -} -declare module TypeScript.SyntaxFacts { - function isDirectivePrologueElement(node: ISyntaxNodeOrToken): boolean; - function isUseStrictDirective(node: ISyntaxNodeOrToken): boolean; - function isIdentifierNameOrAnyKeyword(token: ISyntaxToken): boolean; -} -declare module TypeScript { - interface ISyntaxList extends ISyntaxElement { - childAt(index: number): ISyntaxNodeOrToken; - toArray(): ISyntaxNodeOrToken[]; - insertChildrenInto(array: ISyntaxElement[], index: number): void; - } -} -declare module TypeScript.Syntax { - class EmptySyntaxList implements ISyntaxList { - public kind(): SyntaxKind; - public isNode(): boolean; - public isToken(): boolean; - public isList(): boolean; - public isSeparatedList(): boolean; - public toJSON(key: any): any; - public childCount(): number; - public childAt(index: number): ISyntaxNodeOrToken; - public toArray(): ISyntaxNodeOrToken[]; - public collectTextElements(elements: string[]): void; - public firstToken(): ISyntaxToken; - public lastToken(): ISyntaxToken; - public fullWidth(): number; - public width(): number; - public leadingTrivia(): ISyntaxTriviaList; - public trailingTrivia(): ISyntaxTriviaList; - public leadingTriviaWidth(): number; - public trailingTriviaWidth(): number; - public fullText(): string; - public isTypeScriptSpecific(): boolean; - public isIncrementallyUnusable(): boolean; - public findTokenInternal(parent: PositionedElement, position: number, fullStart: number): PositionedToken; - public insertChildrenInto(array: ISyntaxElement[], index: number): void; - } - var emptyList: ISyntaxList; - function list(nodes: ISyntaxNodeOrToken[]): ISyntaxList; -} -declare module TypeScript { - class SyntaxNode implements ISyntaxNodeOrToken { - private _data; - constructor(parsedInStrictMode: boolean); - public isNode(): boolean; - public isToken(): boolean; - public isList(): boolean; - public isSeparatedList(): boolean; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public firstToken(): ISyntaxToken; - public lastToken(): ISyntaxToken; - public insertChildrenInto(array: ISyntaxElement[], index: number): void; - public leadingTrivia(): ISyntaxTriviaList; - public trailingTrivia(): ISyntaxTriviaList; - public toJSON(key: any): any; - public accept(visitor: ISyntaxVisitor): any; - public fullText(): string; - public collectTextElements(elements: string[]): void; - public replaceToken(token1: ISyntaxToken, token2: ISyntaxToken): SyntaxNode; - public withLeadingTrivia(trivia: ISyntaxTriviaList): SyntaxNode; - public withTrailingTrivia(trivia: ISyntaxTriviaList): SyntaxNode; - public hasLeadingTrivia(): boolean; - public hasTrailingTrivia(): boolean; - public isTypeScriptSpecific(): boolean; - public isIncrementallyUnusable(): boolean; - public parsedInStrictMode(): boolean; - public fullWidth(): number; - private computeData(); - private data(); - public findToken(position: number, includeSkippedTokens?: boolean): PositionedToken; - private tryGetEndOfFileAt(position); - private findTokenInternal(parent, position, fullStart); - public findTokenOnLeft(position: number, includeSkippedTokens?: boolean): PositionedToken; - public findCompleteTokenOnLeft(position: number, includeSkippedTokens?: boolean): PositionedToken; - public isModuleElement(): boolean; - public isClassElement(): boolean; - public isTypeMember(): boolean; - public isStatement(): boolean; - public isExpression(): boolean; - public isSwitchClause(): boolean; - public structuralEquals(node: SyntaxNode): boolean; - public width(): number; - public leadingTriviaWidth(): number; - public trailingTriviaWidth(): number; - } -} -declare module TypeScript { - interface ISyntaxNodeOrToken extends ISyntaxElement { - withLeadingTrivia(leadingTrivia: ISyntaxTriviaList): ISyntaxNodeOrToken; - withTrailingTrivia(trailingTrivia: ISyntaxTriviaList): ISyntaxNodeOrToken; - accept(visitor: ISyntaxVisitor): any; - } -} -declare module TypeScript { - class SourceUnitSyntax extends SyntaxNode { - public moduleElements: ISyntaxList; - public endOfFileToken: ISyntaxToken; - constructor(moduleElements: ISyntaxList, endOfFileToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(moduleElements: ISyntaxList, endOfFileToken: ISyntaxToken): SourceUnitSyntax; - static create(endOfFileToken: ISyntaxToken): SourceUnitSyntax; - static create1(endOfFileToken: ISyntaxToken): SourceUnitSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): SourceUnitSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): SourceUnitSyntax; - public withModuleElements(moduleElements: ISyntaxList): SourceUnitSyntax; - public withModuleElement(moduleElement: IModuleElementSyntax): SourceUnitSyntax; - public withEndOfFileToken(endOfFileToken: ISyntaxToken): SourceUnitSyntax; - public isTypeScriptSpecific(): boolean; - } - class ExternalModuleReferenceSyntax extends SyntaxNode implements IModuleReferenceSyntax { - public requireKeyword: ISyntaxToken; - public openParenToken: ISyntaxToken; - public stringLiteral: ISyntaxToken; - public closeParenToken: ISyntaxToken; - constructor(requireKeyword: ISyntaxToken, openParenToken: ISyntaxToken, stringLiteral: ISyntaxToken, closeParenToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isModuleReference(): boolean; - public update(requireKeyword: ISyntaxToken, openParenToken: ISyntaxToken, stringLiteral: ISyntaxToken, closeParenToken: ISyntaxToken): ExternalModuleReferenceSyntax; - static create1(stringLiteral: ISyntaxToken): ExternalModuleReferenceSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ExternalModuleReferenceSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ExternalModuleReferenceSyntax; - public withRequireKeyword(requireKeyword: ISyntaxToken): ExternalModuleReferenceSyntax; - public withOpenParenToken(openParenToken: ISyntaxToken): ExternalModuleReferenceSyntax; - public withStringLiteral(stringLiteral: ISyntaxToken): ExternalModuleReferenceSyntax; - public withCloseParenToken(closeParenToken: ISyntaxToken): ExternalModuleReferenceSyntax; - public isTypeScriptSpecific(): boolean; - } - class ModuleNameModuleReferenceSyntax extends SyntaxNode implements IModuleReferenceSyntax { - public moduleName: INameSyntax; - constructor(moduleName: INameSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isModuleReference(): boolean; - public update(moduleName: INameSyntax): ModuleNameModuleReferenceSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ModuleNameModuleReferenceSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ModuleNameModuleReferenceSyntax; - public withModuleName(moduleName: INameSyntax): ModuleNameModuleReferenceSyntax; - public isTypeScriptSpecific(): boolean; - } - class ImportDeclarationSyntax extends SyntaxNode implements IModuleElementSyntax { - public modifiers: ISyntaxList; - public importKeyword: ISyntaxToken; - public identifier: ISyntaxToken; - public equalsToken: ISyntaxToken; - public moduleReference: IModuleReferenceSyntax; - public semicolonToken: ISyntaxToken; - constructor(modifiers: ISyntaxList, importKeyword: ISyntaxToken, identifier: ISyntaxToken, equalsToken: ISyntaxToken, moduleReference: IModuleReferenceSyntax, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isModuleElement(): boolean; - public update(modifiers: ISyntaxList, importKeyword: ISyntaxToken, identifier: ISyntaxToken, equalsToken: ISyntaxToken, moduleReference: IModuleReferenceSyntax, semicolonToken: ISyntaxToken): ImportDeclarationSyntax; - static create(importKeyword: ISyntaxToken, identifier: ISyntaxToken, equalsToken: ISyntaxToken, moduleReference: IModuleReferenceSyntax, semicolonToken: ISyntaxToken): ImportDeclarationSyntax; - static create1(identifier: ISyntaxToken, moduleReference: IModuleReferenceSyntax): ImportDeclarationSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ImportDeclarationSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ImportDeclarationSyntax; - public withModifiers(modifiers: ISyntaxList): ImportDeclarationSyntax; - public withModifier(modifier: ISyntaxToken): ImportDeclarationSyntax; - public withImportKeyword(importKeyword: ISyntaxToken): ImportDeclarationSyntax; - public withIdentifier(identifier: ISyntaxToken): ImportDeclarationSyntax; - public withEqualsToken(equalsToken: ISyntaxToken): ImportDeclarationSyntax; - public withModuleReference(moduleReference: IModuleReferenceSyntax): ImportDeclarationSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): ImportDeclarationSyntax; - public isTypeScriptSpecific(): boolean; - } - class ExportAssignmentSyntax extends SyntaxNode implements IModuleElementSyntax { - public exportKeyword: ISyntaxToken; - public equalsToken: ISyntaxToken; - public identifier: ISyntaxToken; - public semicolonToken: ISyntaxToken; - constructor(exportKeyword: ISyntaxToken, equalsToken: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isModuleElement(): boolean; - public update(exportKeyword: ISyntaxToken, equalsToken: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken): ExportAssignmentSyntax; - static create1(identifier: ISyntaxToken): ExportAssignmentSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ExportAssignmentSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ExportAssignmentSyntax; - public withExportKeyword(exportKeyword: ISyntaxToken): ExportAssignmentSyntax; - public withEqualsToken(equalsToken: ISyntaxToken): ExportAssignmentSyntax; - public withIdentifier(identifier: ISyntaxToken): ExportAssignmentSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): ExportAssignmentSyntax; - public isTypeScriptSpecific(): boolean; - } - class ClassDeclarationSyntax extends SyntaxNode implements IModuleElementSyntax { - public modifiers: ISyntaxList; - public classKeyword: ISyntaxToken; - public identifier: ISyntaxToken; - public typeParameterList: TypeParameterListSyntax; - public heritageClauses: ISyntaxList; - public openBraceToken: ISyntaxToken; - public classElements: ISyntaxList; - public closeBraceToken: ISyntaxToken; - constructor(modifiers: ISyntaxList, classKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: ISyntaxList, openBraceToken: ISyntaxToken, classElements: ISyntaxList, closeBraceToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isModuleElement(): boolean; - public update(modifiers: ISyntaxList, classKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: ISyntaxList, openBraceToken: ISyntaxToken, classElements: ISyntaxList, closeBraceToken: ISyntaxToken): ClassDeclarationSyntax; - static create(classKeyword: ISyntaxToken, identifier: ISyntaxToken, openBraceToken: ISyntaxToken, closeBraceToken: ISyntaxToken): ClassDeclarationSyntax; - static create1(identifier: ISyntaxToken): ClassDeclarationSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ClassDeclarationSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ClassDeclarationSyntax; - public withModifiers(modifiers: ISyntaxList): ClassDeclarationSyntax; - public withModifier(modifier: ISyntaxToken): ClassDeclarationSyntax; - public withClassKeyword(classKeyword: ISyntaxToken): ClassDeclarationSyntax; - public withIdentifier(identifier: ISyntaxToken): ClassDeclarationSyntax; - public withTypeParameterList(typeParameterList: TypeParameterListSyntax): ClassDeclarationSyntax; - public withHeritageClauses(heritageClauses: ISyntaxList): ClassDeclarationSyntax; - public withHeritageClause(heritageClause: HeritageClauseSyntax): ClassDeclarationSyntax; - public withOpenBraceToken(openBraceToken: ISyntaxToken): ClassDeclarationSyntax; - public withClassElements(classElements: ISyntaxList): ClassDeclarationSyntax; - public withClassElement(classElement: IClassElementSyntax): ClassDeclarationSyntax; - public withCloseBraceToken(closeBraceToken: ISyntaxToken): ClassDeclarationSyntax; - public isTypeScriptSpecific(): boolean; - } - class InterfaceDeclarationSyntax extends SyntaxNode implements IModuleElementSyntax { - public modifiers: ISyntaxList; - public interfaceKeyword: ISyntaxToken; - public identifier: ISyntaxToken; - public typeParameterList: TypeParameterListSyntax; - public heritageClauses: ISyntaxList; - public body: ObjectTypeSyntax; - constructor(modifiers: ISyntaxList, interfaceKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: ISyntaxList, body: ObjectTypeSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isModuleElement(): boolean; - public update(modifiers: ISyntaxList, interfaceKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: ISyntaxList, body: ObjectTypeSyntax): InterfaceDeclarationSyntax; - static create(interfaceKeyword: ISyntaxToken, identifier: ISyntaxToken, body: ObjectTypeSyntax): InterfaceDeclarationSyntax; - static create1(identifier: ISyntaxToken): InterfaceDeclarationSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): InterfaceDeclarationSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): InterfaceDeclarationSyntax; - public withModifiers(modifiers: ISyntaxList): InterfaceDeclarationSyntax; - public withModifier(modifier: ISyntaxToken): InterfaceDeclarationSyntax; - public withInterfaceKeyword(interfaceKeyword: ISyntaxToken): InterfaceDeclarationSyntax; - public withIdentifier(identifier: ISyntaxToken): InterfaceDeclarationSyntax; - public withTypeParameterList(typeParameterList: TypeParameterListSyntax): InterfaceDeclarationSyntax; - public withHeritageClauses(heritageClauses: ISyntaxList): InterfaceDeclarationSyntax; - public withHeritageClause(heritageClause: HeritageClauseSyntax): InterfaceDeclarationSyntax; - public withBody(body: ObjectTypeSyntax): InterfaceDeclarationSyntax; - public isTypeScriptSpecific(): boolean; - } - class HeritageClauseSyntax extends SyntaxNode { - public extendsOrImplementsKeyword: ISyntaxToken; - public typeNames: ISeparatedSyntaxList; - private _kind; - constructor(kind: SyntaxKind, extendsOrImplementsKeyword: ISyntaxToken, typeNames: ISeparatedSyntaxList, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public kind(): SyntaxKind; - public update(kind: SyntaxKind, extendsOrImplementsKeyword: ISyntaxToken, typeNames: ISeparatedSyntaxList): HeritageClauseSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): HeritageClauseSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): HeritageClauseSyntax; - public withKind(kind: SyntaxKind): HeritageClauseSyntax; - public withExtendsOrImplementsKeyword(extendsOrImplementsKeyword: ISyntaxToken): HeritageClauseSyntax; - public withTypeNames(typeNames: ISeparatedSyntaxList): HeritageClauseSyntax; - public withTypeName(typeName: INameSyntax): HeritageClauseSyntax; - public isTypeScriptSpecific(): boolean; - } - class ModuleDeclarationSyntax extends SyntaxNode implements IModuleElementSyntax { - public modifiers: ISyntaxList; - public moduleKeyword: ISyntaxToken; - public name: INameSyntax; - public stringLiteral: ISyntaxToken; - public openBraceToken: ISyntaxToken; - public moduleElements: ISyntaxList; - public closeBraceToken: ISyntaxToken; - constructor(modifiers: ISyntaxList, moduleKeyword: ISyntaxToken, name: INameSyntax, stringLiteral: ISyntaxToken, openBraceToken: ISyntaxToken, moduleElements: ISyntaxList, closeBraceToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isModuleElement(): boolean; - public update(modifiers: ISyntaxList, moduleKeyword: ISyntaxToken, name: INameSyntax, stringLiteral: ISyntaxToken, openBraceToken: ISyntaxToken, moduleElements: ISyntaxList, closeBraceToken: ISyntaxToken): ModuleDeclarationSyntax; - static create(moduleKeyword: ISyntaxToken, openBraceToken: ISyntaxToken, closeBraceToken: ISyntaxToken): ModuleDeclarationSyntax; - static create1(): ModuleDeclarationSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ModuleDeclarationSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ModuleDeclarationSyntax; - public withModifiers(modifiers: ISyntaxList): ModuleDeclarationSyntax; - public withModifier(modifier: ISyntaxToken): ModuleDeclarationSyntax; - public withModuleKeyword(moduleKeyword: ISyntaxToken): ModuleDeclarationSyntax; - public withName(name: INameSyntax): ModuleDeclarationSyntax; - public withStringLiteral(stringLiteral: ISyntaxToken): ModuleDeclarationSyntax; - public withOpenBraceToken(openBraceToken: ISyntaxToken): ModuleDeclarationSyntax; - public withModuleElements(moduleElements: ISyntaxList): ModuleDeclarationSyntax; - public withModuleElement(moduleElement: IModuleElementSyntax): ModuleDeclarationSyntax; - public withCloseBraceToken(closeBraceToken: ISyntaxToken): ModuleDeclarationSyntax; - public isTypeScriptSpecific(): boolean; - } - class FunctionDeclarationSyntax extends SyntaxNode implements IStatementSyntax { - public modifiers: ISyntaxList; - public functionKeyword: ISyntaxToken; - public identifier: ISyntaxToken; - public callSignature: CallSignatureSyntax; - public block: BlockSyntax; - public semicolonToken: ISyntaxToken; - constructor(modifiers: ISyntaxList, functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(modifiers: ISyntaxList, functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): FunctionDeclarationSyntax; - static create(functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax): FunctionDeclarationSyntax; - static create1(identifier: ISyntaxToken): FunctionDeclarationSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): FunctionDeclarationSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): FunctionDeclarationSyntax; - public withModifiers(modifiers: ISyntaxList): FunctionDeclarationSyntax; - public withModifier(modifier: ISyntaxToken): FunctionDeclarationSyntax; - public withFunctionKeyword(functionKeyword: ISyntaxToken): FunctionDeclarationSyntax; - public withIdentifier(identifier: ISyntaxToken): FunctionDeclarationSyntax; - public withCallSignature(callSignature: CallSignatureSyntax): FunctionDeclarationSyntax; - public withBlock(block: BlockSyntax): FunctionDeclarationSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): FunctionDeclarationSyntax; - public isTypeScriptSpecific(): boolean; - } - class VariableStatementSyntax extends SyntaxNode implements IStatementSyntax { - public modifiers: ISyntaxList; - public variableDeclaration: VariableDeclarationSyntax; - public semicolonToken: ISyntaxToken; - constructor(modifiers: ISyntaxList, variableDeclaration: VariableDeclarationSyntax, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(modifiers: ISyntaxList, variableDeclaration: VariableDeclarationSyntax, semicolonToken: ISyntaxToken): VariableStatementSyntax; - static create(variableDeclaration: VariableDeclarationSyntax, semicolonToken: ISyntaxToken): VariableStatementSyntax; - static create1(variableDeclaration: VariableDeclarationSyntax): VariableStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): VariableStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): VariableStatementSyntax; - public withModifiers(modifiers: ISyntaxList): VariableStatementSyntax; - public withModifier(modifier: ISyntaxToken): VariableStatementSyntax; - public withVariableDeclaration(variableDeclaration: VariableDeclarationSyntax): VariableStatementSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): VariableStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class VariableDeclarationSyntax extends SyntaxNode { - public varKeyword: ISyntaxToken; - public variableDeclarators: ISeparatedSyntaxList; - constructor(varKeyword: ISyntaxToken, variableDeclarators: ISeparatedSyntaxList, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(varKeyword: ISyntaxToken, variableDeclarators: ISeparatedSyntaxList): VariableDeclarationSyntax; - static create1(variableDeclarators: ISeparatedSyntaxList): VariableDeclarationSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): VariableDeclarationSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): VariableDeclarationSyntax; - public withVarKeyword(varKeyword: ISyntaxToken): VariableDeclarationSyntax; - public withVariableDeclarators(variableDeclarators: ISeparatedSyntaxList): VariableDeclarationSyntax; - public withVariableDeclarator(variableDeclarator: VariableDeclaratorSyntax): VariableDeclarationSyntax; - public isTypeScriptSpecific(): boolean; - } - class VariableDeclaratorSyntax extends SyntaxNode { - public propertyName: ISyntaxToken; - public typeAnnotation: TypeAnnotationSyntax; - public equalsValueClause: EqualsValueClauseSyntax; - constructor(propertyName: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(propertyName: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax): VariableDeclaratorSyntax; - static create(propertyName: ISyntaxToken): VariableDeclaratorSyntax; - static create1(propertyName: ISyntaxToken): VariableDeclaratorSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): VariableDeclaratorSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): VariableDeclaratorSyntax; - public withPropertyName(propertyName: ISyntaxToken): VariableDeclaratorSyntax; - public withTypeAnnotation(typeAnnotation: TypeAnnotationSyntax): VariableDeclaratorSyntax; - public withEqualsValueClause(equalsValueClause: EqualsValueClauseSyntax): VariableDeclaratorSyntax; - public isTypeScriptSpecific(): boolean; - } - class EqualsValueClauseSyntax extends SyntaxNode { - public equalsToken: ISyntaxToken; - public value: IExpressionSyntax; - constructor(equalsToken: ISyntaxToken, value: IExpressionSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(equalsToken: ISyntaxToken, value: IExpressionSyntax): EqualsValueClauseSyntax; - static create1(value: IExpressionSyntax): EqualsValueClauseSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): EqualsValueClauseSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): EqualsValueClauseSyntax; - public withEqualsToken(equalsToken: ISyntaxToken): EqualsValueClauseSyntax; - public withValue(value: IExpressionSyntax): EqualsValueClauseSyntax; - public isTypeScriptSpecific(): boolean; - } - class PrefixUnaryExpressionSyntax extends SyntaxNode implements IUnaryExpressionSyntax { - public operatorToken: ISyntaxToken; - public operand: IUnaryExpressionSyntax; - private _kind; - constructor(kind: SyntaxKind, operatorToken: ISyntaxToken, operand: IUnaryExpressionSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public kind(): SyntaxKind; - public update(kind: SyntaxKind, operatorToken: ISyntaxToken, operand: IUnaryExpressionSyntax): PrefixUnaryExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): PrefixUnaryExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): PrefixUnaryExpressionSyntax; - public withKind(kind: SyntaxKind): PrefixUnaryExpressionSyntax; - public withOperatorToken(operatorToken: ISyntaxToken): PrefixUnaryExpressionSyntax; - public withOperand(operand: IUnaryExpressionSyntax): PrefixUnaryExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class ArrayLiteralExpressionSyntax extends SyntaxNode implements IPrimaryExpressionSyntax { - public openBracketToken: ISyntaxToken; - public expressions: ISeparatedSyntaxList; - public closeBracketToken: ISyntaxToken; - constructor(openBracketToken: ISyntaxToken, expressions: ISeparatedSyntaxList, closeBracketToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isPrimaryExpression(): boolean; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public update(openBracketToken: ISyntaxToken, expressions: ISeparatedSyntaxList, closeBracketToken: ISyntaxToken): ArrayLiteralExpressionSyntax; - static create(openBracketToken: ISyntaxToken, closeBracketToken: ISyntaxToken): ArrayLiteralExpressionSyntax; - static create1(): ArrayLiteralExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ArrayLiteralExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ArrayLiteralExpressionSyntax; - public withOpenBracketToken(openBracketToken: ISyntaxToken): ArrayLiteralExpressionSyntax; - public withExpressions(expressions: ISeparatedSyntaxList): ArrayLiteralExpressionSyntax; - public withExpression(expression: IExpressionSyntax): ArrayLiteralExpressionSyntax; - public withCloseBracketToken(closeBracketToken: ISyntaxToken): ArrayLiteralExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class OmittedExpressionSyntax extends SyntaxNode implements IExpressionSyntax { - constructor(parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isExpression(): boolean; - public update(): OmittedExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): OmittedExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): OmittedExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class ParenthesizedExpressionSyntax extends SyntaxNode implements IPrimaryExpressionSyntax { - public openParenToken: ISyntaxToken; - public expression: IExpressionSyntax; - public closeParenToken: ISyntaxToken; - constructor(openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isPrimaryExpression(): boolean; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public update(openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken): ParenthesizedExpressionSyntax; - static create1(expression: IExpressionSyntax): ParenthesizedExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ParenthesizedExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ParenthesizedExpressionSyntax; - public withOpenParenToken(openParenToken: ISyntaxToken): ParenthesizedExpressionSyntax; - public withExpression(expression: IExpressionSyntax): ParenthesizedExpressionSyntax; - public withCloseParenToken(closeParenToken: ISyntaxToken): ParenthesizedExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class SimpleArrowFunctionExpressionSyntax extends SyntaxNode implements IArrowFunctionExpressionSyntax { - public identifier: ISyntaxToken; - public equalsGreaterThanToken: ISyntaxToken; - public block: BlockSyntax; - public expression: IExpressionSyntax; - constructor(identifier: ISyntaxToken, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isArrowFunctionExpression(): boolean; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public update(identifier: ISyntaxToken, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax): SimpleArrowFunctionExpressionSyntax; - static create(identifier: ISyntaxToken, equalsGreaterThanToken: ISyntaxToken): SimpleArrowFunctionExpressionSyntax; - static create1(identifier: ISyntaxToken): SimpleArrowFunctionExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): SimpleArrowFunctionExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): SimpleArrowFunctionExpressionSyntax; - public withIdentifier(identifier: ISyntaxToken): SimpleArrowFunctionExpressionSyntax; - public withEqualsGreaterThanToken(equalsGreaterThanToken: ISyntaxToken): SimpleArrowFunctionExpressionSyntax; - public withBlock(block: BlockSyntax): SimpleArrowFunctionExpressionSyntax; - public withExpression(expression: IExpressionSyntax): SimpleArrowFunctionExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class ParenthesizedArrowFunctionExpressionSyntax extends SyntaxNode implements IArrowFunctionExpressionSyntax { - public callSignature: CallSignatureSyntax; - public equalsGreaterThanToken: ISyntaxToken; - public block: BlockSyntax; - public expression: IExpressionSyntax; - constructor(callSignature: CallSignatureSyntax, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isArrowFunctionExpression(): boolean; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public update(callSignature: CallSignatureSyntax, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax): ParenthesizedArrowFunctionExpressionSyntax; - static create(callSignature: CallSignatureSyntax, equalsGreaterThanToken: ISyntaxToken): ParenthesizedArrowFunctionExpressionSyntax; - static create1(): ParenthesizedArrowFunctionExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ParenthesizedArrowFunctionExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ParenthesizedArrowFunctionExpressionSyntax; - public withCallSignature(callSignature: CallSignatureSyntax): ParenthesizedArrowFunctionExpressionSyntax; - public withEqualsGreaterThanToken(equalsGreaterThanToken: ISyntaxToken): ParenthesizedArrowFunctionExpressionSyntax; - public withBlock(block: BlockSyntax): ParenthesizedArrowFunctionExpressionSyntax; - public withExpression(expression: IExpressionSyntax): ParenthesizedArrowFunctionExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class QualifiedNameSyntax extends SyntaxNode implements INameSyntax { - public left: INameSyntax; - public dotToken: ISyntaxToken; - public right: ISyntaxToken; - constructor(left: INameSyntax, dotToken: ISyntaxToken, right: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isName(): boolean; - public isType(): boolean; - public update(left: INameSyntax, dotToken: ISyntaxToken, right: ISyntaxToken): QualifiedNameSyntax; - static create1(left: INameSyntax, right: ISyntaxToken): QualifiedNameSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): QualifiedNameSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): QualifiedNameSyntax; - public withLeft(left: INameSyntax): QualifiedNameSyntax; - public withDotToken(dotToken: ISyntaxToken): QualifiedNameSyntax; - public withRight(right: ISyntaxToken): QualifiedNameSyntax; - public isTypeScriptSpecific(): boolean; - } - class TypeArgumentListSyntax extends SyntaxNode { - public lessThanToken: ISyntaxToken; - public typeArguments: ISeparatedSyntaxList; - public greaterThanToken: ISyntaxToken; - constructor(lessThanToken: ISyntaxToken, typeArguments: ISeparatedSyntaxList, greaterThanToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(lessThanToken: ISyntaxToken, typeArguments: ISeparatedSyntaxList, greaterThanToken: ISyntaxToken): TypeArgumentListSyntax; - static create(lessThanToken: ISyntaxToken, greaterThanToken: ISyntaxToken): TypeArgumentListSyntax; - static create1(): TypeArgumentListSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): TypeArgumentListSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): TypeArgumentListSyntax; - public withLessThanToken(lessThanToken: ISyntaxToken): TypeArgumentListSyntax; - public withTypeArguments(typeArguments: ISeparatedSyntaxList): TypeArgumentListSyntax; - public withTypeArgument(typeArgument: ITypeSyntax): TypeArgumentListSyntax; - public withGreaterThanToken(greaterThanToken: ISyntaxToken): TypeArgumentListSyntax; - public isTypeScriptSpecific(): boolean; - } - class ConstructorTypeSyntax extends SyntaxNode implements ITypeSyntax { - public newKeyword: ISyntaxToken; - public typeParameterList: TypeParameterListSyntax; - public parameterList: ParameterListSyntax; - public equalsGreaterThanToken: ISyntaxToken; - public type: ITypeSyntax; - constructor(newKeyword: ISyntaxToken, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isType(): boolean; - public update(newKeyword: ISyntaxToken, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax): ConstructorTypeSyntax; - static create(newKeyword: ISyntaxToken, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax): ConstructorTypeSyntax; - static create1(type: ITypeSyntax): ConstructorTypeSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ConstructorTypeSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ConstructorTypeSyntax; - public withNewKeyword(newKeyword: ISyntaxToken): ConstructorTypeSyntax; - public withTypeParameterList(typeParameterList: TypeParameterListSyntax): ConstructorTypeSyntax; - public withParameterList(parameterList: ParameterListSyntax): ConstructorTypeSyntax; - public withEqualsGreaterThanToken(equalsGreaterThanToken: ISyntaxToken): ConstructorTypeSyntax; - public withType(type: ITypeSyntax): ConstructorTypeSyntax; - public isTypeScriptSpecific(): boolean; - } - class FunctionTypeSyntax extends SyntaxNode implements ITypeSyntax { - public typeParameterList: TypeParameterListSyntax; - public parameterList: ParameterListSyntax; - public equalsGreaterThanToken: ISyntaxToken; - public type: ITypeSyntax; - constructor(typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isType(): boolean; - public update(typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax): FunctionTypeSyntax; - static create(parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax): FunctionTypeSyntax; - static create1(type: ITypeSyntax): FunctionTypeSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): FunctionTypeSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): FunctionTypeSyntax; - public withTypeParameterList(typeParameterList: TypeParameterListSyntax): FunctionTypeSyntax; - public withParameterList(parameterList: ParameterListSyntax): FunctionTypeSyntax; - public withEqualsGreaterThanToken(equalsGreaterThanToken: ISyntaxToken): FunctionTypeSyntax; - public withType(type: ITypeSyntax): FunctionTypeSyntax; - public isTypeScriptSpecific(): boolean; - } - class ObjectTypeSyntax extends SyntaxNode implements ITypeSyntax { - public openBraceToken: ISyntaxToken; - public typeMembers: ISeparatedSyntaxList; - public closeBraceToken: ISyntaxToken; - constructor(openBraceToken: ISyntaxToken, typeMembers: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isType(): boolean; - public update(openBraceToken: ISyntaxToken, typeMembers: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken): ObjectTypeSyntax; - static create(openBraceToken: ISyntaxToken, closeBraceToken: ISyntaxToken): ObjectTypeSyntax; - static create1(): ObjectTypeSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ObjectTypeSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ObjectTypeSyntax; - public withOpenBraceToken(openBraceToken: ISyntaxToken): ObjectTypeSyntax; - public withTypeMembers(typeMembers: ISeparatedSyntaxList): ObjectTypeSyntax; - public withTypeMember(typeMember: ITypeMemberSyntax): ObjectTypeSyntax; - public withCloseBraceToken(closeBraceToken: ISyntaxToken): ObjectTypeSyntax; - public isTypeScriptSpecific(): boolean; - } - class ArrayTypeSyntax extends SyntaxNode implements ITypeSyntax { - public type: ITypeSyntax; - public openBracketToken: ISyntaxToken; - public closeBracketToken: ISyntaxToken; - constructor(type: ITypeSyntax, openBracketToken: ISyntaxToken, closeBracketToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isType(): boolean; - public update(type: ITypeSyntax, openBracketToken: ISyntaxToken, closeBracketToken: ISyntaxToken): ArrayTypeSyntax; - static create1(type: ITypeSyntax): ArrayTypeSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ArrayTypeSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ArrayTypeSyntax; - public withType(type: ITypeSyntax): ArrayTypeSyntax; - public withOpenBracketToken(openBracketToken: ISyntaxToken): ArrayTypeSyntax; - public withCloseBracketToken(closeBracketToken: ISyntaxToken): ArrayTypeSyntax; - public isTypeScriptSpecific(): boolean; - } - class GenericTypeSyntax extends SyntaxNode implements ITypeSyntax { - public name: INameSyntax; - public typeArgumentList: TypeArgumentListSyntax; - constructor(name: INameSyntax, typeArgumentList: TypeArgumentListSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isType(): boolean; - public update(name: INameSyntax, typeArgumentList: TypeArgumentListSyntax): GenericTypeSyntax; - static create1(name: INameSyntax): GenericTypeSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): GenericTypeSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): GenericTypeSyntax; - public withName(name: INameSyntax): GenericTypeSyntax; - public withTypeArgumentList(typeArgumentList: TypeArgumentListSyntax): GenericTypeSyntax; - public isTypeScriptSpecific(): boolean; - } - class TypeQuerySyntax extends SyntaxNode implements ITypeSyntax { - public typeOfKeyword: ISyntaxToken; - public name: INameSyntax; - constructor(typeOfKeyword: ISyntaxToken, name: INameSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isType(): boolean; - public update(typeOfKeyword: ISyntaxToken, name: INameSyntax): TypeQuerySyntax; - static create1(name: INameSyntax): TypeQuerySyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): TypeQuerySyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): TypeQuerySyntax; - public withTypeOfKeyword(typeOfKeyword: ISyntaxToken): TypeQuerySyntax; - public withName(name: INameSyntax): TypeQuerySyntax; - public isTypeScriptSpecific(): boolean; - } - class TypeAnnotationSyntax extends SyntaxNode { - public colonToken: ISyntaxToken; - public type: ITypeSyntax; - constructor(colonToken: ISyntaxToken, type: ITypeSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(colonToken: ISyntaxToken, type: ITypeSyntax): TypeAnnotationSyntax; - static create1(type: ITypeSyntax): TypeAnnotationSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): TypeAnnotationSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): TypeAnnotationSyntax; - public withColonToken(colonToken: ISyntaxToken): TypeAnnotationSyntax; - public withType(type: ITypeSyntax): TypeAnnotationSyntax; - public isTypeScriptSpecific(): boolean; - } - class BlockSyntax extends SyntaxNode implements IStatementSyntax { - public openBraceToken: ISyntaxToken; - public statements: ISyntaxList; - public closeBraceToken: ISyntaxToken; - constructor(openBraceToken: ISyntaxToken, statements: ISyntaxList, closeBraceToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(openBraceToken: ISyntaxToken, statements: ISyntaxList, closeBraceToken: ISyntaxToken): BlockSyntax; - static create(openBraceToken: ISyntaxToken, closeBraceToken: ISyntaxToken): BlockSyntax; - static create1(): BlockSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): BlockSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): BlockSyntax; - public withOpenBraceToken(openBraceToken: ISyntaxToken): BlockSyntax; - public withStatements(statements: ISyntaxList): BlockSyntax; - public withStatement(statement: IStatementSyntax): BlockSyntax; - public withCloseBraceToken(closeBraceToken: ISyntaxToken): BlockSyntax; - public isTypeScriptSpecific(): boolean; - } - class ParameterSyntax extends SyntaxNode { - public dotDotDotToken: ISyntaxToken; - public modifiers: ISyntaxList; - public identifier: ISyntaxToken; - public questionToken: ISyntaxToken; - public typeAnnotation: TypeAnnotationSyntax; - public equalsValueClause: EqualsValueClauseSyntax; - constructor(dotDotDotToken: ISyntaxToken, modifiers: ISyntaxList, identifier: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(dotDotDotToken: ISyntaxToken, modifiers: ISyntaxList, identifier: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax): ParameterSyntax; - static create(identifier: ISyntaxToken): ParameterSyntax; - static create1(identifier: ISyntaxToken): ParameterSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ParameterSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ParameterSyntax; - public withDotDotDotToken(dotDotDotToken: ISyntaxToken): ParameterSyntax; - public withModifiers(modifiers: ISyntaxList): ParameterSyntax; - public withModifier(modifier: ISyntaxToken): ParameterSyntax; - public withIdentifier(identifier: ISyntaxToken): ParameterSyntax; - public withQuestionToken(questionToken: ISyntaxToken): ParameterSyntax; - public withTypeAnnotation(typeAnnotation: TypeAnnotationSyntax): ParameterSyntax; - public withEqualsValueClause(equalsValueClause: EqualsValueClauseSyntax): ParameterSyntax; - public isTypeScriptSpecific(): boolean; - } - class MemberAccessExpressionSyntax extends SyntaxNode implements IMemberExpressionSyntax { - public expression: IExpressionSyntax; - public dotToken: ISyntaxToken; - public name: ISyntaxToken; - constructor(expression: IExpressionSyntax, dotToken: ISyntaxToken, name: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public update(expression: IExpressionSyntax, dotToken: ISyntaxToken, name: ISyntaxToken): MemberAccessExpressionSyntax; - static create1(expression: IExpressionSyntax, name: ISyntaxToken): MemberAccessExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): MemberAccessExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): MemberAccessExpressionSyntax; - public withExpression(expression: IExpressionSyntax): MemberAccessExpressionSyntax; - public withDotToken(dotToken: ISyntaxToken): MemberAccessExpressionSyntax; - public withName(name: ISyntaxToken): MemberAccessExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class PostfixUnaryExpressionSyntax extends SyntaxNode implements IPostfixExpressionSyntax { - public operand: IMemberExpressionSyntax; - public operatorToken: ISyntaxToken; - private _kind; - constructor(kind: SyntaxKind, operand: IMemberExpressionSyntax, operatorToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public kind(): SyntaxKind; - public update(kind: SyntaxKind, operand: IMemberExpressionSyntax, operatorToken: ISyntaxToken): PostfixUnaryExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): PostfixUnaryExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): PostfixUnaryExpressionSyntax; - public withKind(kind: SyntaxKind): PostfixUnaryExpressionSyntax; - public withOperand(operand: IMemberExpressionSyntax): PostfixUnaryExpressionSyntax; - public withOperatorToken(operatorToken: ISyntaxToken): PostfixUnaryExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class ElementAccessExpressionSyntax extends SyntaxNode implements IMemberExpressionSyntax { - public expression: IExpressionSyntax; - public openBracketToken: ISyntaxToken; - public argumentExpression: IExpressionSyntax; - public closeBracketToken: ISyntaxToken; - constructor(expression: IExpressionSyntax, openBracketToken: ISyntaxToken, argumentExpression: IExpressionSyntax, closeBracketToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public update(expression: IExpressionSyntax, openBracketToken: ISyntaxToken, argumentExpression: IExpressionSyntax, closeBracketToken: ISyntaxToken): ElementAccessExpressionSyntax; - static create1(expression: IExpressionSyntax, argumentExpression: IExpressionSyntax): ElementAccessExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ElementAccessExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ElementAccessExpressionSyntax; - public withExpression(expression: IExpressionSyntax): ElementAccessExpressionSyntax; - public withOpenBracketToken(openBracketToken: ISyntaxToken): ElementAccessExpressionSyntax; - public withArgumentExpression(argumentExpression: IExpressionSyntax): ElementAccessExpressionSyntax; - public withCloseBracketToken(closeBracketToken: ISyntaxToken): ElementAccessExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class InvocationExpressionSyntax extends SyntaxNode implements IMemberExpressionSyntax { - public expression: IMemberExpressionSyntax; - public argumentList: ArgumentListSyntax; - constructor(expression: IMemberExpressionSyntax, argumentList: ArgumentListSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public update(expression: IMemberExpressionSyntax, argumentList: ArgumentListSyntax): InvocationExpressionSyntax; - static create1(expression: IMemberExpressionSyntax): InvocationExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): InvocationExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): InvocationExpressionSyntax; - public withExpression(expression: IMemberExpressionSyntax): InvocationExpressionSyntax; - public withArgumentList(argumentList: ArgumentListSyntax): InvocationExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class ArgumentListSyntax extends SyntaxNode { - public typeArgumentList: TypeArgumentListSyntax; - public openParenToken: ISyntaxToken; - public closeParenToken: ISyntaxToken; - public arguments: ISeparatedSyntaxList; - constructor(typeArgumentList: TypeArgumentListSyntax, openParenToken: ISyntaxToken, _arguments: ISeparatedSyntaxList, closeParenToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(typeArgumentList: TypeArgumentListSyntax, openParenToken: ISyntaxToken, _arguments: ISeparatedSyntaxList, closeParenToken: ISyntaxToken): ArgumentListSyntax; - static create(openParenToken: ISyntaxToken, closeParenToken: ISyntaxToken): ArgumentListSyntax; - static create1(): ArgumentListSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ArgumentListSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ArgumentListSyntax; - public withTypeArgumentList(typeArgumentList: TypeArgumentListSyntax): ArgumentListSyntax; - public withOpenParenToken(openParenToken: ISyntaxToken): ArgumentListSyntax; - public withArguments(_arguments: ISeparatedSyntaxList): ArgumentListSyntax; - public withArgument(_argument: IExpressionSyntax): ArgumentListSyntax; - public withCloseParenToken(closeParenToken: ISyntaxToken): ArgumentListSyntax; - public isTypeScriptSpecific(): boolean; - } - class BinaryExpressionSyntax extends SyntaxNode implements IExpressionSyntax { - public left: IExpressionSyntax; - public operatorToken: ISyntaxToken; - public right: IExpressionSyntax; - private _kind; - constructor(kind: SyntaxKind, left: IExpressionSyntax, operatorToken: ISyntaxToken, right: IExpressionSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isExpression(): boolean; - public kind(): SyntaxKind; - public update(kind: SyntaxKind, left: IExpressionSyntax, operatorToken: ISyntaxToken, right: IExpressionSyntax): BinaryExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): BinaryExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): BinaryExpressionSyntax; - public withKind(kind: SyntaxKind): BinaryExpressionSyntax; - public withLeft(left: IExpressionSyntax): BinaryExpressionSyntax; - public withOperatorToken(operatorToken: ISyntaxToken): BinaryExpressionSyntax; - public withRight(right: IExpressionSyntax): BinaryExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class ConditionalExpressionSyntax extends SyntaxNode implements IExpressionSyntax { - public condition: IExpressionSyntax; - public questionToken: ISyntaxToken; - public whenTrue: IExpressionSyntax; - public colonToken: ISyntaxToken; - public whenFalse: IExpressionSyntax; - constructor(condition: IExpressionSyntax, questionToken: ISyntaxToken, whenTrue: IExpressionSyntax, colonToken: ISyntaxToken, whenFalse: IExpressionSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isExpression(): boolean; - public update(condition: IExpressionSyntax, questionToken: ISyntaxToken, whenTrue: IExpressionSyntax, colonToken: ISyntaxToken, whenFalse: IExpressionSyntax): ConditionalExpressionSyntax; - static create1(condition: IExpressionSyntax, whenTrue: IExpressionSyntax, whenFalse: IExpressionSyntax): ConditionalExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ConditionalExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ConditionalExpressionSyntax; - public withCondition(condition: IExpressionSyntax): ConditionalExpressionSyntax; - public withQuestionToken(questionToken: ISyntaxToken): ConditionalExpressionSyntax; - public withWhenTrue(whenTrue: IExpressionSyntax): ConditionalExpressionSyntax; - public withColonToken(colonToken: ISyntaxToken): ConditionalExpressionSyntax; - public withWhenFalse(whenFalse: IExpressionSyntax): ConditionalExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class ConstructSignatureSyntax extends SyntaxNode implements ITypeMemberSyntax { - public newKeyword: ISyntaxToken; - public callSignature: CallSignatureSyntax; - constructor(newKeyword: ISyntaxToken, callSignature: CallSignatureSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isTypeMember(): boolean; - public update(newKeyword: ISyntaxToken, callSignature: CallSignatureSyntax): ConstructSignatureSyntax; - static create1(): ConstructSignatureSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ConstructSignatureSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ConstructSignatureSyntax; - public withNewKeyword(newKeyword: ISyntaxToken): ConstructSignatureSyntax; - public withCallSignature(callSignature: CallSignatureSyntax): ConstructSignatureSyntax; - public isTypeScriptSpecific(): boolean; - } - class MethodSignatureSyntax extends SyntaxNode implements ITypeMemberSyntax { - public propertyName: ISyntaxToken; - public questionToken: ISyntaxToken; - public callSignature: CallSignatureSyntax; - constructor(propertyName: ISyntaxToken, questionToken: ISyntaxToken, callSignature: CallSignatureSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isTypeMember(): boolean; - public update(propertyName: ISyntaxToken, questionToken: ISyntaxToken, callSignature: CallSignatureSyntax): MethodSignatureSyntax; - static create(propertyName: ISyntaxToken, callSignature: CallSignatureSyntax): MethodSignatureSyntax; - static create1(propertyName: ISyntaxToken): MethodSignatureSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): MethodSignatureSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): MethodSignatureSyntax; - public withPropertyName(propertyName: ISyntaxToken): MethodSignatureSyntax; - public withQuestionToken(questionToken: ISyntaxToken): MethodSignatureSyntax; - public withCallSignature(callSignature: CallSignatureSyntax): MethodSignatureSyntax; - public isTypeScriptSpecific(): boolean; - } - class IndexSignatureSyntax extends SyntaxNode implements ITypeMemberSyntax { - public openBracketToken: ISyntaxToken; - public parameter: ParameterSyntax; - public closeBracketToken: ISyntaxToken; - public typeAnnotation: TypeAnnotationSyntax; - constructor(openBracketToken: ISyntaxToken, parameter: ParameterSyntax, closeBracketToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isTypeMember(): boolean; - public update(openBracketToken: ISyntaxToken, parameter: ParameterSyntax, closeBracketToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax): IndexSignatureSyntax; - static create(openBracketToken: ISyntaxToken, parameter: ParameterSyntax, closeBracketToken: ISyntaxToken): IndexSignatureSyntax; - static create1(parameter: ParameterSyntax): IndexSignatureSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): IndexSignatureSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): IndexSignatureSyntax; - public withOpenBracketToken(openBracketToken: ISyntaxToken): IndexSignatureSyntax; - public withParameter(parameter: ParameterSyntax): IndexSignatureSyntax; - public withCloseBracketToken(closeBracketToken: ISyntaxToken): IndexSignatureSyntax; - public withTypeAnnotation(typeAnnotation: TypeAnnotationSyntax): IndexSignatureSyntax; - public isTypeScriptSpecific(): boolean; - } - class PropertySignatureSyntax extends SyntaxNode implements ITypeMemberSyntax { - public propertyName: ISyntaxToken; - public questionToken: ISyntaxToken; - public typeAnnotation: TypeAnnotationSyntax; - constructor(propertyName: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isTypeMember(): boolean; - public update(propertyName: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax): PropertySignatureSyntax; - static create(propertyName: ISyntaxToken): PropertySignatureSyntax; - static create1(propertyName: ISyntaxToken): PropertySignatureSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): PropertySignatureSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): PropertySignatureSyntax; - public withPropertyName(propertyName: ISyntaxToken): PropertySignatureSyntax; - public withQuestionToken(questionToken: ISyntaxToken): PropertySignatureSyntax; - public withTypeAnnotation(typeAnnotation: TypeAnnotationSyntax): PropertySignatureSyntax; - public isTypeScriptSpecific(): boolean; - } - class CallSignatureSyntax extends SyntaxNode implements ITypeMemberSyntax { - public typeParameterList: TypeParameterListSyntax; - public parameterList: ParameterListSyntax; - public typeAnnotation: TypeAnnotationSyntax; - constructor(typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, typeAnnotation: TypeAnnotationSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isTypeMember(): boolean; - public update(typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, typeAnnotation: TypeAnnotationSyntax): CallSignatureSyntax; - static create(parameterList: ParameterListSyntax): CallSignatureSyntax; - static create1(): CallSignatureSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): CallSignatureSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): CallSignatureSyntax; - public withTypeParameterList(typeParameterList: TypeParameterListSyntax): CallSignatureSyntax; - public withParameterList(parameterList: ParameterListSyntax): CallSignatureSyntax; - public withTypeAnnotation(typeAnnotation: TypeAnnotationSyntax): CallSignatureSyntax; - public isTypeScriptSpecific(): boolean; - } - class ParameterListSyntax extends SyntaxNode { - public openParenToken: ISyntaxToken; - public parameters: ISeparatedSyntaxList; - public closeParenToken: ISyntaxToken; - constructor(openParenToken: ISyntaxToken, parameters: ISeparatedSyntaxList, closeParenToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(openParenToken: ISyntaxToken, parameters: ISeparatedSyntaxList, closeParenToken: ISyntaxToken): ParameterListSyntax; - static create(openParenToken: ISyntaxToken, closeParenToken: ISyntaxToken): ParameterListSyntax; - static create1(): ParameterListSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ParameterListSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ParameterListSyntax; - public withOpenParenToken(openParenToken: ISyntaxToken): ParameterListSyntax; - public withParameters(parameters: ISeparatedSyntaxList): ParameterListSyntax; - public withParameter(parameter: ParameterSyntax): ParameterListSyntax; - public withCloseParenToken(closeParenToken: ISyntaxToken): ParameterListSyntax; - public isTypeScriptSpecific(): boolean; - } - class TypeParameterListSyntax extends SyntaxNode { - public lessThanToken: ISyntaxToken; - public typeParameters: ISeparatedSyntaxList; - public greaterThanToken: ISyntaxToken; - constructor(lessThanToken: ISyntaxToken, typeParameters: ISeparatedSyntaxList, greaterThanToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(lessThanToken: ISyntaxToken, typeParameters: ISeparatedSyntaxList, greaterThanToken: ISyntaxToken): TypeParameterListSyntax; - static create(lessThanToken: ISyntaxToken, greaterThanToken: ISyntaxToken): TypeParameterListSyntax; - static create1(): TypeParameterListSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): TypeParameterListSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): TypeParameterListSyntax; - public withLessThanToken(lessThanToken: ISyntaxToken): TypeParameterListSyntax; - public withTypeParameters(typeParameters: ISeparatedSyntaxList): TypeParameterListSyntax; - public withTypeParameter(typeParameter: TypeParameterSyntax): TypeParameterListSyntax; - public withGreaterThanToken(greaterThanToken: ISyntaxToken): TypeParameterListSyntax; - public isTypeScriptSpecific(): boolean; - } - class TypeParameterSyntax extends SyntaxNode { - public identifier: ISyntaxToken; - public constraint: ConstraintSyntax; - constructor(identifier: ISyntaxToken, constraint: ConstraintSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(identifier: ISyntaxToken, constraint: ConstraintSyntax): TypeParameterSyntax; - static create(identifier: ISyntaxToken): TypeParameterSyntax; - static create1(identifier: ISyntaxToken): TypeParameterSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): TypeParameterSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): TypeParameterSyntax; - public withIdentifier(identifier: ISyntaxToken): TypeParameterSyntax; - public withConstraint(constraint: ConstraintSyntax): TypeParameterSyntax; - public isTypeScriptSpecific(): boolean; - } - class ConstraintSyntax extends SyntaxNode { - public extendsKeyword: ISyntaxToken; - public type: ITypeSyntax; - constructor(extendsKeyword: ISyntaxToken, type: ITypeSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(extendsKeyword: ISyntaxToken, type: ITypeSyntax): ConstraintSyntax; - static create1(type: ITypeSyntax): ConstraintSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ConstraintSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ConstraintSyntax; - public withExtendsKeyword(extendsKeyword: ISyntaxToken): ConstraintSyntax; - public withType(type: ITypeSyntax): ConstraintSyntax; - public isTypeScriptSpecific(): boolean; - } - class ElseClauseSyntax extends SyntaxNode { - public elseKeyword: ISyntaxToken; - public statement: IStatementSyntax; - constructor(elseKeyword: ISyntaxToken, statement: IStatementSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(elseKeyword: ISyntaxToken, statement: IStatementSyntax): ElseClauseSyntax; - static create1(statement: IStatementSyntax): ElseClauseSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ElseClauseSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ElseClauseSyntax; - public withElseKeyword(elseKeyword: ISyntaxToken): ElseClauseSyntax; - public withStatement(statement: IStatementSyntax): ElseClauseSyntax; - public isTypeScriptSpecific(): boolean; - } - class IfStatementSyntax extends SyntaxNode implements IStatementSyntax { - public ifKeyword: ISyntaxToken; - public openParenToken: ISyntaxToken; - public condition: IExpressionSyntax; - public closeParenToken: ISyntaxToken; - public statement: IStatementSyntax; - public elseClause: ElseClauseSyntax; - constructor(ifKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax, elseClause: ElseClauseSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(ifKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax, elseClause: ElseClauseSyntax): IfStatementSyntax; - static create(ifKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): IfStatementSyntax; - static create1(condition: IExpressionSyntax, statement: IStatementSyntax): IfStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): IfStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): IfStatementSyntax; - public withIfKeyword(ifKeyword: ISyntaxToken): IfStatementSyntax; - public withOpenParenToken(openParenToken: ISyntaxToken): IfStatementSyntax; - public withCondition(condition: IExpressionSyntax): IfStatementSyntax; - public withCloseParenToken(closeParenToken: ISyntaxToken): IfStatementSyntax; - public withStatement(statement: IStatementSyntax): IfStatementSyntax; - public withElseClause(elseClause: ElseClauseSyntax): IfStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class ExpressionStatementSyntax extends SyntaxNode implements IStatementSyntax { - public expression: IExpressionSyntax; - public semicolonToken: ISyntaxToken; - constructor(expression: IExpressionSyntax, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(expression: IExpressionSyntax, semicolonToken: ISyntaxToken): ExpressionStatementSyntax; - static create1(expression: IExpressionSyntax): ExpressionStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ExpressionStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ExpressionStatementSyntax; - public withExpression(expression: IExpressionSyntax): ExpressionStatementSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): ExpressionStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class ConstructorDeclarationSyntax extends SyntaxNode implements IClassElementSyntax { - public modifiers: ISyntaxList; - public constructorKeyword: ISyntaxToken; - public callSignature: CallSignatureSyntax; - public block: BlockSyntax; - public semicolonToken: ISyntaxToken; - constructor(modifiers: ISyntaxList, constructorKeyword: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isClassElement(): boolean; - public update(modifiers: ISyntaxList, constructorKeyword: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): ConstructorDeclarationSyntax; - static create(constructorKeyword: ISyntaxToken, callSignature: CallSignatureSyntax): ConstructorDeclarationSyntax; - static create1(): ConstructorDeclarationSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ConstructorDeclarationSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ConstructorDeclarationSyntax; - public withModifiers(modifiers: ISyntaxList): ConstructorDeclarationSyntax; - public withModifier(modifier: ISyntaxToken): ConstructorDeclarationSyntax; - public withConstructorKeyword(constructorKeyword: ISyntaxToken): ConstructorDeclarationSyntax; - public withCallSignature(callSignature: CallSignatureSyntax): ConstructorDeclarationSyntax; - public withBlock(block: BlockSyntax): ConstructorDeclarationSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): ConstructorDeclarationSyntax; - public isTypeScriptSpecific(): boolean; - } - class MemberFunctionDeclarationSyntax extends SyntaxNode implements IMemberDeclarationSyntax { - public modifiers: ISyntaxList; - public propertyName: ISyntaxToken; - public callSignature: CallSignatureSyntax; - public block: BlockSyntax; - public semicolonToken: ISyntaxToken; - constructor(modifiers: ISyntaxList, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isMemberDeclaration(): boolean; - public isClassElement(): boolean; - public update(modifiers: ISyntaxList, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): MemberFunctionDeclarationSyntax; - static create(propertyName: ISyntaxToken, callSignature: CallSignatureSyntax): MemberFunctionDeclarationSyntax; - static create1(propertyName: ISyntaxToken): MemberFunctionDeclarationSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): MemberFunctionDeclarationSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): MemberFunctionDeclarationSyntax; - public withModifiers(modifiers: ISyntaxList): MemberFunctionDeclarationSyntax; - public withModifier(modifier: ISyntaxToken): MemberFunctionDeclarationSyntax; - public withPropertyName(propertyName: ISyntaxToken): MemberFunctionDeclarationSyntax; - public withCallSignature(callSignature: CallSignatureSyntax): MemberFunctionDeclarationSyntax; - public withBlock(block: BlockSyntax): MemberFunctionDeclarationSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): MemberFunctionDeclarationSyntax; - public isTypeScriptSpecific(): boolean; - } - class GetAccessorSyntax extends SyntaxNode implements IMemberDeclarationSyntax, IPropertyAssignmentSyntax { - public modifiers: ISyntaxList; - public getKeyword: ISyntaxToken; - public propertyName: ISyntaxToken; - public parameterList: ParameterListSyntax; - public typeAnnotation: TypeAnnotationSyntax; - public block: BlockSyntax; - constructor(modifiers: ISyntaxList, getKeyword: ISyntaxToken, propertyName: ISyntaxToken, parameterList: ParameterListSyntax, typeAnnotation: TypeAnnotationSyntax, block: BlockSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isMemberDeclaration(): boolean; - public isPropertyAssignment(): boolean; - public isClassElement(): boolean; - public update(modifiers: ISyntaxList, getKeyword: ISyntaxToken, propertyName: ISyntaxToken, parameterList: ParameterListSyntax, typeAnnotation: TypeAnnotationSyntax, block: BlockSyntax): GetAccessorSyntax; - static create(getKeyword: ISyntaxToken, propertyName: ISyntaxToken, parameterList: ParameterListSyntax, block: BlockSyntax): GetAccessorSyntax; - static create1(propertyName: ISyntaxToken): GetAccessorSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): GetAccessorSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): GetAccessorSyntax; - public withModifiers(modifiers: ISyntaxList): GetAccessorSyntax; - public withModifier(modifier: ISyntaxToken): GetAccessorSyntax; - public withGetKeyword(getKeyword: ISyntaxToken): GetAccessorSyntax; - public withPropertyName(propertyName: ISyntaxToken): GetAccessorSyntax; - public withParameterList(parameterList: ParameterListSyntax): GetAccessorSyntax; - public withTypeAnnotation(typeAnnotation: TypeAnnotationSyntax): GetAccessorSyntax; - public withBlock(block: BlockSyntax): GetAccessorSyntax; - public isTypeScriptSpecific(): boolean; - } - class SetAccessorSyntax extends SyntaxNode implements IMemberDeclarationSyntax, IPropertyAssignmentSyntax { - public modifiers: ISyntaxList; - public setKeyword: ISyntaxToken; - public propertyName: ISyntaxToken; - public parameterList: ParameterListSyntax; - public block: BlockSyntax; - constructor(modifiers: ISyntaxList, setKeyword: ISyntaxToken, propertyName: ISyntaxToken, parameterList: ParameterListSyntax, block: BlockSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isMemberDeclaration(): boolean; - public isPropertyAssignment(): boolean; - public isClassElement(): boolean; - public update(modifiers: ISyntaxList, setKeyword: ISyntaxToken, propertyName: ISyntaxToken, parameterList: ParameterListSyntax, block: BlockSyntax): SetAccessorSyntax; - static create(setKeyword: ISyntaxToken, propertyName: ISyntaxToken, parameterList: ParameterListSyntax, block: BlockSyntax): SetAccessorSyntax; - static create1(propertyName: ISyntaxToken): SetAccessorSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): SetAccessorSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): SetAccessorSyntax; - public withModifiers(modifiers: ISyntaxList): SetAccessorSyntax; - public withModifier(modifier: ISyntaxToken): SetAccessorSyntax; - public withSetKeyword(setKeyword: ISyntaxToken): SetAccessorSyntax; - public withPropertyName(propertyName: ISyntaxToken): SetAccessorSyntax; - public withParameterList(parameterList: ParameterListSyntax): SetAccessorSyntax; - public withBlock(block: BlockSyntax): SetAccessorSyntax; - public isTypeScriptSpecific(): boolean; - } - class MemberVariableDeclarationSyntax extends SyntaxNode implements IMemberDeclarationSyntax { - public modifiers: ISyntaxList; - public variableDeclarator: VariableDeclaratorSyntax; - public semicolonToken: ISyntaxToken; - constructor(modifiers: ISyntaxList, variableDeclarator: VariableDeclaratorSyntax, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isMemberDeclaration(): boolean; - public isClassElement(): boolean; - public update(modifiers: ISyntaxList, variableDeclarator: VariableDeclaratorSyntax, semicolonToken: ISyntaxToken): MemberVariableDeclarationSyntax; - static create(variableDeclarator: VariableDeclaratorSyntax, semicolonToken: ISyntaxToken): MemberVariableDeclarationSyntax; - static create1(variableDeclarator: VariableDeclaratorSyntax): MemberVariableDeclarationSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): MemberVariableDeclarationSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): MemberVariableDeclarationSyntax; - public withModifiers(modifiers: ISyntaxList): MemberVariableDeclarationSyntax; - public withModifier(modifier: ISyntaxToken): MemberVariableDeclarationSyntax; - public withVariableDeclarator(variableDeclarator: VariableDeclaratorSyntax): MemberVariableDeclarationSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): MemberVariableDeclarationSyntax; - public isTypeScriptSpecific(): boolean; - } - class IndexMemberDeclarationSyntax extends SyntaxNode implements IClassElementSyntax { - public modifiers: ISyntaxList; - public indexSignature: IndexSignatureSyntax; - public semicolonToken: ISyntaxToken; - constructor(modifiers: ISyntaxList, indexSignature: IndexSignatureSyntax, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isClassElement(): boolean; - public update(modifiers: ISyntaxList, indexSignature: IndexSignatureSyntax, semicolonToken: ISyntaxToken): IndexMemberDeclarationSyntax; - static create(indexSignature: IndexSignatureSyntax, semicolonToken: ISyntaxToken): IndexMemberDeclarationSyntax; - static create1(indexSignature: IndexSignatureSyntax): IndexMemberDeclarationSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): IndexMemberDeclarationSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): IndexMemberDeclarationSyntax; - public withModifiers(modifiers: ISyntaxList): IndexMemberDeclarationSyntax; - public withModifier(modifier: ISyntaxToken): IndexMemberDeclarationSyntax; - public withIndexSignature(indexSignature: IndexSignatureSyntax): IndexMemberDeclarationSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): IndexMemberDeclarationSyntax; - public isTypeScriptSpecific(): boolean; - } - class ThrowStatementSyntax extends SyntaxNode implements IStatementSyntax { - public throwKeyword: ISyntaxToken; - public expression: IExpressionSyntax; - public semicolonToken: ISyntaxToken; - constructor(throwKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(throwKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken): ThrowStatementSyntax; - static create1(expression: IExpressionSyntax): ThrowStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ThrowStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ThrowStatementSyntax; - public withThrowKeyword(throwKeyword: ISyntaxToken): ThrowStatementSyntax; - public withExpression(expression: IExpressionSyntax): ThrowStatementSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): ThrowStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class ReturnStatementSyntax extends SyntaxNode implements IStatementSyntax { - public returnKeyword: ISyntaxToken; - public expression: IExpressionSyntax; - public semicolonToken: ISyntaxToken; - constructor(returnKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(returnKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken): ReturnStatementSyntax; - static create(returnKeyword: ISyntaxToken, semicolonToken: ISyntaxToken): ReturnStatementSyntax; - static create1(): ReturnStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ReturnStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ReturnStatementSyntax; - public withReturnKeyword(returnKeyword: ISyntaxToken): ReturnStatementSyntax; - public withExpression(expression: IExpressionSyntax): ReturnStatementSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): ReturnStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class ObjectCreationExpressionSyntax extends SyntaxNode implements IMemberExpressionSyntax { - public newKeyword: ISyntaxToken; - public expression: IMemberExpressionSyntax; - public argumentList: ArgumentListSyntax; - constructor(newKeyword: ISyntaxToken, expression: IMemberExpressionSyntax, argumentList: ArgumentListSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public update(newKeyword: ISyntaxToken, expression: IMemberExpressionSyntax, argumentList: ArgumentListSyntax): ObjectCreationExpressionSyntax; - static create(newKeyword: ISyntaxToken, expression: IMemberExpressionSyntax): ObjectCreationExpressionSyntax; - static create1(expression: IMemberExpressionSyntax): ObjectCreationExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ObjectCreationExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ObjectCreationExpressionSyntax; - public withNewKeyword(newKeyword: ISyntaxToken): ObjectCreationExpressionSyntax; - public withExpression(expression: IMemberExpressionSyntax): ObjectCreationExpressionSyntax; - public withArgumentList(argumentList: ArgumentListSyntax): ObjectCreationExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class SwitchStatementSyntax extends SyntaxNode implements IStatementSyntax { - public switchKeyword: ISyntaxToken; - public openParenToken: ISyntaxToken; - public expression: IExpressionSyntax; - public closeParenToken: ISyntaxToken; - public openBraceToken: ISyntaxToken; - public switchClauses: ISyntaxList; - public closeBraceToken: ISyntaxToken; - constructor(switchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, openBraceToken: ISyntaxToken, switchClauses: ISyntaxList, closeBraceToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(switchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, openBraceToken: ISyntaxToken, switchClauses: ISyntaxList, closeBraceToken: ISyntaxToken): SwitchStatementSyntax; - static create(switchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, openBraceToken: ISyntaxToken, closeBraceToken: ISyntaxToken): SwitchStatementSyntax; - static create1(expression: IExpressionSyntax): SwitchStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): SwitchStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): SwitchStatementSyntax; - public withSwitchKeyword(switchKeyword: ISyntaxToken): SwitchStatementSyntax; - public withOpenParenToken(openParenToken: ISyntaxToken): SwitchStatementSyntax; - public withExpression(expression: IExpressionSyntax): SwitchStatementSyntax; - public withCloseParenToken(closeParenToken: ISyntaxToken): SwitchStatementSyntax; - public withOpenBraceToken(openBraceToken: ISyntaxToken): SwitchStatementSyntax; - public withSwitchClauses(switchClauses: ISyntaxList): SwitchStatementSyntax; - public withSwitchClause(switchClause: ISwitchClauseSyntax): SwitchStatementSyntax; - public withCloseBraceToken(closeBraceToken: ISyntaxToken): SwitchStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class CaseSwitchClauseSyntax extends SyntaxNode implements ISwitchClauseSyntax { - public caseKeyword: ISyntaxToken; - public expression: IExpressionSyntax; - public colonToken: ISyntaxToken; - public statements: ISyntaxList; - constructor(caseKeyword: ISyntaxToken, expression: IExpressionSyntax, colonToken: ISyntaxToken, statements: ISyntaxList, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isSwitchClause(): boolean; - public update(caseKeyword: ISyntaxToken, expression: IExpressionSyntax, colonToken: ISyntaxToken, statements: ISyntaxList): CaseSwitchClauseSyntax; - static create(caseKeyword: ISyntaxToken, expression: IExpressionSyntax, colonToken: ISyntaxToken): CaseSwitchClauseSyntax; - static create1(expression: IExpressionSyntax): CaseSwitchClauseSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): CaseSwitchClauseSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): CaseSwitchClauseSyntax; - public withCaseKeyword(caseKeyword: ISyntaxToken): CaseSwitchClauseSyntax; - public withExpression(expression: IExpressionSyntax): CaseSwitchClauseSyntax; - public withColonToken(colonToken: ISyntaxToken): CaseSwitchClauseSyntax; - public withStatements(statements: ISyntaxList): CaseSwitchClauseSyntax; - public withStatement(statement: IStatementSyntax): CaseSwitchClauseSyntax; - public isTypeScriptSpecific(): boolean; - } - class DefaultSwitchClauseSyntax extends SyntaxNode implements ISwitchClauseSyntax { - public defaultKeyword: ISyntaxToken; - public colonToken: ISyntaxToken; - public statements: ISyntaxList; - constructor(defaultKeyword: ISyntaxToken, colonToken: ISyntaxToken, statements: ISyntaxList, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isSwitchClause(): boolean; - public update(defaultKeyword: ISyntaxToken, colonToken: ISyntaxToken, statements: ISyntaxList): DefaultSwitchClauseSyntax; - static create(defaultKeyword: ISyntaxToken, colonToken: ISyntaxToken): DefaultSwitchClauseSyntax; - static create1(): DefaultSwitchClauseSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): DefaultSwitchClauseSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): DefaultSwitchClauseSyntax; - public withDefaultKeyword(defaultKeyword: ISyntaxToken): DefaultSwitchClauseSyntax; - public withColonToken(colonToken: ISyntaxToken): DefaultSwitchClauseSyntax; - public withStatements(statements: ISyntaxList): DefaultSwitchClauseSyntax; - public withStatement(statement: IStatementSyntax): DefaultSwitchClauseSyntax; - public isTypeScriptSpecific(): boolean; - } - class BreakStatementSyntax extends SyntaxNode implements IStatementSyntax { - public breakKeyword: ISyntaxToken; - public identifier: ISyntaxToken; - public semicolonToken: ISyntaxToken; - constructor(breakKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(breakKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken): BreakStatementSyntax; - static create(breakKeyword: ISyntaxToken, semicolonToken: ISyntaxToken): BreakStatementSyntax; - static create1(): BreakStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): BreakStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): BreakStatementSyntax; - public withBreakKeyword(breakKeyword: ISyntaxToken): BreakStatementSyntax; - public withIdentifier(identifier: ISyntaxToken): BreakStatementSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): BreakStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class ContinueStatementSyntax extends SyntaxNode implements IStatementSyntax { - public continueKeyword: ISyntaxToken; - public identifier: ISyntaxToken; - public semicolonToken: ISyntaxToken; - constructor(continueKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(continueKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken): ContinueStatementSyntax; - static create(continueKeyword: ISyntaxToken, semicolonToken: ISyntaxToken): ContinueStatementSyntax; - static create1(): ContinueStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ContinueStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ContinueStatementSyntax; - public withContinueKeyword(continueKeyword: ISyntaxToken): ContinueStatementSyntax; - public withIdentifier(identifier: ISyntaxToken): ContinueStatementSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): ContinueStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class ForStatementSyntax extends SyntaxNode implements IIterationStatementSyntax { - public forKeyword: ISyntaxToken; - public openParenToken: ISyntaxToken; - public variableDeclaration: VariableDeclarationSyntax; - public initializer: IExpressionSyntax; - public firstSemicolonToken: ISyntaxToken; - public condition: IExpressionSyntax; - public secondSemicolonToken: ISyntaxToken; - public incrementor: IExpressionSyntax; - public closeParenToken: ISyntaxToken; - public statement: IStatementSyntax; - constructor(forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, initializer: IExpressionSyntax, firstSemicolonToken: ISyntaxToken, condition: IExpressionSyntax, secondSemicolonToken: ISyntaxToken, incrementor: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isIterationStatement(): boolean; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, initializer: IExpressionSyntax, firstSemicolonToken: ISyntaxToken, condition: IExpressionSyntax, secondSemicolonToken: ISyntaxToken, incrementor: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): ForStatementSyntax; - static create(forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, firstSemicolonToken: ISyntaxToken, secondSemicolonToken: ISyntaxToken, closeParenToken: ISyntaxToken, statement: IStatementSyntax): ForStatementSyntax; - static create1(statement: IStatementSyntax): ForStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ForStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ForStatementSyntax; - public withForKeyword(forKeyword: ISyntaxToken): ForStatementSyntax; - public withOpenParenToken(openParenToken: ISyntaxToken): ForStatementSyntax; - public withVariableDeclaration(variableDeclaration: VariableDeclarationSyntax): ForStatementSyntax; - public withInitializer(initializer: IExpressionSyntax): ForStatementSyntax; - public withFirstSemicolonToken(firstSemicolonToken: ISyntaxToken): ForStatementSyntax; - public withCondition(condition: IExpressionSyntax): ForStatementSyntax; - public withSecondSemicolonToken(secondSemicolonToken: ISyntaxToken): ForStatementSyntax; - public withIncrementor(incrementor: IExpressionSyntax): ForStatementSyntax; - public withCloseParenToken(closeParenToken: ISyntaxToken): ForStatementSyntax; - public withStatement(statement: IStatementSyntax): ForStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class ForInStatementSyntax extends SyntaxNode implements IIterationStatementSyntax { - public forKeyword: ISyntaxToken; - public openParenToken: ISyntaxToken; - public variableDeclaration: VariableDeclarationSyntax; - public left: IExpressionSyntax; - public inKeyword: ISyntaxToken; - public expression: IExpressionSyntax; - public closeParenToken: ISyntaxToken; - public statement: IStatementSyntax; - constructor(forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, left: IExpressionSyntax, inKeyword: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isIterationStatement(): boolean; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, left: IExpressionSyntax, inKeyword: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): ForInStatementSyntax; - static create(forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, inKeyword: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): ForInStatementSyntax; - static create1(expression: IExpressionSyntax, statement: IStatementSyntax): ForInStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ForInStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ForInStatementSyntax; - public withForKeyword(forKeyword: ISyntaxToken): ForInStatementSyntax; - public withOpenParenToken(openParenToken: ISyntaxToken): ForInStatementSyntax; - public withVariableDeclaration(variableDeclaration: VariableDeclarationSyntax): ForInStatementSyntax; - public withLeft(left: IExpressionSyntax): ForInStatementSyntax; - public withInKeyword(inKeyword: ISyntaxToken): ForInStatementSyntax; - public withExpression(expression: IExpressionSyntax): ForInStatementSyntax; - public withCloseParenToken(closeParenToken: ISyntaxToken): ForInStatementSyntax; - public withStatement(statement: IStatementSyntax): ForInStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class WhileStatementSyntax extends SyntaxNode implements IIterationStatementSyntax { - public whileKeyword: ISyntaxToken; - public openParenToken: ISyntaxToken; - public condition: IExpressionSyntax; - public closeParenToken: ISyntaxToken; - public statement: IStatementSyntax; - constructor(whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isIterationStatement(): boolean; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): WhileStatementSyntax; - static create1(condition: IExpressionSyntax, statement: IStatementSyntax): WhileStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): WhileStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): WhileStatementSyntax; - public withWhileKeyword(whileKeyword: ISyntaxToken): WhileStatementSyntax; - public withOpenParenToken(openParenToken: ISyntaxToken): WhileStatementSyntax; - public withCondition(condition: IExpressionSyntax): WhileStatementSyntax; - public withCloseParenToken(closeParenToken: ISyntaxToken): WhileStatementSyntax; - public withStatement(statement: IStatementSyntax): WhileStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class WithStatementSyntax extends SyntaxNode implements IStatementSyntax { - public withKeyword: ISyntaxToken; - public openParenToken: ISyntaxToken; - public condition: IExpressionSyntax; - public closeParenToken: ISyntaxToken; - public statement: IStatementSyntax; - constructor(withKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(withKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax): WithStatementSyntax; - static create1(condition: IExpressionSyntax, statement: IStatementSyntax): WithStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): WithStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): WithStatementSyntax; - public withWithKeyword(withKeyword: ISyntaxToken): WithStatementSyntax; - public withOpenParenToken(openParenToken: ISyntaxToken): WithStatementSyntax; - public withCondition(condition: IExpressionSyntax): WithStatementSyntax; - public withCloseParenToken(closeParenToken: ISyntaxToken): WithStatementSyntax; - public withStatement(statement: IStatementSyntax): WithStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class EnumDeclarationSyntax extends SyntaxNode implements IModuleElementSyntax { - public modifiers: ISyntaxList; - public enumKeyword: ISyntaxToken; - public identifier: ISyntaxToken; - public openBraceToken: ISyntaxToken; - public enumElements: ISeparatedSyntaxList; - public closeBraceToken: ISyntaxToken; - constructor(modifiers: ISyntaxList, enumKeyword: ISyntaxToken, identifier: ISyntaxToken, openBraceToken: ISyntaxToken, enumElements: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isModuleElement(): boolean; - public update(modifiers: ISyntaxList, enumKeyword: ISyntaxToken, identifier: ISyntaxToken, openBraceToken: ISyntaxToken, enumElements: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken): EnumDeclarationSyntax; - static create(enumKeyword: ISyntaxToken, identifier: ISyntaxToken, openBraceToken: ISyntaxToken, closeBraceToken: ISyntaxToken): EnumDeclarationSyntax; - static create1(identifier: ISyntaxToken): EnumDeclarationSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): EnumDeclarationSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): EnumDeclarationSyntax; - public withModifiers(modifiers: ISyntaxList): EnumDeclarationSyntax; - public withModifier(modifier: ISyntaxToken): EnumDeclarationSyntax; - public withEnumKeyword(enumKeyword: ISyntaxToken): EnumDeclarationSyntax; - public withIdentifier(identifier: ISyntaxToken): EnumDeclarationSyntax; - public withOpenBraceToken(openBraceToken: ISyntaxToken): EnumDeclarationSyntax; - public withEnumElements(enumElements: ISeparatedSyntaxList): EnumDeclarationSyntax; - public withEnumElement(enumElement: EnumElementSyntax): EnumDeclarationSyntax; - public withCloseBraceToken(closeBraceToken: ISyntaxToken): EnumDeclarationSyntax; - public isTypeScriptSpecific(): boolean; - } - class EnumElementSyntax extends SyntaxNode { - public propertyName: ISyntaxToken; - public equalsValueClause: EqualsValueClauseSyntax; - constructor(propertyName: ISyntaxToken, equalsValueClause: EqualsValueClauseSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(propertyName: ISyntaxToken, equalsValueClause: EqualsValueClauseSyntax): EnumElementSyntax; - static create(propertyName: ISyntaxToken): EnumElementSyntax; - static create1(propertyName: ISyntaxToken): EnumElementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): EnumElementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): EnumElementSyntax; - public withPropertyName(propertyName: ISyntaxToken): EnumElementSyntax; - public withEqualsValueClause(equalsValueClause: EqualsValueClauseSyntax): EnumElementSyntax; - public isTypeScriptSpecific(): boolean; - } - class CastExpressionSyntax extends SyntaxNode implements IUnaryExpressionSyntax { - public lessThanToken: ISyntaxToken; - public type: ITypeSyntax; - public greaterThanToken: ISyntaxToken; - public expression: IUnaryExpressionSyntax; - constructor(lessThanToken: ISyntaxToken, type: ITypeSyntax, greaterThanToken: ISyntaxToken, expression: IUnaryExpressionSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public update(lessThanToken: ISyntaxToken, type: ITypeSyntax, greaterThanToken: ISyntaxToken, expression: IUnaryExpressionSyntax): CastExpressionSyntax; - static create1(type: ITypeSyntax, expression: IUnaryExpressionSyntax): CastExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): CastExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): CastExpressionSyntax; - public withLessThanToken(lessThanToken: ISyntaxToken): CastExpressionSyntax; - public withType(type: ITypeSyntax): CastExpressionSyntax; - public withGreaterThanToken(greaterThanToken: ISyntaxToken): CastExpressionSyntax; - public withExpression(expression: IUnaryExpressionSyntax): CastExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class ObjectLiteralExpressionSyntax extends SyntaxNode implements IPrimaryExpressionSyntax { - public openBraceToken: ISyntaxToken; - public propertyAssignments: ISeparatedSyntaxList; - public closeBraceToken: ISyntaxToken; - constructor(openBraceToken: ISyntaxToken, propertyAssignments: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isPrimaryExpression(): boolean; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public update(openBraceToken: ISyntaxToken, propertyAssignments: ISeparatedSyntaxList, closeBraceToken: ISyntaxToken): ObjectLiteralExpressionSyntax; - static create(openBraceToken: ISyntaxToken, closeBraceToken: ISyntaxToken): ObjectLiteralExpressionSyntax; - static create1(): ObjectLiteralExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): ObjectLiteralExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): ObjectLiteralExpressionSyntax; - public withOpenBraceToken(openBraceToken: ISyntaxToken): ObjectLiteralExpressionSyntax; - public withPropertyAssignments(propertyAssignments: ISeparatedSyntaxList): ObjectLiteralExpressionSyntax; - public withPropertyAssignment(propertyAssignment: IPropertyAssignmentSyntax): ObjectLiteralExpressionSyntax; - public withCloseBraceToken(closeBraceToken: ISyntaxToken): ObjectLiteralExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class SimplePropertyAssignmentSyntax extends SyntaxNode implements IPropertyAssignmentSyntax { - public propertyName: ISyntaxToken; - public colonToken: ISyntaxToken; - public expression: IExpressionSyntax; - constructor(propertyName: ISyntaxToken, colonToken: ISyntaxToken, expression: IExpressionSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isPropertyAssignment(): boolean; - public update(propertyName: ISyntaxToken, colonToken: ISyntaxToken, expression: IExpressionSyntax): SimplePropertyAssignmentSyntax; - static create1(propertyName: ISyntaxToken, expression: IExpressionSyntax): SimplePropertyAssignmentSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): SimplePropertyAssignmentSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): SimplePropertyAssignmentSyntax; - public withPropertyName(propertyName: ISyntaxToken): SimplePropertyAssignmentSyntax; - public withColonToken(colonToken: ISyntaxToken): SimplePropertyAssignmentSyntax; - public withExpression(expression: IExpressionSyntax): SimplePropertyAssignmentSyntax; - public isTypeScriptSpecific(): boolean; - } - class FunctionPropertyAssignmentSyntax extends SyntaxNode implements IPropertyAssignmentSyntax { - public propertyName: ISyntaxToken; - public callSignature: CallSignatureSyntax; - public block: BlockSyntax; - constructor(propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isPropertyAssignment(): boolean; - public update(propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionPropertyAssignmentSyntax; - static create1(propertyName: ISyntaxToken): FunctionPropertyAssignmentSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): FunctionPropertyAssignmentSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): FunctionPropertyAssignmentSyntax; - public withPropertyName(propertyName: ISyntaxToken): FunctionPropertyAssignmentSyntax; - public withCallSignature(callSignature: CallSignatureSyntax): FunctionPropertyAssignmentSyntax; - public withBlock(block: BlockSyntax): FunctionPropertyAssignmentSyntax; - public isTypeScriptSpecific(): boolean; - } - class FunctionExpressionSyntax extends SyntaxNode implements IPrimaryExpressionSyntax { - public functionKeyword: ISyntaxToken; - public identifier: ISyntaxToken; - public callSignature: CallSignatureSyntax; - public block: BlockSyntax; - constructor(functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isPrimaryExpression(): boolean; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public update(functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionExpressionSyntax; - static create(functionKeyword: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionExpressionSyntax; - static create1(): FunctionExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): FunctionExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): FunctionExpressionSyntax; - public withFunctionKeyword(functionKeyword: ISyntaxToken): FunctionExpressionSyntax; - public withIdentifier(identifier: ISyntaxToken): FunctionExpressionSyntax; - public withCallSignature(callSignature: CallSignatureSyntax): FunctionExpressionSyntax; - public withBlock(block: BlockSyntax): FunctionExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class EmptyStatementSyntax extends SyntaxNode implements IStatementSyntax { - public semicolonToken: ISyntaxToken; - constructor(semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(semicolonToken: ISyntaxToken): EmptyStatementSyntax; - static create1(): EmptyStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): EmptyStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): EmptyStatementSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): EmptyStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class TryStatementSyntax extends SyntaxNode implements IStatementSyntax { - public tryKeyword: ISyntaxToken; - public block: BlockSyntax; - public catchClause: CatchClauseSyntax; - public finallyClause: FinallyClauseSyntax; - constructor(tryKeyword: ISyntaxToken, block: BlockSyntax, catchClause: CatchClauseSyntax, finallyClause: FinallyClauseSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(tryKeyword: ISyntaxToken, block: BlockSyntax, catchClause: CatchClauseSyntax, finallyClause: FinallyClauseSyntax): TryStatementSyntax; - static create(tryKeyword: ISyntaxToken, block: BlockSyntax): TryStatementSyntax; - static create1(): TryStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): TryStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): TryStatementSyntax; - public withTryKeyword(tryKeyword: ISyntaxToken): TryStatementSyntax; - public withBlock(block: BlockSyntax): TryStatementSyntax; - public withCatchClause(catchClause: CatchClauseSyntax): TryStatementSyntax; - public withFinallyClause(finallyClause: FinallyClauseSyntax): TryStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class CatchClauseSyntax extends SyntaxNode { - public catchKeyword: ISyntaxToken; - public openParenToken: ISyntaxToken; - public identifier: ISyntaxToken; - public typeAnnotation: TypeAnnotationSyntax; - public closeParenToken: ISyntaxToken; - public block: BlockSyntax; - constructor(catchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, identifier: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, closeParenToken: ISyntaxToken, block: BlockSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(catchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, identifier: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, closeParenToken: ISyntaxToken, block: BlockSyntax): CatchClauseSyntax; - static create(catchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, identifier: ISyntaxToken, closeParenToken: ISyntaxToken, block: BlockSyntax): CatchClauseSyntax; - static create1(identifier: ISyntaxToken): CatchClauseSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): CatchClauseSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): CatchClauseSyntax; - public withCatchKeyword(catchKeyword: ISyntaxToken): CatchClauseSyntax; - public withOpenParenToken(openParenToken: ISyntaxToken): CatchClauseSyntax; - public withIdentifier(identifier: ISyntaxToken): CatchClauseSyntax; - public withTypeAnnotation(typeAnnotation: TypeAnnotationSyntax): CatchClauseSyntax; - public withCloseParenToken(closeParenToken: ISyntaxToken): CatchClauseSyntax; - public withBlock(block: BlockSyntax): CatchClauseSyntax; - public isTypeScriptSpecific(): boolean; - } - class FinallyClauseSyntax extends SyntaxNode { - public finallyKeyword: ISyntaxToken; - public block: BlockSyntax; - constructor(finallyKeyword: ISyntaxToken, block: BlockSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public update(finallyKeyword: ISyntaxToken, block: BlockSyntax): FinallyClauseSyntax; - static create1(): FinallyClauseSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): FinallyClauseSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): FinallyClauseSyntax; - public withFinallyKeyword(finallyKeyword: ISyntaxToken): FinallyClauseSyntax; - public withBlock(block: BlockSyntax): FinallyClauseSyntax; - public isTypeScriptSpecific(): boolean; - } - class LabeledStatementSyntax extends SyntaxNode implements IStatementSyntax { - public identifier: ISyntaxToken; - public colonToken: ISyntaxToken; - public statement: IStatementSyntax; - constructor(identifier: ISyntaxToken, colonToken: ISyntaxToken, statement: IStatementSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(identifier: ISyntaxToken, colonToken: ISyntaxToken, statement: IStatementSyntax): LabeledStatementSyntax; - static create1(identifier: ISyntaxToken, statement: IStatementSyntax): LabeledStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): LabeledStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): LabeledStatementSyntax; - public withIdentifier(identifier: ISyntaxToken): LabeledStatementSyntax; - public withColonToken(colonToken: ISyntaxToken): LabeledStatementSyntax; - public withStatement(statement: IStatementSyntax): LabeledStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class DoStatementSyntax extends SyntaxNode implements IIterationStatementSyntax { - public doKeyword: ISyntaxToken; - public statement: IStatementSyntax; - public whileKeyword: ISyntaxToken; - public openParenToken: ISyntaxToken; - public condition: IExpressionSyntax; - public closeParenToken: ISyntaxToken; - public semicolonToken: ISyntaxToken; - constructor(doKeyword: ISyntaxToken, statement: IStatementSyntax, whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isIterationStatement(): boolean; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(doKeyword: ISyntaxToken, statement: IStatementSyntax, whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, semicolonToken: ISyntaxToken): DoStatementSyntax; - static create1(statement: IStatementSyntax, condition: IExpressionSyntax): DoStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): DoStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): DoStatementSyntax; - public withDoKeyword(doKeyword: ISyntaxToken): DoStatementSyntax; - public withStatement(statement: IStatementSyntax): DoStatementSyntax; - public withWhileKeyword(whileKeyword: ISyntaxToken): DoStatementSyntax; - public withOpenParenToken(openParenToken: ISyntaxToken): DoStatementSyntax; - public withCondition(condition: IExpressionSyntax): DoStatementSyntax; - public withCloseParenToken(closeParenToken: ISyntaxToken): DoStatementSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): DoStatementSyntax; - public isTypeScriptSpecific(): boolean; - } - class TypeOfExpressionSyntax extends SyntaxNode implements IUnaryExpressionSyntax { - public typeOfKeyword: ISyntaxToken; - public expression: IUnaryExpressionSyntax; - constructor(typeOfKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public update(typeOfKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax): TypeOfExpressionSyntax; - static create1(expression: IUnaryExpressionSyntax): TypeOfExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): TypeOfExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): TypeOfExpressionSyntax; - public withTypeOfKeyword(typeOfKeyword: ISyntaxToken): TypeOfExpressionSyntax; - public withExpression(expression: IUnaryExpressionSyntax): TypeOfExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class DeleteExpressionSyntax extends SyntaxNode implements IUnaryExpressionSyntax { - public deleteKeyword: ISyntaxToken; - public expression: IUnaryExpressionSyntax; - constructor(deleteKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public update(deleteKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax): DeleteExpressionSyntax; - static create1(expression: IUnaryExpressionSyntax): DeleteExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): DeleteExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): DeleteExpressionSyntax; - public withDeleteKeyword(deleteKeyword: ISyntaxToken): DeleteExpressionSyntax; - public withExpression(expression: IUnaryExpressionSyntax): DeleteExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class VoidExpressionSyntax extends SyntaxNode implements IUnaryExpressionSyntax { - public voidKeyword: ISyntaxToken; - public expression: IUnaryExpressionSyntax; - constructor(voidKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isUnaryExpression(): boolean; - public isExpression(): boolean; - public update(voidKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax): VoidExpressionSyntax; - static create1(expression: IUnaryExpressionSyntax): VoidExpressionSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): VoidExpressionSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): VoidExpressionSyntax; - public withVoidKeyword(voidKeyword: ISyntaxToken): VoidExpressionSyntax; - public withExpression(expression: IUnaryExpressionSyntax): VoidExpressionSyntax; - public isTypeScriptSpecific(): boolean; - } - class DebuggerStatementSyntax extends SyntaxNode implements IStatementSyntax { - public debuggerKeyword: ISyntaxToken; - public semicolonToken: ISyntaxToken; - constructor(debuggerKeyword: ISyntaxToken, semicolonToken: ISyntaxToken, parsedInStrictMode: boolean); - public accept(visitor: ISyntaxVisitor): any; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(slot: number): ISyntaxElement; - public isStatement(): boolean; - public isModuleElement(): boolean; - public update(debuggerKeyword: ISyntaxToken, semicolonToken: ISyntaxToken): DebuggerStatementSyntax; - static create1(): DebuggerStatementSyntax; - public withLeadingTrivia(trivia: ISyntaxTriviaList): DebuggerStatementSyntax; - public withTrailingTrivia(trivia: ISyntaxTriviaList): DebuggerStatementSyntax; - public withDebuggerKeyword(debuggerKeyword: ISyntaxToken): DebuggerStatementSyntax; - public withSemicolonToken(semicolonToken: ISyntaxToken): DebuggerStatementSyntax; - public isTypeScriptSpecific(): boolean; - } -} -declare module TypeScript { - class SyntaxRewriter implements ISyntaxVisitor { - public visitToken(token: ISyntaxToken): ISyntaxToken; - public visitNode(node: SyntaxNode): SyntaxNode; - public visitNodeOrToken(node: ISyntaxNodeOrToken): ISyntaxNodeOrToken; - public visitList(list: ISyntaxList): ISyntaxList; - public visitSeparatedList(list: ISeparatedSyntaxList): ISeparatedSyntaxList; - public visitSourceUnit(node: SourceUnitSyntax): any; - public visitExternalModuleReference(node: ExternalModuleReferenceSyntax): any; - public visitModuleNameModuleReference(node: ModuleNameModuleReferenceSyntax): any; - public visitImportDeclaration(node: ImportDeclarationSyntax): any; - public visitExportAssignment(node: ExportAssignmentSyntax): any; - public visitClassDeclaration(node: ClassDeclarationSyntax): any; - public visitInterfaceDeclaration(node: InterfaceDeclarationSyntax): any; - public visitHeritageClause(node: HeritageClauseSyntax): any; - public visitModuleDeclaration(node: ModuleDeclarationSyntax): any; - public visitFunctionDeclaration(node: FunctionDeclarationSyntax): any; - public visitVariableStatement(node: VariableStatementSyntax): any; - public visitVariableDeclaration(node: VariableDeclarationSyntax): any; - public visitVariableDeclarator(node: VariableDeclaratorSyntax): any; - public visitEqualsValueClause(node: EqualsValueClauseSyntax): any; - public visitPrefixUnaryExpression(node: PrefixUnaryExpressionSyntax): any; - public visitArrayLiteralExpression(node: ArrayLiteralExpressionSyntax): any; - public visitOmittedExpression(node: OmittedExpressionSyntax): any; - public visitParenthesizedExpression(node: ParenthesizedExpressionSyntax): any; - public visitSimpleArrowFunctionExpression(node: SimpleArrowFunctionExpressionSyntax): any; - public visitParenthesizedArrowFunctionExpression(node: ParenthesizedArrowFunctionExpressionSyntax): any; - public visitQualifiedName(node: QualifiedNameSyntax): any; - public visitTypeArgumentList(node: TypeArgumentListSyntax): any; - public visitConstructorType(node: ConstructorTypeSyntax): any; - public visitFunctionType(node: FunctionTypeSyntax): any; - public visitObjectType(node: ObjectTypeSyntax): any; - public visitArrayType(node: ArrayTypeSyntax): any; - public visitGenericType(node: GenericTypeSyntax): any; - public visitTypeQuery(node: TypeQuerySyntax): any; - public visitTypeAnnotation(node: TypeAnnotationSyntax): any; - public visitBlock(node: BlockSyntax): any; - public visitParameter(node: ParameterSyntax): any; - public visitMemberAccessExpression(node: MemberAccessExpressionSyntax): any; - public visitPostfixUnaryExpression(node: PostfixUnaryExpressionSyntax): any; - public visitElementAccessExpression(node: ElementAccessExpressionSyntax): any; - public visitInvocationExpression(node: InvocationExpressionSyntax): any; - public visitArgumentList(node: ArgumentListSyntax): any; - public visitBinaryExpression(node: BinaryExpressionSyntax): any; - public visitConditionalExpression(node: ConditionalExpressionSyntax): any; - public visitConstructSignature(node: ConstructSignatureSyntax): any; - public visitMethodSignature(node: MethodSignatureSyntax): any; - public visitIndexSignature(node: IndexSignatureSyntax): any; - public visitPropertySignature(node: PropertySignatureSyntax): any; - public visitCallSignature(node: CallSignatureSyntax): any; - public visitParameterList(node: ParameterListSyntax): any; - public visitTypeParameterList(node: TypeParameterListSyntax): any; - public visitTypeParameter(node: TypeParameterSyntax): any; - public visitConstraint(node: ConstraintSyntax): any; - public visitElseClause(node: ElseClauseSyntax): any; - public visitIfStatement(node: IfStatementSyntax): any; - public visitExpressionStatement(node: ExpressionStatementSyntax): any; - public visitConstructorDeclaration(node: ConstructorDeclarationSyntax): any; - public visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): any; - public visitGetAccessor(node: GetAccessorSyntax): any; - public visitSetAccessor(node: SetAccessorSyntax): any; - public visitMemberVariableDeclaration(node: MemberVariableDeclarationSyntax): any; - public visitIndexMemberDeclaration(node: IndexMemberDeclarationSyntax): any; - public visitThrowStatement(node: ThrowStatementSyntax): any; - public visitReturnStatement(node: ReturnStatementSyntax): any; - public visitObjectCreationExpression(node: ObjectCreationExpressionSyntax): any; - public visitSwitchStatement(node: SwitchStatementSyntax): any; - public visitCaseSwitchClause(node: CaseSwitchClauseSyntax): any; - public visitDefaultSwitchClause(node: DefaultSwitchClauseSyntax): any; - public visitBreakStatement(node: BreakStatementSyntax): any; - public visitContinueStatement(node: ContinueStatementSyntax): any; - public visitForStatement(node: ForStatementSyntax): any; - public visitForInStatement(node: ForInStatementSyntax): any; - public visitWhileStatement(node: WhileStatementSyntax): any; - public visitWithStatement(node: WithStatementSyntax): any; - public visitEnumDeclaration(node: EnumDeclarationSyntax): any; - public visitEnumElement(node: EnumElementSyntax): any; - public visitCastExpression(node: CastExpressionSyntax): any; - public visitObjectLiteralExpression(node: ObjectLiteralExpressionSyntax): any; - public visitSimplePropertyAssignment(node: SimplePropertyAssignmentSyntax): any; - public visitFunctionPropertyAssignment(node: FunctionPropertyAssignmentSyntax): any; - public visitFunctionExpression(node: FunctionExpressionSyntax): any; - public visitEmptyStatement(node: EmptyStatementSyntax): any; - public visitTryStatement(node: TryStatementSyntax): any; - public visitCatchClause(node: CatchClauseSyntax): any; - public visitFinallyClause(node: FinallyClauseSyntax): any; - public visitLabeledStatement(node: LabeledStatementSyntax): any; - public visitDoStatement(node: DoStatementSyntax): any; - public visitTypeOfExpression(node: TypeOfExpressionSyntax): any; - public visitDeleteExpression(node: DeleteExpressionSyntax): any; - public visitVoidExpression(node: VoidExpressionSyntax): any; - public visitDebuggerStatement(node: DebuggerStatementSyntax): any; - } -} -declare module TypeScript { - class SyntaxDedenter extends SyntaxRewriter { - private dedentationAmount; - private minimumIndent; - private options; - private lastTriviaWasNewLine; - constructor(dedentFirstToken: boolean, dedentationAmount: number, minimumIndent: number, options: FormattingOptions); - private abort(); - private isAborted(); - public visitToken(token: ISyntaxToken): ISyntaxToken; - private dedentTriviaList(triviaList); - private dedentSegment(segment, hasFollowingNewLineTrivia); - private dedentWhitespace(trivia, hasFollowingNewLineTrivia); - private dedentMultiLineComment(trivia); - static dedentNode(node: ISyntaxNode, dedentFirstToken: boolean, dedentAmount: number, minimumIndent: number, options: FormattingOptions): ISyntaxNode; - } -} -declare module TypeScript { - class SyntaxIndenter extends SyntaxRewriter { - private indentationAmount; - private options; - private lastTriviaWasNewLine; - private indentationTrivia; - constructor(indentFirstToken: boolean, indentationAmount: number, options: FormattingOptions); - public visitToken(token: ISyntaxToken): ISyntaxToken; - public indentTriviaList(triviaList: ISyntaxTriviaList): ISyntaxTriviaList; - private indentSegment(segment); - private indentWhitespace(trivia, indentThisTrivia, result); - private indentSingleLineOrSkippedText(trivia, indentThisTrivia, result); - private indentMultiLineComment(trivia, indentThisTrivia, result); - static indentNode(node: ISyntaxNode, indentFirstToken: boolean, indentAmount: number, options: FormattingOptions): SyntaxNode; - static indentNodes(nodes: SyntaxNode[], indentFirstToken: boolean, indentAmount: number, options: FormattingOptions): SyntaxNode[]; - } -} -declare module TypeScript.Syntax { - class VariableWidthTokenWithNoTrivia implements ISyntaxToken { - private _fullText; - public tokenKind: SyntaxKind; - constructor(fullText: string, kind: SyntaxKind); - public clone(): ISyntaxToken; - public isNode(): boolean; - public isToken(): boolean; - public isList(): boolean; - public isSeparatedList(): boolean; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(index: number): ISyntaxElement; - public fullWidth(): number; - public width(): number; - public text(): string; - public fullText(): string; - public value(): any; - public valueText(): string; - public hasLeadingTrivia(): boolean; - public hasLeadingComment(): boolean; - public hasLeadingNewLine(): boolean; - public hasLeadingSkippedText(): boolean; - public leadingTriviaWidth(): number; - public leadingTrivia(): ISyntaxTriviaList; - public hasTrailingTrivia(): boolean; - public hasTrailingComment(): boolean; - public hasTrailingNewLine(): boolean; - public hasTrailingSkippedText(): boolean; - public trailingTriviaWidth(): number; - public trailingTrivia(): ISyntaxTriviaList; - public hasSkippedToken(): boolean; - public toJSON(key: any): any; - public firstToken(): ISyntaxToken; - public lastToken(): ISyntaxToken; - public isTypeScriptSpecific(): boolean; - public isIncrementallyUnusable(): boolean; - public accept(visitor: ISyntaxVisitor): any; - private realize(); - public collectTextElements(elements: string[]): void; - private findTokenInternal(parent, position, fullStart); - public withLeadingTrivia(leadingTrivia: ISyntaxTriviaList): ISyntaxToken; - public withTrailingTrivia(trailingTrivia: ISyntaxTriviaList): ISyntaxToken; - public isExpression(): boolean; - public isPrimaryExpression(): boolean; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - } - class VariableWidthTokenWithLeadingTrivia implements ISyntaxToken { - private _fullText; - public tokenKind: SyntaxKind; - private _leadingTriviaInfo; - constructor(fullText: string, kind: SyntaxKind, leadingTriviaInfo: number); - public clone(): ISyntaxToken; - public isNode(): boolean; - public isToken(): boolean; - public isList(): boolean; - public isSeparatedList(): boolean; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(index: number): ISyntaxElement; - public fullWidth(): number; - public width(): number; - public text(): string; - public fullText(): string; - public value(): any; - public valueText(): string; - public hasLeadingTrivia(): boolean; - public hasLeadingComment(): boolean; - public hasLeadingNewLine(): boolean; - public hasLeadingSkippedText(): boolean; - public leadingTriviaWidth(): number; - public leadingTrivia(): ISyntaxTriviaList; - public hasTrailingTrivia(): boolean; - public hasTrailingComment(): boolean; - public hasTrailingNewLine(): boolean; - public hasTrailingSkippedText(): boolean; - public trailingTriviaWidth(): number; - public trailingTrivia(): ISyntaxTriviaList; - public hasSkippedToken(): boolean; - public toJSON(key: any): any; - public firstToken(): ISyntaxToken; - public lastToken(): ISyntaxToken; - public isTypeScriptSpecific(): boolean; - public isIncrementallyUnusable(): boolean; - public accept(visitor: ISyntaxVisitor): any; - private realize(); - public collectTextElements(elements: string[]): void; - private findTokenInternal(parent, position, fullStart); - public withLeadingTrivia(leadingTrivia: ISyntaxTriviaList): ISyntaxToken; - public withTrailingTrivia(trailingTrivia: ISyntaxTriviaList): ISyntaxToken; - public isExpression(): boolean; - public isPrimaryExpression(): boolean; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - } - class VariableWidthTokenWithTrailingTrivia implements ISyntaxToken { - private _fullText; - public tokenKind: SyntaxKind; - private _trailingTriviaInfo; - constructor(fullText: string, kind: SyntaxKind, trailingTriviaInfo: number); - public clone(): ISyntaxToken; - public isNode(): boolean; - public isToken(): boolean; - public isList(): boolean; - public isSeparatedList(): boolean; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(index: number): ISyntaxElement; - public fullWidth(): number; - public width(): number; - public text(): string; - public fullText(): string; - public value(): any; - public valueText(): string; - public hasLeadingTrivia(): boolean; - public hasLeadingComment(): boolean; - public hasLeadingNewLine(): boolean; - public hasLeadingSkippedText(): boolean; - public leadingTriviaWidth(): number; - public leadingTrivia(): ISyntaxTriviaList; - public hasTrailingTrivia(): boolean; - public hasTrailingComment(): boolean; - public hasTrailingNewLine(): boolean; - public hasTrailingSkippedText(): boolean; - public trailingTriviaWidth(): number; - public trailingTrivia(): ISyntaxTriviaList; - public hasSkippedToken(): boolean; - public toJSON(key: any): any; - public firstToken(): ISyntaxToken; - public lastToken(): ISyntaxToken; - public isTypeScriptSpecific(): boolean; - public isIncrementallyUnusable(): boolean; - public accept(visitor: ISyntaxVisitor): any; - private realize(); - public collectTextElements(elements: string[]): void; - private findTokenInternal(parent, position, fullStart); - public withLeadingTrivia(leadingTrivia: ISyntaxTriviaList): ISyntaxToken; - public withTrailingTrivia(trailingTrivia: ISyntaxTriviaList): ISyntaxToken; - public isExpression(): boolean; - public isPrimaryExpression(): boolean; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - } - class VariableWidthTokenWithLeadingAndTrailingTrivia implements ISyntaxToken { - private _fullText; - public tokenKind: SyntaxKind; - private _leadingTriviaInfo; - private _trailingTriviaInfo; - constructor(fullText: string, kind: SyntaxKind, leadingTriviaInfo: number, trailingTriviaInfo: number); - public clone(): ISyntaxToken; - public isNode(): boolean; - public isToken(): boolean; - public isList(): boolean; - public isSeparatedList(): boolean; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(index: number): ISyntaxElement; - public fullWidth(): number; - public width(): number; - public text(): string; - public fullText(): string; - public value(): any; - public valueText(): string; - public hasLeadingTrivia(): boolean; - public hasLeadingComment(): boolean; - public hasLeadingNewLine(): boolean; - public hasLeadingSkippedText(): boolean; - public leadingTriviaWidth(): number; - public leadingTrivia(): ISyntaxTriviaList; - public hasTrailingTrivia(): boolean; - public hasTrailingComment(): boolean; - public hasTrailingNewLine(): boolean; - public hasTrailingSkippedText(): boolean; - public trailingTriviaWidth(): number; - public trailingTrivia(): ISyntaxTriviaList; - public hasSkippedToken(): boolean; - public toJSON(key: any): any; - public firstToken(): ISyntaxToken; - public lastToken(): ISyntaxToken; - public isTypeScriptSpecific(): boolean; - public isIncrementallyUnusable(): boolean; - public accept(visitor: ISyntaxVisitor): any; - private realize(); - public collectTextElements(elements: string[]): void; - private findTokenInternal(parent, position, fullStart); - public withLeadingTrivia(leadingTrivia: ISyntaxTriviaList): ISyntaxToken; - public withTrailingTrivia(trailingTrivia: ISyntaxTriviaList): ISyntaxToken; - public isExpression(): boolean; - public isPrimaryExpression(): boolean; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - } - class FixedWidthTokenWithNoTrivia implements ISyntaxToken { - public tokenKind: SyntaxKind; - constructor(kind: SyntaxKind); - public clone(): ISyntaxToken; - public isNode(): boolean; - public isToken(): boolean; - public isList(): boolean; - public isSeparatedList(): boolean; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(index: number): ISyntaxElement; - public fullWidth(): number; - public width(): number; - public text(): string; - public fullText(): string; - public value(): any; - public valueText(): string; - public hasLeadingTrivia(): boolean; - public hasLeadingComment(): boolean; - public hasLeadingNewLine(): boolean; - public hasLeadingSkippedText(): boolean; - public leadingTriviaWidth(): number; - public leadingTrivia(): ISyntaxTriviaList; - public hasTrailingTrivia(): boolean; - public hasTrailingComment(): boolean; - public hasTrailingNewLine(): boolean; - public hasTrailingSkippedText(): boolean; - public trailingTriviaWidth(): number; - public trailingTrivia(): ISyntaxTriviaList; - public hasSkippedToken(): boolean; - public toJSON(key: any): any; - public firstToken(): ISyntaxToken; - public lastToken(): ISyntaxToken; - public isTypeScriptSpecific(): boolean; - public isIncrementallyUnusable(): boolean; - public accept(visitor: ISyntaxVisitor): any; - private realize(); - public collectTextElements(elements: string[]): void; - private findTokenInternal(parent, position, fullStart); - public withLeadingTrivia(leadingTrivia: ISyntaxTriviaList): ISyntaxToken; - public withTrailingTrivia(trailingTrivia: ISyntaxTriviaList): ISyntaxToken; - public isExpression(): boolean; - public isPrimaryExpression(): boolean; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - } - class FixedWidthTokenWithLeadingTrivia implements ISyntaxToken { - private _fullText; - public tokenKind: SyntaxKind; - private _leadingTriviaInfo; - constructor(fullText: string, kind: SyntaxKind, leadingTriviaInfo: number); - public clone(): ISyntaxToken; - public isNode(): boolean; - public isToken(): boolean; - public isList(): boolean; - public isSeparatedList(): boolean; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(index: number): ISyntaxElement; - public fullWidth(): number; - public width(): number; - public text(): string; - public fullText(): string; - public value(): any; - public valueText(): string; - public hasLeadingTrivia(): boolean; - public hasLeadingComment(): boolean; - public hasLeadingNewLine(): boolean; - public hasLeadingSkippedText(): boolean; - public leadingTriviaWidth(): number; - public leadingTrivia(): ISyntaxTriviaList; - public hasTrailingTrivia(): boolean; - public hasTrailingComment(): boolean; - public hasTrailingNewLine(): boolean; - public hasTrailingSkippedText(): boolean; - public trailingTriviaWidth(): number; - public trailingTrivia(): ISyntaxTriviaList; - public hasSkippedToken(): boolean; - public toJSON(key: any): any; - public firstToken(): ISyntaxToken; - public lastToken(): ISyntaxToken; - public isTypeScriptSpecific(): boolean; - public isIncrementallyUnusable(): boolean; - public accept(visitor: ISyntaxVisitor): any; - private realize(); - public collectTextElements(elements: string[]): void; - private findTokenInternal(parent, position, fullStart); - public withLeadingTrivia(leadingTrivia: ISyntaxTriviaList): ISyntaxToken; - public withTrailingTrivia(trailingTrivia: ISyntaxTriviaList): ISyntaxToken; - public isExpression(): boolean; - public isPrimaryExpression(): boolean; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - } - class FixedWidthTokenWithTrailingTrivia implements ISyntaxToken { - private _fullText; - public tokenKind: SyntaxKind; - private _trailingTriviaInfo; - constructor(fullText: string, kind: SyntaxKind, trailingTriviaInfo: number); - public clone(): ISyntaxToken; - public isNode(): boolean; - public isToken(): boolean; - public isList(): boolean; - public isSeparatedList(): boolean; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(index: number): ISyntaxElement; - public fullWidth(): number; - public width(): number; - public text(): string; - public fullText(): string; - public value(): any; - public valueText(): string; - public hasLeadingTrivia(): boolean; - public hasLeadingComment(): boolean; - public hasLeadingNewLine(): boolean; - public hasLeadingSkippedText(): boolean; - public leadingTriviaWidth(): number; - public leadingTrivia(): ISyntaxTriviaList; - public hasTrailingTrivia(): boolean; - public hasTrailingComment(): boolean; - public hasTrailingNewLine(): boolean; - public hasTrailingSkippedText(): boolean; - public trailingTriviaWidth(): number; - public trailingTrivia(): ISyntaxTriviaList; - public hasSkippedToken(): boolean; - public toJSON(key: any): any; - public firstToken(): ISyntaxToken; - public lastToken(): ISyntaxToken; - public isTypeScriptSpecific(): boolean; - public isIncrementallyUnusable(): boolean; - public accept(visitor: ISyntaxVisitor): any; - private realize(); - public collectTextElements(elements: string[]): void; - private findTokenInternal(parent, position, fullStart); - public withLeadingTrivia(leadingTrivia: ISyntaxTriviaList): ISyntaxToken; - public withTrailingTrivia(trailingTrivia: ISyntaxTriviaList): ISyntaxToken; - public isExpression(): boolean; - public isPrimaryExpression(): boolean; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - } - class FixedWidthTokenWithLeadingAndTrailingTrivia implements ISyntaxToken { - private _fullText; - public tokenKind: SyntaxKind; - private _leadingTriviaInfo; - private _trailingTriviaInfo; - constructor(fullText: string, kind: SyntaxKind, leadingTriviaInfo: number, trailingTriviaInfo: number); - public clone(): ISyntaxToken; - public isNode(): boolean; - public isToken(): boolean; - public isList(): boolean; - public isSeparatedList(): boolean; - public kind(): SyntaxKind; - public childCount(): number; - public childAt(index: number): ISyntaxElement; - public fullWidth(): number; - public width(): number; - public text(): string; - public fullText(): string; - public value(): any; - public valueText(): string; - public hasLeadingTrivia(): boolean; - public hasLeadingComment(): boolean; - public hasLeadingNewLine(): boolean; - public hasLeadingSkippedText(): boolean; - public leadingTriviaWidth(): number; - public leadingTrivia(): ISyntaxTriviaList; - public hasTrailingTrivia(): boolean; - public hasTrailingComment(): boolean; - public hasTrailingNewLine(): boolean; - public hasTrailingSkippedText(): boolean; - public trailingTriviaWidth(): number; - public trailingTrivia(): ISyntaxTriviaList; - public hasSkippedToken(): boolean; - public toJSON(key: any): any; - public firstToken(): ISyntaxToken; - public lastToken(): ISyntaxToken; - public isTypeScriptSpecific(): boolean; - public isIncrementallyUnusable(): boolean; - public accept(visitor: ISyntaxVisitor): any; - private realize(); - public collectTextElements(elements: string[]): void; - private findTokenInternal(parent, position, fullStart); - public withLeadingTrivia(leadingTrivia: ISyntaxTriviaList): ISyntaxToken; - public withTrailingTrivia(trailingTrivia: ISyntaxTriviaList): ISyntaxToken; - public isExpression(): boolean; - public isPrimaryExpression(): boolean; - public isMemberExpression(): boolean; - public isPostfixExpression(): boolean; - public isUnaryExpression(): boolean; - } -} -declare module TypeScript { - interface ISyntaxToken extends ISyntaxNodeOrToken, INameSyntax, IPrimaryExpressionSyntax { - tokenKind: SyntaxKind; - text(): string; - value(): any; - valueText(): string; - hasLeadingTrivia(): boolean; - hasLeadingComment(): boolean; - hasLeadingNewLine(): boolean; - hasLeadingSkippedText(): boolean; - hasTrailingTrivia(): boolean; - hasTrailingComment(): boolean; - hasTrailingNewLine(): boolean; - hasTrailingSkippedText(): boolean; - hasSkippedToken(): boolean; - leadingTrivia(): ISyntaxTriviaList; - trailingTrivia(): ISyntaxTriviaList; - withLeadingTrivia(leadingTrivia: ISyntaxTriviaList): ISyntaxToken; - withTrailingTrivia(trailingTrivia: ISyntaxTriviaList): ISyntaxToken; - clone(): ISyntaxToken; - } - interface ITokenInfo { - leadingTrivia?: ISyntaxTrivia[]; - text?: string; - trailingTrivia?: ISyntaxTrivia[]; - } -} -declare module TypeScript.Syntax { - function isExpression(token: ISyntaxToken): boolean; - function realizeToken(token: ISyntaxToken): ISyntaxToken; - function convertToIdentifierName(token: ISyntaxToken): ISyntaxToken; - function tokenToJSON(token: ISyntaxToken): any; - function value(token: ISyntaxToken): any; - function massageEscapes(text: string): string; - function valueText(token: ISyntaxToken): string; - function emptyToken(kind: SyntaxKind): ISyntaxToken; - function token(kind: SyntaxKind, info?: ITokenInfo): ISyntaxToken; - function identifier(text: string, info?: ITokenInfo): ISyntaxToken; -} -declare module TypeScript { - class SyntaxTokenReplacer extends SyntaxRewriter { - private token1; - private token2; - constructor(token1: ISyntaxToken, token2: ISyntaxToken); - public visitToken(token: ISyntaxToken): ISyntaxToken; - public visitNode(node: SyntaxNode): SyntaxNode; - public visitList(list: ISyntaxList): ISyntaxList; - public visitSeparatedList(list: ISeparatedSyntaxList): ISeparatedSyntaxList; - } -} -declare module TypeScript { - interface ISyntaxTrivia { - kind(): SyntaxKind; - isWhitespace(): boolean; - isComment(): boolean; - isNewLine(): boolean; - isSkippedToken(): boolean; - fullWidth(): number; - fullText(): string; - skippedToken(): ISyntaxToken; - } -} -declare module TypeScript.Syntax { - function deferredTrivia(kind: SyntaxKind, text: ISimpleText, fullStart: number, fullWidth: number): ISyntaxTrivia; - function trivia(kind: SyntaxKind, text: string): ISyntaxTrivia; - function skippedTokenTrivia(token: ISyntaxToken): ISyntaxTrivia; - function spaces(count: number): ISyntaxTrivia; - function whitespace(text: string): ISyntaxTrivia; - function multiLineComment(text: string): ISyntaxTrivia; - function singleLineComment(text: string): ISyntaxTrivia; - var spaceTrivia: ISyntaxTrivia; - var lineFeedTrivia: ISyntaxTrivia; - var carriageReturnTrivia: ISyntaxTrivia; - var carriageReturnLineFeedTrivia: ISyntaxTrivia; - function splitMultiLineCommentTriviaIntoMultipleLines(trivia: ISyntaxTrivia): string[]; -} -declare module TypeScript { - interface ISyntaxTriviaList { - count(): number; - syntaxTriviaAt(index: number): ISyntaxTrivia; - fullWidth(): number; - fullText(): string; - hasComment(): boolean; - hasNewLine(): boolean; - hasSkippedToken(): boolean; - last(): ISyntaxTrivia; - toArray(): ISyntaxTrivia[]; - concat(trivia: ISyntaxTriviaList): ISyntaxTriviaList; - collectTextElements(elements: string[]): void; - } -} -declare module TypeScript.Syntax { - var emptyTriviaList: ISyntaxTriviaList; - function triviaList(trivia: ISyntaxTrivia[]): ISyntaxTriviaList; - var spaceTriviaList: ISyntaxTriviaList; -} -declare module TypeScript { - class SyntaxUtilities { - static isAngleBracket(positionedElement: PositionedElement): boolean; - static getToken(list: ISyntaxList, kind: SyntaxKind): ISyntaxToken; - static containsToken(list: ISyntaxList, kind: SyntaxKind): boolean; - static hasExportKeyword(moduleElement: IModuleElementSyntax): boolean; - static getExportKeyword(moduleElement: IModuleElementSyntax): ISyntaxToken; - static isAmbientDeclarationSyntax(positionNode: PositionedNode): boolean; - } -} -declare module TypeScript { - interface ISyntaxVisitor { - visitToken(token: ISyntaxToken): any; - visitSourceUnit(node: SourceUnitSyntax): any; - visitExternalModuleReference(node: ExternalModuleReferenceSyntax): any; - visitModuleNameModuleReference(node: ModuleNameModuleReferenceSyntax): any; - visitImportDeclaration(node: ImportDeclarationSyntax): any; - visitExportAssignment(node: ExportAssignmentSyntax): any; - visitClassDeclaration(node: ClassDeclarationSyntax): any; - visitInterfaceDeclaration(node: InterfaceDeclarationSyntax): any; - visitHeritageClause(node: HeritageClauseSyntax): any; - visitModuleDeclaration(node: ModuleDeclarationSyntax): any; - visitFunctionDeclaration(node: FunctionDeclarationSyntax): any; - visitVariableStatement(node: VariableStatementSyntax): any; - visitVariableDeclaration(node: VariableDeclarationSyntax): any; - visitVariableDeclarator(node: VariableDeclaratorSyntax): any; - visitEqualsValueClause(node: EqualsValueClauseSyntax): any; - visitPrefixUnaryExpression(node: PrefixUnaryExpressionSyntax): any; - visitArrayLiteralExpression(node: ArrayLiteralExpressionSyntax): any; - visitOmittedExpression(node: OmittedExpressionSyntax): any; - visitParenthesizedExpression(node: ParenthesizedExpressionSyntax): any; - visitSimpleArrowFunctionExpression(node: SimpleArrowFunctionExpressionSyntax): any; - visitParenthesizedArrowFunctionExpression(node: ParenthesizedArrowFunctionExpressionSyntax): any; - visitQualifiedName(node: QualifiedNameSyntax): any; - visitTypeArgumentList(node: TypeArgumentListSyntax): any; - visitConstructorType(node: ConstructorTypeSyntax): any; - visitFunctionType(node: FunctionTypeSyntax): any; - visitObjectType(node: ObjectTypeSyntax): any; - visitArrayType(node: ArrayTypeSyntax): any; - visitGenericType(node: GenericTypeSyntax): any; - visitTypeQuery(node: TypeQuerySyntax): any; - visitTypeAnnotation(node: TypeAnnotationSyntax): any; - visitBlock(node: BlockSyntax): any; - visitParameter(node: ParameterSyntax): any; - visitMemberAccessExpression(node: MemberAccessExpressionSyntax): any; - visitPostfixUnaryExpression(node: PostfixUnaryExpressionSyntax): any; - visitElementAccessExpression(node: ElementAccessExpressionSyntax): any; - visitInvocationExpression(node: InvocationExpressionSyntax): any; - visitArgumentList(node: ArgumentListSyntax): any; - visitBinaryExpression(node: BinaryExpressionSyntax): any; - visitConditionalExpression(node: ConditionalExpressionSyntax): any; - visitConstructSignature(node: ConstructSignatureSyntax): any; - visitMethodSignature(node: MethodSignatureSyntax): any; - visitIndexSignature(node: IndexSignatureSyntax): any; - visitPropertySignature(node: PropertySignatureSyntax): any; - visitCallSignature(node: CallSignatureSyntax): any; - visitParameterList(node: ParameterListSyntax): any; - visitTypeParameterList(node: TypeParameterListSyntax): any; - visitTypeParameter(node: TypeParameterSyntax): any; - visitConstraint(node: ConstraintSyntax): any; - visitElseClause(node: ElseClauseSyntax): any; - visitIfStatement(node: IfStatementSyntax): any; - visitExpressionStatement(node: ExpressionStatementSyntax): any; - visitConstructorDeclaration(node: ConstructorDeclarationSyntax): any; - visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): any; - visitGetAccessor(node: GetAccessorSyntax): any; - visitSetAccessor(node: SetAccessorSyntax): any; - visitMemberVariableDeclaration(node: MemberVariableDeclarationSyntax): any; - visitIndexMemberDeclaration(node: IndexMemberDeclarationSyntax): any; - visitThrowStatement(node: ThrowStatementSyntax): any; - visitReturnStatement(node: ReturnStatementSyntax): any; - visitObjectCreationExpression(node: ObjectCreationExpressionSyntax): any; - visitSwitchStatement(node: SwitchStatementSyntax): any; - visitCaseSwitchClause(node: CaseSwitchClauseSyntax): any; - visitDefaultSwitchClause(node: DefaultSwitchClauseSyntax): any; - visitBreakStatement(node: BreakStatementSyntax): any; - visitContinueStatement(node: ContinueStatementSyntax): any; - visitForStatement(node: ForStatementSyntax): any; - visitForInStatement(node: ForInStatementSyntax): any; - visitWhileStatement(node: WhileStatementSyntax): any; - visitWithStatement(node: WithStatementSyntax): any; - visitEnumDeclaration(node: EnumDeclarationSyntax): any; - visitEnumElement(node: EnumElementSyntax): any; - visitCastExpression(node: CastExpressionSyntax): any; - visitObjectLiteralExpression(node: ObjectLiteralExpressionSyntax): any; - visitSimplePropertyAssignment(node: SimplePropertyAssignmentSyntax): any; - visitFunctionPropertyAssignment(node: FunctionPropertyAssignmentSyntax): any; - visitFunctionExpression(node: FunctionExpressionSyntax): any; - visitEmptyStatement(node: EmptyStatementSyntax): any; - visitTryStatement(node: TryStatementSyntax): any; - visitCatchClause(node: CatchClauseSyntax): any; - visitFinallyClause(node: FinallyClauseSyntax): any; - visitLabeledStatement(node: LabeledStatementSyntax): any; - visitDoStatement(node: DoStatementSyntax): any; - visitTypeOfExpression(node: TypeOfExpressionSyntax): any; - visitDeleteExpression(node: DeleteExpressionSyntax): any; - visitVoidExpression(node: VoidExpressionSyntax): any; - visitDebuggerStatement(node: DebuggerStatementSyntax): any; - } - class SyntaxVisitor implements ISyntaxVisitor { - public defaultVisit(node: ISyntaxNodeOrToken): any; - public visitToken(token: ISyntaxToken): any; - public visitSourceUnit(node: SourceUnitSyntax): any; - public visitExternalModuleReference(node: ExternalModuleReferenceSyntax): any; - public visitModuleNameModuleReference(node: ModuleNameModuleReferenceSyntax): any; - public visitImportDeclaration(node: ImportDeclarationSyntax): any; - public visitExportAssignment(node: ExportAssignmentSyntax): any; - public visitClassDeclaration(node: ClassDeclarationSyntax): any; - public visitInterfaceDeclaration(node: InterfaceDeclarationSyntax): any; - public visitHeritageClause(node: HeritageClauseSyntax): any; - public visitModuleDeclaration(node: ModuleDeclarationSyntax): any; - public visitFunctionDeclaration(node: FunctionDeclarationSyntax): any; - public visitVariableStatement(node: VariableStatementSyntax): any; - public visitVariableDeclaration(node: VariableDeclarationSyntax): any; - public visitVariableDeclarator(node: VariableDeclaratorSyntax): any; - public visitEqualsValueClause(node: EqualsValueClauseSyntax): any; - public visitPrefixUnaryExpression(node: PrefixUnaryExpressionSyntax): any; - public visitArrayLiteralExpression(node: ArrayLiteralExpressionSyntax): any; - public visitOmittedExpression(node: OmittedExpressionSyntax): any; - public visitParenthesizedExpression(node: ParenthesizedExpressionSyntax): any; - public visitSimpleArrowFunctionExpression(node: SimpleArrowFunctionExpressionSyntax): any; - public visitParenthesizedArrowFunctionExpression(node: ParenthesizedArrowFunctionExpressionSyntax): any; - public visitQualifiedName(node: QualifiedNameSyntax): any; - public visitTypeArgumentList(node: TypeArgumentListSyntax): any; - public visitConstructorType(node: ConstructorTypeSyntax): any; - public visitFunctionType(node: FunctionTypeSyntax): any; - public visitObjectType(node: ObjectTypeSyntax): any; - public visitArrayType(node: ArrayTypeSyntax): any; - public visitGenericType(node: GenericTypeSyntax): any; - public visitTypeQuery(node: TypeQuerySyntax): any; - public visitTypeAnnotation(node: TypeAnnotationSyntax): any; - public visitBlock(node: BlockSyntax): any; - public visitParameter(node: ParameterSyntax): any; - public visitMemberAccessExpression(node: MemberAccessExpressionSyntax): any; - public visitPostfixUnaryExpression(node: PostfixUnaryExpressionSyntax): any; - public visitElementAccessExpression(node: ElementAccessExpressionSyntax): any; - public visitInvocationExpression(node: InvocationExpressionSyntax): any; - public visitArgumentList(node: ArgumentListSyntax): any; - public visitBinaryExpression(node: BinaryExpressionSyntax): any; - public visitConditionalExpression(node: ConditionalExpressionSyntax): any; - public visitConstructSignature(node: ConstructSignatureSyntax): any; - public visitMethodSignature(node: MethodSignatureSyntax): any; - public visitIndexSignature(node: IndexSignatureSyntax): any; - public visitPropertySignature(node: PropertySignatureSyntax): any; - public visitCallSignature(node: CallSignatureSyntax): any; - public visitParameterList(node: ParameterListSyntax): any; - public visitTypeParameterList(node: TypeParameterListSyntax): any; - public visitTypeParameter(node: TypeParameterSyntax): any; - public visitConstraint(node: ConstraintSyntax): any; - public visitElseClause(node: ElseClauseSyntax): any; - public visitIfStatement(node: IfStatementSyntax): any; - public visitExpressionStatement(node: ExpressionStatementSyntax): any; - public visitConstructorDeclaration(node: ConstructorDeclarationSyntax): any; - public visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): any; - public visitGetAccessor(node: GetAccessorSyntax): any; - public visitSetAccessor(node: SetAccessorSyntax): any; - public visitMemberVariableDeclaration(node: MemberVariableDeclarationSyntax): any; - public visitIndexMemberDeclaration(node: IndexMemberDeclarationSyntax): any; - public visitThrowStatement(node: ThrowStatementSyntax): any; - public visitReturnStatement(node: ReturnStatementSyntax): any; - public visitObjectCreationExpression(node: ObjectCreationExpressionSyntax): any; - public visitSwitchStatement(node: SwitchStatementSyntax): any; - public visitCaseSwitchClause(node: CaseSwitchClauseSyntax): any; - public visitDefaultSwitchClause(node: DefaultSwitchClauseSyntax): any; - public visitBreakStatement(node: BreakStatementSyntax): any; - public visitContinueStatement(node: ContinueStatementSyntax): any; - public visitForStatement(node: ForStatementSyntax): any; - public visitForInStatement(node: ForInStatementSyntax): any; - public visitWhileStatement(node: WhileStatementSyntax): any; - public visitWithStatement(node: WithStatementSyntax): any; - public visitEnumDeclaration(node: EnumDeclarationSyntax): any; - public visitEnumElement(node: EnumElementSyntax): any; - public visitCastExpression(node: CastExpressionSyntax): any; - public visitObjectLiteralExpression(node: ObjectLiteralExpressionSyntax): any; - public visitSimplePropertyAssignment(node: SimplePropertyAssignmentSyntax): any; - public visitFunctionPropertyAssignment(node: FunctionPropertyAssignmentSyntax): any; - public visitFunctionExpression(node: FunctionExpressionSyntax): any; - public visitEmptyStatement(node: EmptyStatementSyntax): any; - public visitTryStatement(node: TryStatementSyntax): any; - public visitCatchClause(node: CatchClauseSyntax): any; - public visitFinallyClause(node: FinallyClauseSyntax): any; - public visitLabeledStatement(node: LabeledStatementSyntax): any; - public visitDoStatement(node: DoStatementSyntax): any; - public visitTypeOfExpression(node: TypeOfExpressionSyntax): any; - public visitDeleteExpression(node: DeleteExpressionSyntax): any; - public visitVoidExpression(node: VoidExpressionSyntax): any; - public visitDebuggerStatement(node: DebuggerStatementSyntax): any; - } -} -declare module TypeScript { - class SyntaxWalker implements ISyntaxVisitor { - public visitToken(token: ISyntaxToken): void; - public visitNode(node: SyntaxNode): void; - public visitNodeOrToken(nodeOrToken: ISyntaxNodeOrToken): void; - private visitOptionalToken(token); - public visitOptionalNode(node: SyntaxNode): void; - public visitOptionalNodeOrToken(nodeOrToken: ISyntaxNodeOrToken): void; - public visitList(list: ISyntaxList): void; - public visitSeparatedList(list: ISeparatedSyntaxList): void; - public visitSourceUnit(node: SourceUnitSyntax): void; - public visitExternalModuleReference(node: ExternalModuleReferenceSyntax): void; - public visitModuleNameModuleReference(node: ModuleNameModuleReferenceSyntax): void; - public visitImportDeclaration(node: ImportDeclarationSyntax): void; - public visitExportAssignment(node: ExportAssignmentSyntax): void; - public visitClassDeclaration(node: ClassDeclarationSyntax): void; - public visitInterfaceDeclaration(node: InterfaceDeclarationSyntax): void; - public visitHeritageClause(node: HeritageClauseSyntax): void; - public visitModuleDeclaration(node: ModuleDeclarationSyntax): void; - public visitFunctionDeclaration(node: FunctionDeclarationSyntax): void; - public visitVariableStatement(node: VariableStatementSyntax): void; - public visitVariableDeclaration(node: VariableDeclarationSyntax): void; - public visitVariableDeclarator(node: VariableDeclaratorSyntax): void; - public visitEqualsValueClause(node: EqualsValueClauseSyntax): void; - public visitPrefixUnaryExpression(node: PrefixUnaryExpressionSyntax): void; - public visitArrayLiteralExpression(node: ArrayLiteralExpressionSyntax): void; - public visitOmittedExpression(node: OmittedExpressionSyntax): void; - public visitParenthesizedExpression(node: ParenthesizedExpressionSyntax): void; - public visitSimpleArrowFunctionExpression(node: SimpleArrowFunctionExpressionSyntax): void; - public visitParenthesizedArrowFunctionExpression(node: ParenthesizedArrowFunctionExpressionSyntax): void; - public visitQualifiedName(node: QualifiedNameSyntax): void; - public visitTypeArgumentList(node: TypeArgumentListSyntax): void; - public visitConstructorType(node: ConstructorTypeSyntax): void; - public visitFunctionType(node: FunctionTypeSyntax): void; - public visitObjectType(node: ObjectTypeSyntax): void; - public visitArrayType(node: ArrayTypeSyntax): void; - public visitGenericType(node: GenericTypeSyntax): void; - public visitTypeQuery(node: TypeQuerySyntax): void; - public visitTypeAnnotation(node: TypeAnnotationSyntax): void; - public visitBlock(node: BlockSyntax): void; - public visitParameter(node: ParameterSyntax): void; - public visitMemberAccessExpression(node: MemberAccessExpressionSyntax): void; - public visitPostfixUnaryExpression(node: PostfixUnaryExpressionSyntax): void; - public visitElementAccessExpression(node: ElementAccessExpressionSyntax): void; - public visitInvocationExpression(node: InvocationExpressionSyntax): void; - public visitArgumentList(node: ArgumentListSyntax): void; - public visitBinaryExpression(node: BinaryExpressionSyntax): void; - public visitConditionalExpression(node: ConditionalExpressionSyntax): void; - public visitConstructSignature(node: ConstructSignatureSyntax): void; - public visitMethodSignature(node: MethodSignatureSyntax): void; - public visitIndexSignature(node: IndexSignatureSyntax): void; - public visitPropertySignature(node: PropertySignatureSyntax): void; - public visitCallSignature(node: CallSignatureSyntax): void; - public visitParameterList(node: ParameterListSyntax): void; - public visitTypeParameterList(node: TypeParameterListSyntax): void; - public visitTypeParameter(node: TypeParameterSyntax): void; - public visitConstraint(node: ConstraintSyntax): void; - public visitElseClause(node: ElseClauseSyntax): void; - public visitIfStatement(node: IfStatementSyntax): void; - public visitExpressionStatement(node: ExpressionStatementSyntax): void; - public visitConstructorDeclaration(node: ConstructorDeclarationSyntax): void; - public visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): void; - public visitGetAccessor(node: GetAccessorSyntax): void; - public visitSetAccessor(node: SetAccessorSyntax): void; - public visitMemberVariableDeclaration(node: MemberVariableDeclarationSyntax): void; - public visitIndexMemberDeclaration(node: IndexMemberDeclarationSyntax): void; - public visitThrowStatement(node: ThrowStatementSyntax): void; - public visitReturnStatement(node: ReturnStatementSyntax): void; - public visitObjectCreationExpression(node: ObjectCreationExpressionSyntax): void; - public visitSwitchStatement(node: SwitchStatementSyntax): void; - public visitCaseSwitchClause(node: CaseSwitchClauseSyntax): void; - public visitDefaultSwitchClause(node: DefaultSwitchClauseSyntax): void; - public visitBreakStatement(node: BreakStatementSyntax): void; - public visitContinueStatement(node: ContinueStatementSyntax): void; - public visitForStatement(node: ForStatementSyntax): void; - public visitForInStatement(node: ForInStatementSyntax): void; - public visitWhileStatement(node: WhileStatementSyntax): void; - public visitWithStatement(node: WithStatementSyntax): void; - public visitEnumDeclaration(node: EnumDeclarationSyntax): void; - public visitEnumElement(node: EnumElementSyntax): void; - public visitCastExpression(node: CastExpressionSyntax): void; - public visitObjectLiteralExpression(node: ObjectLiteralExpressionSyntax): void; - public visitSimplePropertyAssignment(node: SimplePropertyAssignmentSyntax): void; - public visitFunctionPropertyAssignment(node: FunctionPropertyAssignmentSyntax): void; - public visitFunctionExpression(node: FunctionExpressionSyntax): void; - public visitEmptyStatement(node: EmptyStatementSyntax): void; - public visitTryStatement(node: TryStatementSyntax): void; - public visitCatchClause(node: CatchClauseSyntax): void; - public visitFinallyClause(node: FinallyClauseSyntax): void; - public visitLabeledStatement(node: LabeledStatementSyntax): void; - public visitDoStatement(node: DoStatementSyntax): void; - public visitTypeOfExpression(node: TypeOfExpressionSyntax): void; - public visitDeleteExpression(node: DeleteExpressionSyntax): void; - public visitVoidExpression(node: VoidExpressionSyntax): void; - public visitDebuggerStatement(node: DebuggerStatementSyntax): void; - } -} -declare module TypeScript { - class PositionTrackingWalker extends SyntaxWalker { - private _position; - public visitToken(token: ISyntaxToken): void; - public position(): number; - public skip(element: ISyntaxElement): void; - } -} -declare module TypeScript { - interface ITokenInformation { - previousToken: ISyntaxToken; - nextToken: ISyntaxToken; - } - class SyntaxInformationMap extends SyntaxWalker { - private trackParents; - private trackPreviousToken; - private tokenToInformation; - private elementToPosition; - private _previousToken; - private _previousTokenInformation; - private _currentPosition; - private _elementToParent; - private _parentStack; - constructor(trackParents: boolean, trackPreviousToken: boolean); - static create(node: SyntaxNode, trackParents: boolean, trackPreviousToken: boolean): SyntaxInformationMap; - public visitNode(node: SyntaxNode): void; - public visitToken(token: ISyntaxToken): void; - public parent(element: ISyntaxElement): SyntaxNode; - public fullStart(element: ISyntaxElement): number; - public start(element: ISyntaxElement): number; - public end(element: ISyntaxElement): number; - public previousToken(token: ISyntaxToken): ISyntaxToken; - public tokenInformation(token: ISyntaxToken): ITokenInformation; - public firstTokenInLineContainingToken(token: ISyntaxToken): ISyntaxToken; - public isFirstTokenInLine(token: ISyntaxToken): boolean; - private isFirstTokenInLineWorker(information); - } -} -declare module TypeScript { - class SyntaxNodeInvariantsChecker extends SyntaxWalker { - private tokenTable; - static checkInvariants(node: SyntaxNode): void; - public visitToken(token: ISyntaxToken): void; - } -} -declare module TypeScript { - class DepthLimitedWalker extends PositionTrackingWalker { - private _depth; - private _maximumDepth; - constructor(maximumDepth: number); - public visitNode(node: SyntaxNode): void; - } -} -declare module TypeScript.Parser { - function parse(fileName: string, text: ISimpleText, isDeclaration: boolean, options: ParseOptions): SyntaxTree; - function incrementalParse(oldSyntaxTree: SyntaxTree, textChangeRange: TextChangeRange, newText: ISimpleText): SyntaxTree; -} -declare module TypeScript { - class SyntaxTree { - private _sourceUnit; - private _isDeclaration; - private _parserDiagnostics; - private _allDiagnostics; - private _fileName; - private _lineMap; - private _parseOptions; - constructor(sourceUnit: SourceUnitSyntax, isDeclaration: boolean, diagnostics: Diagnostic[], fileName: string, lineMap: LineMap, parseOtions: ParseOptions); - public toJSON(key: any): any; - public sourceUnit(): SourceUnitSyntax; - public isDeclaration(): boolean; - private computeDiagnostics(); - public diagnostics(): Diagnostic[]; - public fileName(): string; - public lineMap(): LineMap; - public parseOptions(): ParseOptions; - public structuralEquals(tree: SyntaxTree): boolean; - } -} -declare module TypeScript { - class Unicode { - static unicodeES3IdentifierStart: number[]; - static unicodeES3IdentifierPart: number[]; - static unicodeES5IdentifierStart: number[]; - static unicodeES5IdentifierPart: number[]; - static lookupInUnicodeMap(code: number, map: number[]): boolean; - static isIdentifierStart(code: number, languageVersion: LanguageVersion): boolean; - static isIdentifierPart(code: number, languageVersion: LanguageVersion): boolean; - } -} -declare module TypeScript { - module CompilerDiagnostics { - var debug: boolean; - interface IDiagnosticWriter { - Alert(output: string): void; - } - var diagnosticWriter: IDiagnosticWriter; - var analysisPass: number; - function Alert(output: string): void; - function debugPrint(s: string): void; - function assert(condition: boolean, s: string): void; - } - interface ILogger { - information(): boolean; - debug(): boolean; - warning(): boolean; - error(): boolean; - fatal(): boolean; - log(s: string): void; - } - class NullLogger implements ILogger { - public information(): boolean; - public debug(): boolean; - public warning(): boolean; - public error(): boolean; - public fatal(): boolean; - public log(s: string): void; - } - function timeFunction(logger: ILogger, funcDescription: string, func: () => any): any; -} -declare module TypeScript { - class Document { - private _compiler; - private _semanticInfoChain; - public fileName: string; - public referencedFiles: string[]; - private _scriptSnapshot; - public byteOrderMark: ByteOrderMark; - public version: number; - public isOpen: boolean; - private _syntaxTree; - private _topLevelDecl; - private _diagnostics; - private _bloomFilter; - private _sourceUnit; - private _lineMap; - private _declASTMap; - private _astDeclMap; - private _amdDependencies; - private _externalModuleIndicatorSpan; - constructor(_compiler: TypeScriptCompiler, _semanticInfoChain: SemanticInfoChain, fileName: string, referencedFiles: string[], _scriptSnapshot: IScriptSnapshot, byteOrderMark: ByteOrderMark, version: number, isOpen: boolean, _syntaxTree: SyntaxTree, _topLevelDecl: PullDecl); - public invalidate(): void; - public isDeclareFile(): boolean; - private cacheSyntaxTreeInfo(syntaxTree); - private getAmdDependency(comment); - private getImplicitImportSpan(sourceUnitLeadingTrivia); - private getImplicitImportSpanWorker(trivia, position); - private getTopLevelImportOrExportSpan(node); - public sourceUnit(): SourceUnit; - public diagnostics(): Diagnostic[]; - public lineMap(): LineMap; - public isExternalModule(): boolean; - public externalModuleIndicatorSpan(): TextSpan; - public amdDependencies(): string[]; - public syntaxTree(): SyntaxTree; - public bloomFilter(): BloomFilter; - public emitToOwnOutputFile(): boolean; - public update(scriptSnapshot: IScriptSnapshot, version: number, isOpen: boolean, textChangeRange: TextChangeRange): Document; - static create(compiler: TypeScriptCompiler, semanticInfoChain: SemanticInfoChain, fileName: string, scriptSnapshot: IScriptSnapshot, byteOrderMark: ByteOrderMark, version: number, isOpen: boolean, referencedFiles: string[]): Document; - public topLevelDecl(): PullDecl; - public _getDeclForAST(ast: AST): PullDecl; - public getEnclosingDecl(ast: AST): PullDecl; - public _setDeclForAST(ast: AST, decl: PullDecl): void; - public _getASTForDecl(decl: PullDecl): AST; - public _setASTForDecl(decl: PullDecl, ast: AST): void; - } -} -declare module TypeScript { - function hasFlag(val: number, flag: number): boolean; - enum TypeRelationshipFlags { - SuccessfulComparison = 0, - RequiredPropertyIsMissing = 2, - IncompatibleSignatures = 4, - SourceSignatureHasTooManyParameters = 3, - IncompatibleReturnTypes = 16, - IncompatiblePropertyTypes = 32, - IncompatibleParameterTypes = 64, - InconsistantPropertyAccesibility = 128, - } - enum ModuleGenTarget { - Unspecified = 0, - Synchronous = 1, - Asynchronous = 2, - } -} -declare module TypeScript { - function createIntrinsicsObject(): IIndexable; - interface IHashTable { - getAllKeys(): string[]; - add(key: string, data: T): boolean; - addOrUpdate(key: string, data: T): boolean; - map(fn: (k: string, value: T, context: any) => void, context: any): void; - every(fn: (k: string, value: T, context: any) => void, context: any): boolean; - some(fn: (k: string, value: T, context: any) => void, context: any): boolean; - count(): number; - lookup(key: string): T; - } - class StringHashTable implements IHashTable { - private itemCount; - private table; - public getAllKeys(): string[]; - public add(key: string, data: T): boolean; - public addOrUpdate(key: string, data: T): boolean; - public map(fn: (k: string, value: T, context: any) => void, context: any): void; - public every(fn: (k: string, value: T, context: any) => void, context: any): boolean; - public some(fn: (k: string, value: T, context: any) => void, context: any): boolean; - public count(): number; - public lookup(key: string): T; - public remove(key: string): void; - } - class IdentiferNameHashTable extends StringHashTable { - public getAllKeys(): string[]; - public add(key: string, data: T): boolean; - public addOrUpdate(key: string, data: T): boolean; - public map(fn: (k: string, value: T, context: any) => void, context: any): void; - public every(fn: (k: string, value: T, context: any) => void, context: any): boolean; - public some(fn: (k: string, value: any, context: any) => void, context: any): boolean; - public lookup(key: string): T; - } -} -declare module TypeScript { - interface IParameters { - length: number; - lastParameterIsRest(): boolean; - ast: AST; - astAt(index: number): AST; - identifierAt(index: number): Identifier; - typeAt(index: number): AST; - initializerAt(index: number): EqualsValueClause; - isOptionalAt(index: number): boolean; - } -} -declare module TypeScript.ASTHelpers { - function scriptIsElided(sourceUnit: SourceUnit): boolean; - function moduleIsElided(declaration: ModuleDeclaration): boolean; - function enumIsElided(declaration: EnumDeclaration): boolean; - function isValidAstNode(ast: IASTSpan): boolean; - function getAstAtPosition(script: AST, pos: number, useTrailingTriviaAsLimChar?: boolean, forceInclusive?: boolean): AST; - function getExtendsHeritageClause(clauses: ISyntaxList2): HeritageClause; - function getImplementsHeritageClause(clauses: ISyntaxList2): HeritageClause; - function isCallExpression(ast: AST): boolean; - function isCallExpressionTarget(ast: AST): boolean; - function isDeclarationASTOrDeclarationNameAST(ast: AST): boolean; - function getEnclosingParameterForInitializer(ast: AST): Parameter; - function getEnclosingMemberVariableDeclaration(ast: AST): MemberVariableDeclaration; - function isNameOfFunction(ast: AST): boolean; - function isNameOfMemberFunction(ast: AST): boolean; - function isNameOfMemberAccessExpression(ast: AST): boolean; - function isRightSideOfQualifiedName(ast: AST): boolean; - function parentIsModuleDeclaration(ast: AST): boolean; - function parametersFromIdentifier(id: Identifier): IParameters; - function parametersFromParameter(parameter: Parameter): IParameters; - function parametersFromParameterList(list: ParameterList): IParameters; - function isDeclarationAST(ast: AST): boolean; - function docComments(ast: AST): Comment[]; - function getParameterList(ast: AST): ParameterList; - function getType(ast: AST): AST; - function getVariableDeclaratorModifiers(variableDeclarator: VariableDeclarator): PullElementFlags[]; - function isIntegerLiteralAST(expression: AST): boolean; - function getEnclosingModuleDeclaration(ast: AST): ModuleDeclaration; - function getModuleDeclarationFromNameAST(ast: AST): ModuleDeclaration; - function isLastNameOfModule(ast: ModuleDeclaration, astName: AST): boolean; - function getNameOfIdenfierOrQualifiedName(name: AST): string; - function getModuleNames(name: AST, result?: Identifier[]): Identifier[]; -} -declare module TypeScript { - class AstWalkOptions { - public goChildren: boolean; - public stopWalking: boolean; - } - interface IAstWalker { - options: AstWalkOptions; - state: any; - } - class AstWalkerFactory { - public walk(ast: AST, pre: (ast: AST, walker: IAstWalker) => void, post?: (ast: AST, walker: IAstWalker) => void, state?: any): void; - public simpleWalk(ast: AST, pre: (ast: AST, state: any) => void, post?: (ast: AST, state: any) => void, state?: any): void; - } - function getAstWalkerFactory(): AstWalkerFactory; -} -declare module TypeScript { - class Base64VLQFormat { - static encode(inValue: number): string; - static decode(inString: string): { - value: number; - rest: string; - }; - } -} -declare module TypeScript { - class SourceMapPosition { - public sourceLine: number; - public sourceColumn: number; - public emittedLine: number; - public emittedColumn: number; - } - class SourceMapping { - public start: SourceMapPosition; - public end: SourceMapPosition; - public nameIndex: number; - public childMappings: SourceMapping[]; - } - class SourceMapEntry { - public emittedFile: string; - public emittedLine: number; - public emittedColumn: number; - public sourceFile: string; - public sourceLine: number; - public sourceColumn: number; - public sourceName: string; - constructor(emittedFile: string, emittedLine: number, emittedColumn: number, sourceFile: string, sourceLine: number, sourceColumn: number, sourceName: string); - } - class SourceMapper { - private jsFile; - private sourceMapOut; - static MapFileExtension: string; - private jsFileName; - private sourceMapPath; - private sourceMapDirectory; - private sourceRoot; - public names: string[]; - private mappingLevel; - private tsFilePaths; - private allSourceMappings; - public currentMappings: SourceMapping[][]; - public currentNameIndex: number[]; - private sourceMapEntries; - constructor(jsFile: TextWriter, sourceMapOut: TextWriter, document: Document, jsFilePath: string, emitOptions: EmitOptions, resolvePath: (path: string) => string); - public getOutputFile(): OutputFile; - public increaseMappingLevel(ast: IASTSpan): void; - public decreaseMappingLevel(ast: IASTSpan): void; - public setNewSourceFile(document: Document, emitOptions: EmitOptions): void; - private setSourceMapOptions(document, jsFilePath, emitOptions, resolvePath); - private setNewSourceFilePath(document, emitOptions); - public emitSourceMapping(): void; - } -} -declare module TypeScript { - enum EmitContainer { - Prog = 0, - Module = 1, - DynamicModule = 2, - Class = 3, - Constructor = 4, - Function = 5, - Args = 6, - Interface = 7, - } - class EmitState { - public column: number; - public line: number; - public container: EmitContainer; - constructor(); - } - class EmitOptions { - public resolvePath: (path: string) => string; - private _diagnostic; - private _settings; - private _commonDirectoryPath; - private _sharedOutputFile; - private _sourceRootDirectory; - private _sourceMapRootDirectory; - private _outputDirectory; - public diagnostic(): Diagnostic; - public commonDirectoryPath(): string; - public sharedOutputFile(): string; - public sourceRootDirectory(): string; - public sourceMapRootDirectory(): string; - public outputDirectory(): string; - public compilationSettings(): ImmutableCompilationSettings; - constructor(compiler: TypeScriptCompiler, resolvePath: (path: string) => string); - private determineCommonDirectoryPath(compiler); - } - class Indenter { - static indentStep: number; - static indentStepString: string; - static indentStrings: string[]; - public indentAmt: number; - public increaseIndent(): void; - public decreaseIndent(): void; - public getIndent(): string; - } - function lastParameterIsRest(parameterList: ParameterList): boolean; - class Emitter { - public emittingFileName: string; - public outfile: TextWriter; - public emitOptions: EmitOptions; - private semanticInfoChain; - public globalThisCapturePrologueEmitted: boolean; - public extendsPrologueEmitted: boolean; - public thisClassNode: ClassDeclaration; - public inArrowFunction: boolean; - public moduleName: string; - public emitState: EmitState; - public indenter: Indenter; - public sourceMapper: SourceMapper; - public captureThisStmtString: string; - private currentVariableDeclaration; - private declStack; - private exportAssignment; - private inWithBlock; - public document: Document; - private detachedCommentsElement; - constructor(emittingFileName: string, outfile: TextWriter, emitOptions: EmitOptions, semanticInfoChain: SemanticInfoChain); - private pushDecl(decl); - private popDecl(decl); - private getEnclosingDecl(); - public setExportAssignment(exportAssignment: ExportAssignment): void; - public getExportAssignment(): ExportAssignment; - public setDocument(document: Document): void; - public shouldEmitImportDeclaration(importDeclAST: ImportDeclaration): boolean; - public emitImportDeclaration(importDeclAST: ImportDeclaration): void; - public createSourceMapper(document: Document, jsFileName: string, jsFile: TextWriter, sourceMapOut: TextWriter, resolvePath: (path: string) => string): void; - public setSourceMapperNewSourceFile(document: Document): void; - private updateLineAndColumn(s); - public writeToOutputWithSourceMapRecord(s: string, astSpan: IASTSpan): void; - public writeToOutput(s: string): void; - public writeLineToOutput(s: string, force?: boolean): void; - public writeCaptureThisStatement(ast: AST): void; - public setContainer(c: number): number; - private getIndentString(); - public emitIndent(): void; - public emitComment(comment: Comment, trailing: boolean, first: boolean): void; - public emitComments(ast: AST, pre: boolean, onlyPinnedOrTripleSlashComments?: boolean): void; - private isPinnedOrTripleSlash(comment); - public emitCommentsArray(comments: Comment[], trailing: boolean): void; - public emitObjectLiteralExpression(objectLiteral: ObjectLiteralExpression): void; - public emitArrayLiteralExpression(arrayLiteral: ArrayLiteralExpression): void; - public emitObjectCreationExpression(objectCreationExpression: ObjectCreationExpression): void; - public getConstantDecl(dotExpr: MemberAccessExpression): PullEnumElementDecl; - public tryEmitConstant(dotExpr: MemberAccessExpression): boolean; - public emitInvocationExpression(callNode: InvocationExpression): void; - private emitParameterList(list); - private emitFunctionParameters(parameters); - private emitFunctionBodyStatements(name, funcDecl, parameterList, block, bodyExpression); - private emitDefaultValueAssignments(parameters); - private emitRestParameterInitializer(parameters); - private getImportDecls(fileName); - public getModuleImportAndDependencyList(sourceUnit: SourceUnit): { - importList: string; - dependencyList: string; - }; - public shouldCaptureThis(ast: AST): boolean; - public emitEnum(moduleDecl: EnumDeclaration): void; - private getModuleDeclToVerifyChildNameCollision(moduleDecl, changeNameIfAnyDeclarationInContext); - private hasChildNameCollision(moduleName, parentDecl); - private getModuleName(moduleDecl, changeNameIfAnyDeclarationInContext?); - private emitModuleDeclarationWorker(moduleDecl); - public emitSingleModuleDeclaration(moduleDecl: ModuleDeclaration, moduleName: IASTToken): void; - public emitEnumElement(varDecl: EnumElement): void; - public emitElementAccessExpression(expression: ElementAccessExpression): void; - public emitSimpleArrowFunctionExpression(arrowFunction: SimpleArrowFunctionExpression): void; - public emitParenthesizedArrowFunctionExpression(arrowFunction: ParenthesizedArrowFunctionExpression): void; - private emitAnyArrowFunctionExpression(arrowFunction, funcName, parameters, block, expression); - public emitConstructor(funcDecl: ConstructorDeclaration): void; - public emitGetAccessor(accessor: GetAccessor): void; - public emitSetAccessor(accessor: SetAccessor): void; - public emitFunctionExpression(funcDecl: FunctionExpression): void; - public emitFunction(funcDecl: FunctionDeclaration): void; - public emitAmbientVarDecl(varDecl: VariableDeclarator): void; - public emitVarDeclVar(): void; - public emitVariableDeclaration(declaration: VariableDeclaration): void; - private emitMemberVariableDeclaration(varDecl); - public emitVariableDeclarator(varDecl: VariableDeclarator): void; - private symbolIsUsedInItsEnclosingContainer(symbol, dynamic?); - private shouldQualifySymbolNameWithParentName(symbol); - private getSymbolForEmit(ast); - public emitName(name: Identifier, addThis: boolean): void; - public recordSourceMappingNameStart(name: string): void; - public recordSourceMappingNameEnd(): void; - public recordSourceMappingStart(ast: IASTSpan): void; - public recordSourceMappingEnd(ast: IASTSpan): void; - public getOutputFiles(): OutputFile[]; - private emitParameterPropertyAndMemberVariableAssignments(); - private isOnSameLine(pos1, pos2); - private emitCommaSeparatedList(parent, list, buffer, preserveNewLines); - public emitList(list: ISyntaxList2, useNewLineSeparator?: boolean, startInclusive?: number, endExclusive?: number): void; - public emitSeparatedList(list: ISeparatedSyntaxList2, useNewLineSeparator?: boolean, startInclusive?: number, endExclusive?: number): void; - private isDirectivePrologueElement(node); - public emitSpaceBetweenConstructs(node1: AST, node2: AST): void; - private getDetachedComments(element); - private emitPossibleCopyrightHeaders(script); - private emitDetachedComments(list); - public emitScriptElements(sourceUnit: SourceUnit): void; - public emitConstructorStatements(funcDecl: ConstructorDeclaration): void; - public emitJavascript(ast: AST, startLine: boolean): void; - public emitAccessorMemberDeclaration(funcDecl: AST, name: IASTToken, className: string, isProto: boolean): void; - private emitAccessorBody(funcDecl, parameterList, block); - public emitClass(classDecl: ClassDeclaration): void; - private emitClassMembers(classDecl); - private emitClassMemberFunctionDeclaration(classDecl, funcDecl); - private requiresExtendsBlock(moduleElements); - public emitPrologue(sourceUnit: SourceUnit): void; - public emitThis(): void; - public emitBlockOrStatement(node: AST): void; - public emitLiteralExpression(expression: LiteralExpression): void; - public emitThisExpression(expression: ThisExpression): void; - public emitSuperExpression(expression: SuperExpression): void; - public emitParenthesizedExpression(parenthesizedExpression: ParenthesizedExpression): void; - public emitCastExpression(expression: CastExpression): void; - public emitPrefixUnaryExpression(expression: PrefixUnaryExpression): void; - public emitPostfixUnaryExpression(expression: PostfixUnaryExpression): void; - public emitTypeOfExpression(expression: TypeOfExpression): void; - public emitDeleteExpression(expression: DeleteExpression): void; - public emitVoidExpression(expression: VoidExpression): void; - private canEmitDottedNameMemberAccessExpression(expression); - private emitDottedNameMemberAccessExpression(expression); - private emitDottedNameMemberAccessExpressionRecurse(expression); - public emitMemberAccessExpression(expression: MemberAccessExpression): void; - public emitQualifiedName(name: QualifiedName): void; - public emitBinaryExpression(expression: BinaryExpression): void; - public emitSimplePropertyAssignment(property: SimplePropertyAssignment): void; - public emitFunctionPropertyAssignment(funcProp: FunctionPropertyAssignment): void; - public emitConditionalExpression(expression: ConditionalExpression): void; - public emitThrowStatement(statement: ThrowStatement): void; - public emitExpressionStatement(statement: ExpressionStatement): void; - public emitLabeledStatement(statement: LabeledStatement): void; - public emitBlock(block: Block): void; - public emitBreakStatement(jump: BreakStatement): void; - public emitContinueStatement(jump: ContinueStatement): void; - public emitWhileStatement(statement: WhileStatement): void; - public emitDoStatement(statement: DoStatement): void; - public emitIfStatement(statement: IfStatement): void; - public emitElseClause(elseClause: ElseClause): void; - public emitReturnStatement(statement: ReturnStatement): void; - public emitForInStatement(statement: ForInStatement): void; - public emitForStatement(statement: ForStatement): void; - public emitWithStatement(statement: WithStatement): void; - public emitSwitchStatement(statement: SwitchStatement): void; - public emitCaseSwitchClause(clause: CaseSwitchClause): void; - private emitSwitchClauseBody(body); - public emitDefaultSwitchClause(clause: DefaultSwitchClause): void; - public emitTryStatement(statement: TryStatement): void; - public emitCatchClause(clause: CatchClause): void; - public emitFinallyClause(clause: FinallyClause): void; - public emitDebuggerStatement(statement: DebuggerStatement): void; - public emitNumericLiteral(literal: NumericLiteral): void; - public emitRegularExpressionLiteral(literal: RegularExpressionLiteral): void; - public emitStringLiteral(literal: StringLiteral): void; - public emitEqualsValueClause(clause: EqualsValueClause): void; - public emitParameter(parameter: Parameter): void; - public emitConstructorDeclaration(declaration: ConstructorDeclaration): void; - public shouldEmitFunctionDeclaration(declaration: FunctionDeclaration): boolean; - public emitFunctionDeclaration(declaration: FunctionDeclaration): void; - private emitSourceUnit(sourceUnit); - public shouldEmitEnumDeclaration(declaration: EnumDeclaration): boolean; - public emitEnumDeclaration(declaration: EnumDeclaration): void; - public shouldEmitModuleDeclaration(declaration: ModuleDeclaration): boolean; - private emitModuleDeclaration(declaration); - public shouldEmitClassDeclaration(declaration: ClassDeclaration): boolean; - public emitClassDeclaration(declaration: ClassDeclaration): void; - public shouldEmitInterfaceDeclaration(declaration: InterfaceDeclaration): boolean; - public emitInterfaceDeclaration(declaration: InterfaceDeclaration): void; - private firstVariableDeclarator(statement); - private isNotAmbientOrHasInitializer(variableStatement); - public shouldEmitVariableStatement(statement: VariableStatement): boolean; - public emitVariableStatement(statement: VariableStatement): void; - public emitGenericType(type: GenericType): void; - private shouldEmit(ast); - private emit(ast); - private emitWorker(ast); - } - function getLastConstructor(classDecl: ClassDeclaration): ConstructorDeclaration; - function getTrimmedTextLines(comment: Comment): string[]; -} -declare module TypeScript { - class MemberName { - public prefix: string; - public suffix: string; - public isString(): boolean; - public isArray(): boolean; - public isMarker(): boolean; - public toString(): string; - static memberNameToString(memberName: MemberName, markerInfo?: number[], markerBaseLength?: number): string; - static create(text: string): MemberName; - static create(entry: MemberName, prefix: string, suffix: string): MemberName; - } - class MemberNameString extends MemberName { - public text: string; - constructor(text: string); - public isString(): boolean; - } - class MemberNameArray extends MemberName { - public delim: string; - public entries: MemberName[]; - public isArray(): boolean; - public add(entry: MemberName): void; - public addAll(entries: MemberName[]): void; - constructor(); - } -} -declare module TypeScript { - function stripStartAndEndQuotes(str: string): string; - function isSingleQuoted(str: string): boolean; - function isDoubleQuoted(str: string): boolean; - function isQuoted(str: string): boolean; - function quoteStr(str: string): string; - function switchToForwardSlashes(path: string): string; - function trimModName(modName: string): string; - function getDeclareFilePath(fname: string): string; - function isTSFile(fname: string): boolean; - function isDTSFile(fname: string): boolean; - function getPrettyName(modPath: string, quote?: boolean, treatAsFileName?: boolean): any; - function getPathComponents(path: string): string[]; - function getRelativePathToFixedPath(fixedModFilePath: string, absoluteModPath: string, isAbsoultePathURL?: boolean): string; - function changePathToDTS(modPath: string): string; - function isRelative(path: string): boolean; - function isRooted(path: string): boolean; - function getRootFilePath(outFname: string): string; - function filePathComponents(fullPath: string): string[]; - function filePath(fullPath: string): string; - function convertToDirectoryPath(dirPath: string): string; - function normalizePath(path: string): string; -} -declare module TypeScript { - interface IFileReference extends ILineAndCharacter { - path: string; - isResident: boolean; - position: number; - length: number; - } -} -declare module TypeScript { - interface IPreProcessedFileInfo { - referencedFiles: IFileReference[]; - importedFiles: IFileReference[]; - diagnostics: Diagnostic[]; - isLibFile: boolean; - } - var tripleSlashReferenceRegExp: RegExp; - function preProcessFile(fileName: string, sourceText: IScriptSnapshot, readImportFiles?: boolean): IPreProcessedFileInfo; - function getParseOptions(settings: ImmutableCompilationSettings): ParseOptions; - function getReferencedFiles(fileName: string, sourceText: IScriptSnapshot): IFileReference[]; -} -declare module TypeScript { - interface IResolvedFile { - path: string; - referencedFiles: string[]; - importedFiles: string[]; - } - interface IReferenceResolverHost { - getScriptSnapshot(fileName: string): IScriptSnapshot; - resolveRelativePath(path: string, directory: string): string; - fileExists(path: string): boolean; - directoryExists(path: string): boolean; - getParentDirectory(path: string): string; - } - class ReferenceResolutionResult { - public resolvedFiles: IResolvedFile[]; - public diagnostics: Diagnostic[]; - public seenNoDefaultLibTag: boolean; - } - class ReferenceResolver { - private useCaseSensitiveFileResolution; - private inputFileNames; - private host; - private visited; - constructor(inputFileNames: string[], host: IReferenceResolverHost, useCaseSensitiveFileResolution: boolean); - static resolve(inputFileNames: string[], host: IReferenceResolverHost, useCaseSensitiveFileResolution: boolean): ReferenceResolutionResult; - public resolveInputFiles(): ReferenceResolutionResult; - private resolveIncludedFile(path, referenceLocation, resolutionResult); - private resolveImportedFile(path, referenceLocation, resolutionResult); - private resolveFile(normalizedPath, resolutionResult); - private getNormalizedFilePath(path, parentFilePath); - private getUniqueFileId(filePath); - private recordVisitedFile(filePath); - private isVisited(filePath); - private isSameFile(filePath1, filePath2); - } -} -declare module TypeScript { - class TextWriter { - private name; - private writeByteOrderMark; - private outputFileType; - private contents; - public onNewLine: boolean; - constructor(name: string, writeByteOrderMark: boolean, outputFileType: OutputFileType); - public Write(s: string): void; - public WriteLine(s: string): void; - public Close(): void; - public getOutputFile(): OutputFile; - } - class DeclarationEmitter { - private emittingFileName; - public document: Document; - private compiler; - private emitOptions; - private semanticInfoChain; - private declFile; - private indenter; - private emittedReferencePaths; - constructor(emittingFileName: string, document: Document, compiler: TypeScriptCompiler, emitOptions: EmitOptions, semanticInfoChain: SemanticInfoChain); - public getOutputFile(): OutputFile; - public emitDeclarations(sourceUnit: SourceUnit): void; - private emitDeclarationsForList(list); - private emitSeparatedList(list); - private emitDeclarationsForAST(ast); - private getIndentString(declIndent?); - private emitIndent(); - private canEmitDeclarations(declAST); - private getDeclFlagsString(pullDecl, typeString); - private emitDeclFlags(declarationAST, typeString); - private emitTypeNamesMember(memberName, emitIndent?); - private emitTypeSignature(ast, type); - private emitComment(comment); - private emitDeclarationComments(ast, endLine?); - private writeDeclarationComments(declComments, endLine?); - private emitTypeOfVariableDeclaratorOrParameter(boundDecl); - private emitPropertySignature(varDecl); - private emitVariableDeclarator(varDecl, isFirstVarInList, isLastVarInList); - private emitClassElementModifiers(modifiers); - private emitDeclarationsForMemberVariableDeclaration(varDecl); - private emitDeclarationsForVariableStatement(variableStatement); - private emitDeclarationsForVariableDeclaration(variableDeclaration); - private emitArgDecl(argDecl, id, isOptional, isPrivate); - private isOverloadedCallSignature(funcDecl); - private emitDeclarationsForConstructorDeclaration(funcDecl); - private emitParameterList(isPrivate, parameterList); - private emitParameters(isPrivate, parameterList); - private emitMemberFunctionDeclaration(funcDecl); - private emitCallSignature(funcDecl); - private emitConstructSignature(funcDecl); - private emitMethodSignature(funcDecl); - private emitDeclarationsForFunctionDeclaration(funcDecl); - private emitIndexMemberDeclaration(funcDecl); - private emitIndexSignature(funcDecl); - private emitBaseList(bases, useExtendsList); - private emitAccessorDeclarationComments(funcDecl); - private emitDeclarationsForGetAccessor(funcDecl); - private emitDeclarationsForSetAccessor(funcDecl); - private emitMemberAccessorDeclaration(funcDecl, modifiers, name); - private emitClassMembersFromConstructorDefinition(funcDecl); - private emitDeclarationsForClassDeclaration(classDecl); - private emitHeritageClauses(clauses); - private emitHeritageClause(clause); - static getEnclosingContainer(ast: AST): AST; - private emitTypeParameters(typeParams, funcSignature?); - private emitDeclarationsForInterfaceDeclaration(interfaceDecl); - private emitDeclarationsForImportDeclaration(importDeclAST); - private emitDeclarationsForEnumDeclaration(moduleDecl); - private emitDeclarationsForModuleDeclaration(moduleDecl); - private emitDeclarationsForExportAssignment(ast); - private resolveScriptReference(document, reference); - private emitReferencePaths(sourceUnit); - private emitDeclarationsForSourceUnit(sourceUnit); - } -} -declare module TypeScript { - class BloomFilter { - private bitArray; - private hashFunctionCount; - static falsePositiveProbability: number; - constructor(expectedCount: number); - static computeM(expectedCount: number): number; - static computeK(expectedCount: number): number; - private computeHash(key, seed); - public addKeys(keys: IIndexable): void; - public add(value: string): void; - public probablyContains(value: string): boolean; - public isEquivalent(filter: BloomFilter): boolean; - static isEquivalent(array1: boolean[], array2: boolean[]): boolean; - } -} -declare module TypeScript { - class IdentifierWalker extends SyntaxWalker { - public list: IIndexable; - constructor(list: IIndexable); - public visitToken(token: ISyntaxToken): void; - } -} -declare module TypeScript { - class CompilationSettings { - public propagateEnumConstants: boolean; - public removeComments: boolean; - public watch: boolean; - public noResolve: boolean; - public allowAutomaticSemicolonInsertion: boolean; - public noImplicitAny: boolean; - public noLib: boolean; - public codeGenTarget: LanguageVersion; - public moduleGenTarget: ModuleGenTarget; - public outFileOption: string; - public outDirOption: string; - public mapSourceFiles: boolean; - public mapRoot: string; - public sourceRoot: string; - public generateDeclarationFiles: boolean; - public useCaseSensitiveFileResolution: boolean; - public gatherDiagnostics: boolean; - public codepage: number; - public createFileLog: boolean; - } - class ImmutableCompilationSettings { - private static _defaultSettings; - private _propagateEnumConstants; - private _removeComments; - private _watch; - private _noResolve; - private _allowAutomaticSemicolonInsertion; - private _noImplicitAny; - private _noLib; - private _codeGenTarget; - private _moduleGenTarget; - private _outFileOption; - private _outDirOption; - private _mapSourceFiles; - private _mapRoot; - private _sourceRoot; - private _generateDeclarationFiles; - private _useCaseSensitiveFileResolution; - private _gatherDiagnostics; - private _codepage; - private _createFileLog; - public propagateEnumConstants(): boolean; - public removeComments(): boolean; - public watch(): boolean; - public noResolve(): boolean; - public allowAutomaticSemicolonInsertion(): boolean; - public noImplicitAny(): boolean; - public noLib(): boolean; - public codeGenTarget(): LanguageVersion; - public moduleGenTarget(): ModuleGenTarget; - public outFileOption(): string; - public outDirOption(): string; - public mapSourceFiles(): boolean; - public mapRoot(): string; - public sourceRoot(): string; - public generateDeclarationFiles(): boolean; - public useCaseSensitiveFileResolution(): boolean; - public gatherDiagnostics(): boolean; - public codepage(): number; - public createFileLog(): boolean; - constructor(propagateEnumConstants: boolean, removeComments: boolean, watch: boolean, noResolve: boolean, allowAutomaticSemicolonInsertion: boolean, noImplicitAny: boolean, noLib: boolean, codeGenTarget: LanguageVersion, moduleGenTarget: ModuleGenTarget, outFileOption: string, outDirOption: string, mapSourceFiles: boolean, mapRoot: string, sourceRoot: string, generateDeclarationFiles: boolean, useCaseSensitiveFileResolution: boolean, gatherDiagnostics: boolean, codepage: number, createFileLog: boolean); - static defaultSettings(): ImmutableCompilationSettings; - static fromCompilationSettings(settings: CompilationSettings): ImmutableCompilationSettings; - public toCompilationSettings(): any; - } -} -declare module TypeScript { - enum PullElementFlags { - None = 0, - Exported = 1, - Private = 2, - Public = 4, - Ambient = 8, - Static = 16, - Optional = 128, - Signature = 2048, - Enum = 4096, - ArrowFunction = 8192, - ClassConstructorVariable = 16384, - InitializedModule = 32768, - InitializedDynamicModule = 65536, - MustCaptureThis = 262144, - DeclaredInAWithBlock = 2097152, - HasReturnStatement = 4194304, - PropertyParameter = 8388608, - IsAnnotatedWithAny = 16777216, - HasDefaultArgs = 33554432, - ConstructorParameter = 67108864, - ImplicitVariable = 118784, - SomeInitializedModule = 102400, - } - function hasModifier(modifiers: PullElementFlags[], flag: PullElementFlags): boolean; - enum PullElementKind { - None = 0, - Global = 0, - Script = 1, - Primitive = 2, - Container = 4, - Class = 8, - Interface = 16, - DynamicModule = 32, - Enum = 64, - TypeAlias = 128, - ObjectLiteral = 256, - Variable = 512, - CatchVariable = 1024, - Parameter = 2048, - Property = 4096, - TypeParameter = 8192, - Function = 16384, - ConstructorMethod = 32768, - Method = 65536, - FunctionExpression = 131072, - GetAccessor = 262144, - SetAccessor = 524288, - CallSignature = 1048576, - ConstructSignature = 2097152, - IndexSignature = 4194304, - ObjectType = 8388608, - FunctionType = 16777216, - ConstructorType = 33554432, - EnumMember = 67108864, - WithBlock = 134217728, - CatchBlock = 268435456, - All = 536869887, - SomeFunction = 1032192, - SomeValue = 68147712, - SomeType = 58728795, - AcceptableAlias = 59753052, - SomeContainer = 164, - SomeSignature = 7340032, - SomeTypeReference = 58720272, - SomeInstantiatableType = 8216, - } -} -declare module TypeScript { - class PullDecl { - public kind: PullElementKind; - public name: string; - private declDisplayName; - public semanticInfoChain: SemanticInfoChain; - public declID: number; - public flags: PullElementFlags; - private declGroups; - private childDecls; - private typeParameters; - private synthesizedValDecl; - private containerDecl; - public childDeclTypeCache: IIndexable; - public childDeclValueCache: IIndexable; - public childDeclNamespaceCache: IIndexable; - public childDeclTypeParameterCache: IIndexable; - constructor(declName: string, displayName: string, kind: PullElementKind, declFlags: PullElementFlags, semanticInfoChain: SemanticInfoChain); - public fileName(): string; - public getParentPath(): PullDecl[]; - public getParentDecl(): PullDecl; - public isExternalModule(): boolean; - public getEnclosingDecl(): PullDecl; - public _getEnclosingDeclFromParentDecl(): PullDecl; - public getDisplayName(): string; - public setSymbol(symbol: PullSymbol): void; - public ensureSymbolIsBound(): void; - public getSymbol(): PullSymbol; - public hasSymbol(): boolean; - public setSignatureSymbol(signatureSymbol: PullSignatureSymbol): void; - public getSignatureSymbol(): PullSignatureSymbol; - public hasSignatureSymbol(): boolean; - public setFlags(flags: PullElementFlags): void; - public setFlag(flags: PullElementFlags): void; - public setValueDecl(valDecl: PullDecl): void; - public getValueDecl(): PullDecl; - public getContainerDecl(): PullDecl; - private getChildDeclCache(declKind); - public addChildDecl(childDecl: PullDecl): void; - public searchChildDecls(declName: string, searchKind: PullElementKind): PullDecl[]; - public getChildDecls(): PullDecl[]; - public getTypeParameters(): PullDecl[]; - public addVariableDeclToGroup(decl: PullDecl): void; - public getVariableDeclGroups(): PullDecl[][]; - public hasBeenBound(): boolean; - public isSynthesized(): boolean; - public ast(): AST; - public isRootDecl(): boolean; - } - class RootPullDecl extends PullDecl { - private _isExternalModule; - private _fileName; - constructor(name: string, fileName: string, kind: PullElementKind, declFlags: PullElementFlags, semanticInfoChain: SemanticInfoChain, isExternalModule: boolean); - public fileName(): string; - public getParentPath(): PullDecl[]; - public getParentDecl(): PullDecl; - public isExternalModule(): boolean; - public getEnclosingDecl(): RootPullDecl; - public isRootDecl(): boolean; - } - class NormalPullDecl extends PullDecl { - private parentDecl; - public _rootDecl: RootPullDecl; - private parentPath; - constructor(declName: string, displayName: string, kind: PullElementKind, declFlags: PullElementFlags, parentDecl: PullDecl, addToParent?: boolean); - public fileName(): string; - public getParentDecl(): PullDecl; - public getParentPath(): PullDecl[]; - public isExternalModule(): boolean; - public getEnclosingDecl(): PullDecl; - public isRootDecl(): boolean; - } - class PullEnumElementDecl extends NormalPullDecl { - public constantValue: number; - constructor(declName: string, displayName: string, parentDecl: PullDecl); - } - class PullFunctionExpressionDecl extends NormalPullDecl { - private functionExpressionName; - constructor(expressionName: string, declFlags: PullElementFlags, parentDecl: PullDecl, displayName?: string); - public getFunctionExpressionName(): string; - } - class PullSynthesizedDecl extends NormalPullDecl { - constructor(declName: string, displayName: string, kind: PullElementKind, declFlags: PullElementFlags, parentDecl: PullDecl, semanticInfoChain: SemanticInfoChain); - public isSynthesized(): boolean; - public fileName(): string; - } - class PullDeclGroup { - public name: string; - private _decls; - constructor(name: string); - public addDecl(decl: PullDecl): void; - public getDecls(): PullDecl[]; - } -} -declare module TypeScript { - var pullSymbolID: number; - var sentinelEmptyArray: any[]; - class PullSymbol { - public pullSymbolID: number; - public name: string; - public kind: PullElementKind; - private _container; - public type: PullTypeSymbol; - private _declarations; - public isResolved: boolean; - public isOptional: boolean; - public inResolution: boolean; - private isSynthesized; - public isVarArg: boolean; - private rootSymbol; - private _enclosingSignature; - private _docComments; - public isPrinting: boolean; - public isAny(): boolean; - public isType(): boolean; - public isTypeReference(): boolean; - public isSignature(): boolean; - public isArrayNamedTypeReference(): boolean; - public isPrimitive(): boolean; - public isAccessor(): boolean; - public isError(): boolean; - public isInterface(): boolean; - public isMethod(): boolean; - public isProperty(): boolean; - public isAlias(): boolean; - public isContainer(): boolean; - constructor(name: string, declKind: PullElementKind); - private findAliasedTypeSymbols(scopeSymbol, skipScopeSymbolAliasesLookIn?, lookIntoOnlyExportedAlias?, aliasSymbols?, visitedScopeDeclarations?); - public getExternalAliasedSymbols(scopeSymbol: PullSymbol): PullTypeAliasSymbol[]; - static _isExternalModuleReferenceAlias(aliasSymbol: PullTypeAliasSymbol): boolean; - private getExportedInternalAliasSymbol(scopeSymbol); - public getAliasSymbolName(scopeSymbol: PullSymbol, aliasNameGetter: (symbol: PullTypeAliasSymbol) => string, aliasPartsNameGetter: (symbol: PullTypeAliasSymbol) => string, skipInternalAlias?: boolean): string; - public _getResolver(): PullTypeResolver; - public _resolveDeclaredSymbol(): PullSymbol; - public getName(scopeSymbol?: PullSymbol, useConstraintInName?: boolean): string; - public getDisplayName(scopeSymbol?: PullSymbol, useConstraintInName?: boolean, skipInternalAliasName?: boolean): string; - public getIsSpecialized(): boolean; - public getRootSymbol(): PullSymbol; - public setRootSymbol(symbol: PullSymbol): void; - public setIsSynthesized(value?: boolean): void; - public getIsSynthesized(): any; - public setEnclosingSignature(signature: PullSignatureSymbol): void; - public getEnclosingSignature(): PullSignatureSymbol; - public addDeclaration(decl: PullDecl): void; - public getDeclarations(): PullDecl[]; - public hasDeclaration(decl: PullDecl): boolean; - public setContainer(containerSymbol: PullTypeSymbol): void; - public getContainer(): PullTypeSymbol; - public setResolved(): void; - public startResolving(): void; - public setUnresolved(): void; - public anyDeclHasFlag(flag: PullElementFlags): boolean; - public allDeclsHaveFlag(flag: PullElementFlags): boolean; - public pathToRoot(): PullSymbol[]; - private static unqualifiedNameReferencesDifferentSymbolInScope(symbol, scopePath, endScopePathIndex); - private findQualifyingSymbolPathInScopeSymbol(scopeSymbol); - public toString(scopeSymbol?: PullSymbol, useConstraintInName?: boolean): string; - public getNamePartForFullName(): string; - public fullName(scopeSymbol?: PullSymbol): string; - public getScopedName(scopeSymbol?: PullSymbol, skipTypeParametersInName?: boolean, useConstraintInName?: boolean, skipInternalAliasName?: boolean): string; - public getScopedNameEx(scopeSymbol?: PullSymbol, skipTypeParametersInName?: boolean, useConstraintInName?: boolean, getPrettyTypeName?: boolean, getTypeParamMarkerInfo?: boolean, skipInternalAliasName?: boolean): MemberName; - public getTypeName(scopeSymbol?: PullSymbol, getPrettyTypeName?: boolean): string; - public getTypeNameEx(scopeSymbol?: PullSymbol, getPrettyTypeName?: boolean): MemberName; - private getTypeNameForFunctionSignature(prefix, scopeSymbol?, getPrettyTypeName?); - public getNameAndTypeName(scopeSymbol?: PullSymbol): string; - public getNameAndTypeNameEx(scopeSymbol?: PullSymbol): MemberName; - static getTypeParameterString(typars: PullTypeSymbol[], scopeSymbol?: PullSymbol, useContraintInName?: boolean): string; - static getTypeParameterStringEx(typeParameters: PullTypeSymbol[], scopeSymbol?: PullSymbol, getTypeParamMarkerInfo?: boolean, useContraintInName?: boolean): MemberNameArray; - static getIsExternallyVisible(symbol: PullSymbol, fromIsExternallyVisibleSymbol: PullSymbol, inIsExternallyVisibleSymbols: PullSymbol[]): boolean; - public isExternallyVisible(inIsExternallyVisibleSymbols?: PullSymbol[]): boolean; - private getDocCommentsOfDecl(decl); - private getDocCommentArray(symbol); - private static getDefaultConstructorSymbolForDocComments(classSymbol); - private getDocCommentText(comments); - private getDocCommentTextValue(comment); - public docComments(useConstructorAsClass?: boolean): string; - private getParameterDocCommentText(param, fncDocComments); - private cleanJSDocComment(content, spacesToRemove?); - private consumeLeadingSpace(line, startIndex, maxSpacesToRemove?); - private isSpaceChar(line, index); - private cleanDocCommentLine(line, jsDocStyleComment, jsDocLineSpaceToRemove?); - } - interface InstantiableSymbol { - getIsSpecialized(): boolean; - getAllowedToReferenceTypeParameters(): PullTypeParameterSymbol[]; - getTypeParameterArgumentMap(): TypeArgumentMap; - } - class PullSignatureSymbol extends PullSymbol implements InstantiableSymbol { - private _isDefinition; - private _memberTypeParameterNameCache; - private _stringConstantOverload; - public parameters: PullSymbol[]; - public _typeParameters: PullTypeParameterSymbol[]; - public returnType: PullTypeSymbol; - public functionType: PullTypeSymbol; - public hasOptionalParam: boolean; - public nonOptionalParamCount: number; - public hasVarArgs: boolean; - private _allowedToReferenceTypeParameters; - private _instantiationCache; - public hasBeenChecked: boolean; - public inWrapCheck: boolean; - public inWrapInfiniteExpandingReferenceCheck: boolean; - private _wrapsTypeParameterCache; - constructor(kind: PullElementKind, _isDefinition?: boolean); - public isDefinition(): boolean; - public isGeneric(): boolean; - public addParameter(parameter: PullSymbol, isOptional?: boolean): void; - public addTypeParameter(typeParameter: PullTypeParameterSymbol): void; - public addTypeParametersFromReturnType(): void; - public getTypeParameters(): PullTypeParameterSymbol[]; - public findTypeParameter(name: string): PullTypeParameterSymbol; - public getTypeParameterArgumentMap(): TypeArgumentMap; - public getAllowedToReferenceTypeParameters(): PullTypeParameterSymbol[]; - public addSpecialization(specializedVersionOfThisSignature: PullSignatureSymbol, typeArgumentMap: TypeArgumentMap): void; - public getSpecialization(typeArgumentMap: TypeArgumentMap): PullSignatureSymbol; - public isStringConstantOverloadSignature(): boolean; - public getParameterTypeAtIndex(iParam: number): PullTypeSymbol; - static getSignatureTypeMemberName(candidateSignature: PullSignatureSymbol, signatures: PullSignatureSymbol[], scopeSymbol: PullSymbol): MemberNameArray; - static getSignaturesTypeNameEx(signatures: PullSignatureSymbol[], prefix: string, shortform: boolean, brackets: boolean, scopeSymbol?: PullSymbol, getPrettyTypeName?: boolean, candidateSignature?: PullSignatureSymbol): MemberName[]; - public toString(scopeSymbol?: PullSymbol, useConstraintInName?: boolean): string; - public getSignatureTypeNameEx(prefix: string, shortform: boolean, brackets: boolean, scopeSymbol?: PullSymbol, getParamMarkerInfo?: boolean, getTypeParamMarkerInfo?: boolean): MemberNameArray; - public forAllParameterTypes(length: number, predicate: (parameterType: PullTypeSymbol, iterationIndex: number) => boolean): boolean; - public forAllCorrespondingParameterTypesInThisAndOtherSignature(otherSignature: PullSignatureSymbol, predicate: (thisSignatureParameterType: PullTypeSymbol, otherSignatureParameterType: PullTypeSymbol, iterationIndex: number) => boolean): boolean; - public wrapsSomeTypeParameter(typeParameterArgumentMap: TypeArgumentMap): boolean; - public getWrappingTypeParameterID(typeParameterArgumentMap: TypeArgumentMap): number; - public getWrappingTypeParameterIDWorker(typeParameterArgumentMap: TypeArgumentMap): number; - public _wrapsSomeTypeParameterIntoInfinitelyExpandingTypeReference(enclosingType: PullTypeSymbol, knownWrapMap: IBitMatrix): boolean; - public _wrapsSomeTypeParameterIntoInfinitelyExpandingTypeReferenceWorker(enclosingType: PullTypeSymbol, knownWrapMap: IBitMatrix): boolean; - } - class PullTypeSymbol extends PullSymbol implements InstantiableSymbol { - private _members; - private _enclosedMemberTypes; - private _enclosedMemberContainers; - private _typeParameters; - private _allowedToReferenceTypeParameters; - private _specializedVersionsOfThisType; - private _arrayVersionOfThisType; - private _implementedTypes; - private _extendedTypes; - private _typesThatExplicitlyImplementThisType; - private _typesThatExtendThisType; - private _callSignatures; - private _allCallSignatures; - private _constructSignatures; - private _allConstructSignatures; - private _indexSignatures; - private _allIndexSignatures; - private _allIndexSignaturesOfAugmentedType; - private _memberNameCache; - private _enclosedTypeNameCache; - private _enclosedContainerCache; - private _typeParameterNameCache; - private _containedNonMemberNameCache; - private _containedNonMemberTypeNameCache; - private _containedNonMemberContainerCache; - private _simpleInstantiationCache; - private _complexInstantiationCache; - private _hasGenericSignature; - private _hasGenericMember; - private _hasBaseTypeConflict; - private _knownBaseTypeCount; - private _associatedContainerTypeSymbol; - private _constructorMethod; - private _hasDefaultConstructor; - private _functionSymbol; - private _inMemberTypeNameEx; - public inSymbolPrivacyCheck: boolean; - public inWrapCheck: boolean; - public inWrapInfiniteExpandingReferenceCheck: boolean; - public typeReference: PullTypeReferenceSymbol; - private _widenedType; - private _wrapsTypeParameterCache; - constructor(name: string, kind: PullElementKind); - private _isArrayNamedTypeReference; - public isArrayNamedTypeReference(): boolean; - private computeIsArrayNamedTypeReference(); - public isType(): boolean; - public isClass(): boolean; - public isFunction(): boolean; - public isConstructor(): boolean; - public isTypeParameter(): boolean; - public isTypeVariable(): boolean; - public isError(): boolean; - public isEnum(): boolean; - public getTypeParameterArgumentMap(): TypeArgumentMap; - public isObject(): boolean; - public isFunctionType(): boolean; - public getKnownBaseTypeCount(): number; - public resetKnownBaseTypeCount(): void; - public incrementKnownBaseCount(): void; - public setHasBaseTypeConflict(): void; - public hasBaseTypeConflict(): boolean; - public hasMembers(): boolean; - public setHasGenericSignature(): void; - public getHasGenericSignature(): boolean; - public setHasGenericMember(): void; - public getHasGenericMember(): boolean; - public setAssociatedContainerType(type: PullTypeSymbol): void; - public getAssociatedContainerType(): PullTypeSymbol; - public getArrayType(): PullTypeSymbol; - public getElementType(): PullTypeSymbol; - public setArrayType(arrayType: PullTypeSymbol): void; - public getFunctionSymbol(): PullSymbol; - public setFunctionSymbol(symbol: PullSymbol): void; - public findContainedNonMember(name: string): PullSymbol; - public findContainedNonMemberType(typeName: string, kind?: PullElementKind): PullTypeSymbol; - public findContainedNonMemberContainer(containerName: string, kind?: PullElementKind): PullTypeSymbol; - public addMember(memberSymbol: PullSymbol): void; - public addEnclosedMemberType(enclosedType: PullTypeSymbol): void; - public addEnclosedMemberContainer(enclosedContainer: PullTypeSymbol): void; - public addEnclosedNonMember(enclosedNonMember: PullSymbol): void; - public addEnclosedNonMemberType(enclosedNonMemberType: PullTypeSymbol): void; - public addEnclosedNonMemberContainer(enclosedNonMemberContainer: PullTypeSymbol): void; - public addTypeParameter(typeParameter: PullTypeParameterSymbol): void; - public getMembers(): PullSymbol[]; - public setHasDefaultConstructor(hasOne?: boolean): void; - public getHasDefaultConstructor(): boolean; - public getConstructorMethod(): PullSymbol; - public setConstructorMethod(constructorMethod: PullSymbol): void; - public getTypeParameters(): PullTypeParameterSymbol[]; - public getAllowedToReferenceTypeParameters(): PullTypeParameterSymbol[]; - public isGeneric(): boolean; - private canUseSimpleInstantiationCache(typeArgumentMap); - private getSimpleInstantiationCacheId(typeArgumentMap); - public addSpecialization(specializedVersionOfThisType: PullTypeSymbol, typeArgumentMap: TypeArgumentMap): void; - public getSpecialization(typeArgumentMap: TypeArgumentMap): PullTypeSymbol; - public getKnownSpecializations(): PullTypeSymbol[]; - public getTypeArguments(): PullTypeSymbol[]; - public getTypeArgumentsOrTypeParameters(): PullTypeSymbol[]; - private addCallOrConstructSignaturePrerequisiteBase(signature); - private addCallSignaturePrerequisite(callSignature); - public appendCallSignature(callSignature: PullSignatureSymbol): void; - public insertCallSignatureAtIndex(callSignature: PullSignatureSymbol, index: number): void; - private addConstructSignaturePrerequisite(constructSignature); - public appendConstructSignature(constructSignature: PullSignatureSymbol): void; - public insertConstructSignatureAtIndex(constructSignature: PullSignatureSymbol, index: number): void; - public addIndexSignature(indexSignature: PullSignatureSymbol): void; - public hasOwnCallSignatures(): boolean; - public getOwnCallSignatures(): PullSignatureSymbol[]; - public getCallSignatures(): PullSignatureSymbol[]; - public hasOwnConstructSignatures(): boolean; - public getOwnDeclaredConstructSignatures(): PullSignatureSymbol[]; - public getConstructSignatures(): PullSignatureSymbol[]; - public hasOwnIndexSignatures(): boolean; - public getOwnIndexSignatures(): PullSignatureSymbol[]; - public getIndexSignatures(): PullSignatureSymbol[]; - public getIndexSignaturesOfAugmentedType(resolver: PullTypeResolver, globalFunctionInterface: PullTypeSymbol, globalObjectInterface: PullTypeSymbol): PullSignatureSymbol[]; - private getBaseClassConstructSignatures(baseType); - private getDefaultClassConstructSignature(); - public addImplementedType(implementedType: PullTypeSymbol): void; - public getImplementedTypes(): PullTypeSymbol[]; - public addExtendedType(extendedType: PullTypeSymbol): void; - public getExtendedTypes(): PullTypeSymbol[]; - public addTypeThatExtendsThisType(type: PullTypeSymbol): void; - public getTypesThatExtendThisType(): PullTypeSymbol[]; - public addTypeThatExplicitlyImplementsThisType(type: PullTypeSymbol): void; - public getTypesThatExplicitlyImplementThisType(): PullTypeSymbol[]; - public hasBase(potentialBase: PullTypeSymbol, visited?: PullSymbol[]): boolean; - public isValidBaseKind(baseType: PullTypeSymbol, isExtendedType: boolean): boolean; - public findMember(name: string, lookInParent: boolean): PullSymbol; - public findNestedType(name: string, kind?: PullElementKind): PullTypeSymbol; - public findNestedContainer(name: string, kind?: PullElementKind): PullTypeSymbol; - public getAllMembers(searchDeclKind: PullElementKind, memberVisiblity: GetAllMembersVisiblity): PullSymbol[]; - public findTypeParameter(name: string): PullTypeParameterSymbol; - public setResolved(): void; - public getNamePartForFullName(): string; - public getScopedName(scopeSymbol?: PullSymbol, skipTypeParametersInName?: boolean, useConstraintInName?: boolean, skipInternalAliasName?: boolean): string; - public isNamedTypeSymbol(): boolean; - public toString(scopeSymbol?: PullSymbol, useConstraintInName?: boolean): string; - public getScopedNameEx(scopeSymbol?: PullSymbol, skipTypeParametersInName?: boolean, useConstraintInName?: boolean, getPrettyTypeName?: boolean, getTypeParamMarkerInfo?: boolean, skipInternalAliasName?: boolean, shouldAllowArrayType?: boolean): MemberName; - public hasOnlyOverloadCallSignatures(): boolean; - public getTypeOfSymbol(): PullSymbol; - private getMemberTypeNameEx(topLevel, scopeSymbol?, getPrettyTypeName?); - public getGenerativeTypeClassification(enclosingType: PullTypeSymbol): GenerativeTypeClassification; - public wrapsSomeTypeParameter(typeParameterArgumentMap: CandidateInferenceInfo[]): boolean; - public wrapsSomeTypeParameter(typeParameterArgumentMap: TypeArgumentMap, skipTypeArgumentCheck?: boolean): boolean; - public getWrappingTypeParameterID(typeParameterArgumentMap: TypeArgumentMap, skipTypeArgumentCheck?: boolean): number; - private getWrappingTypeParameterIDFromSignatures(signatures, typeParameterArgumentMap); - private getWrappingTypeParameterIDWorker(typeParameterArgumentMap, skipTypeArgumentCheck); - public wrapsSomeTypeParameterIntoInfinitelyExpandingTypeReference(enclosingType: PullTypeSymbol): boolean; - public _wrapsSomeTypeParameterIntoInfinitelyExpandingTypeReferenceRecurse(enclosingType: PullTypeSymbol, knownWrapMap: IBitMatrix): boolean; - private _wrapsSomeTypeParameterIntoInfinitelyExpandingTypeReferenceWorker(enclosingType, knownWrapMap); - private _wrapsSomeTypeParameterIntoInfinitelyExpandingTypeReferenceStructure(enclosingType, knownWrapMap); - public widenedType(resolver: PullTypeResolver, ast: AST, context: PullTypeResolutionContext): PullTypeSymbol; - } - class PullPrimitiveTypeSymbol extends PullTypeSymbol { - constructor(name: string); - public isAny(): boolean; - public isNull(): boolean; - public isUndefined(): boolean; - public isStringConstant(): boolean; - public setUnresolved(): void; - public getDisplayName(): string; - } - class PullStringConstantTypeSymbol extends PullPrimitiveTypeSymbol { - constructor(name: string); - public isStringConstant(): boolean; - } - class PullErrorTypeSymbol extends PullPrimitiveTypeSymbol { - public _anyType: PullTypeSymbol; - constructor(_anyType: PullTypeSymbol, name: string); - public isError(): boolean; - public _getResolver(): PullTypeResolver; - public getName(scopeSymbol?: PullSymbol, useConstraintInName?: boolean): string; - public getDisplayName(scopeSymbol?: PullSymbol, useConstraintInName?: boolean, skipInternalAliasName?: boolean): string; - public toString(scopeSymbol?: PullSymbol, useConstraintInName?: boolean): string; - } - class PullContainerSymbol extends PullTypeSymbol { - public instanceSymbol: PullSymbol; - private assignedValue; - private assignedType; - private assignedContainer; - constructor(name: string, kind: PullElementKind); - public isContainer(): boolean; - public setInstanceSymbol(symbol: PullSymbol): void; - public getInstanceSymbol(): PullSymbol; - public setExportAssignedValueSymbol(symbol: PullSymbol): void; - public getExportAssignedValueSymbol(): PullSymbol; - public setExportAssignedTypeSymbol(type: PullTypeSymbol): void; - public getExportAssignedTypeSymbol(): PullTypeSymbol; - public setExportAssignedContainerSymbol(container: PullContainerSymbol): void; - public getExportAssignedContainerSymbol(): PullContainerSymbol; - public hasExportAssignment(): boolean; - static usedAsSymbol(containerSymbol: PullSymbol, symbol: PullSymbol): boolean; - public getInstanceType(): PullTypeSymbol; - } - class PullTypeAliasSymbol extends PullTypeSymbol { - private _assignedValue; - private _assignedType; - private _assignedContainer; - private _isUsedAsValue; - private _typeUsedExternally; - private _isUsedInExportAlias; - private retrievingExportAssignment; - private linkedAliasSymbols; - constructor(name: string); - public isUsedInExportedAlias(): boolean; - public typeUsedExternally(): boolean; - public isUsedAsValue(): boolean; - public setTypeUsedExternally(): void; - public setIsUsedInExportedAlias(): void; - public addLinkedAliasSymbol(contingentValueSymbol: PullTypeAliasSymbol): void; - public setIsUsedAsValue(): void; - public assignedValue(): PullSymbol; - public assignedType(): PullTypeSymbol; - public assignedContainer(): PullContainerSymbol; - public isAlias(): boolean; - public isContainer(): boolean; - public setAssignedValueSymbol(symbol: PullSymbol): void; - public getExportAssignedValueSymbol(): PullSymbol; - public setAssignedTypeSymbol(type: PullTypeSymbol): void; - public getExportAssignedTypeSymbol(): PullTypeSymbol; - public setAssignedContainerSymbol(container: PullContainerSymbol): void; - public getExportAssignedContainerSymbol(): PullContainerSymbol; - public getMembers(): PullSymbol[]; - public getCallSignatures(): PullSignatureSymbol[]; - public getConstructSignatures(): PullSignatureSymbol[]; - public getIndexSignatures(): PullSignatureSymbol[]; - public findMember(name: string): PullSymbol; - public findNestedType(name: string): PullTypeSymbol; - public findNestedContainer(name: string): PullTypeSymbol; - public getAllMembers(searchDeclKind: PullElementKind, memberVisibility: GetAllMembersVisiblity): PullSymbol[]; - } - class PullTypeParameterSymbol extends PullTypeSymbol { - private _constraint; - constructor(name: string); - public isTypeParameter(): boolean; - public setConstraint(constraintType: PullTypeSymbol): void; - public getConstraint(): PullTypeSymbol; - public getBaseConstraint(semanticInfoChain: SemanticInfoChain): PullTypeSymbol; - private getConstraintRecursively(visitedTypeParameters); - public getDefaultConstraint(semanticInfoChain: SemanticInfoChain): PullTypeSymbol; - public getCallSignatures(): PullSignatureSymbol[]; - public getConstructSignatures(): PullSignatureSymbol[]; - public getIndexSignatures(): PullSignatureSymbol[]; - public isGeneric(): boolean; - public fullName(scopeSymbol?: PullSymbol): string; - public getName(scopeSymbol?: PullSymbol, useConstraintInName?: boolean): string; - public getDisplayName(scopeSymbol?: PullSymbol, useConstraintInName?: boolean, skipInternalAliasName?: boolean): string; - public isExternallyVisible(inIsExternallyVisibleSymbols?: PullSymbol[]): boolean; - } - class PullAccessorSymbol extends PullSymbol { - private _getterSymbol; - private _setterSymbol; - constructor(name: string); - public isAccessor(): boolean; - public setSetter(setter: PullSymbol): void; - public getSetter(): PullSymbol; - public setGetter(getter: PullSymbol): void; - public getGetter(): PullSymbol; - } - function getIDForTypeSubstitutions(instantiatingType: PullTypeSymbol, typeArgumentMap: TypeArgumentMap): string; - function getIDForTypeSubstitutions(instantiatingSignature: PullSignatureSymbol, typeArgumentMap: TypeArgumentMap): string; - enum GetAllMembersVisiblity { - all = 0, - internallyVisible = 1, - externallyVisible = 2, - } -} -declare module TypeScript { - class EnclosingTypeWalkerState { - public _hasSetEnclosingType: boolean; - public _currentSymbols: PullSymbol[]; - static getDefaultEnclosingTypeWalkerState(): EnclosingTypeWalkerState; - static getNonGenericEnclosingTypeWalkerState(): EnclosingTypeWalkerState; - static getGenericEnclosingTypeWalkerState(genericEnclosingType: PullTypeSymbol): EnclosingTypeWalkerState; - } - class PullTypeEnclosingTypeWalker { - private static _defaultEnclosingTypeWalkerState; - private static _nonGenericEnclosingTypeWalkerState; - private enclosingTypeWalkerState; - constructor(); - private setDefaultTypeWalkerState(); - private setNonGenericEnclosingTypeWalkerState(); - private canSymbolOrDeclBeUsedAsEnclosingTypeHelper(name, kind); - private canDeclBeUsedAsEnclosingType(decl); - private canSymbolBeUsedAsEnclosingType(symbol); - public getEnclosingType(): PullTypeSymbol; - public _canWalkStructure(): boolean; - public _getCurrentSymbol(): PullSymbol; - public getGenerativeClassification(): GenerativeTypeClassification; - private _pushSymbol(symbol); - private _popSymbol(); - private setSymbolAsEnclosingType(type); - private _setEnclosingTypeOfParentDecl(decl, setSignature); - public setEnclosingTypeForSymbol(symbol: PullSymbol): EnclosingTypeWalkerState; - public startWalkingType(symbol: PullTypeSymbol): EnclosingTypeWalkerState; - public endWalkingType(stateWhenStartedWalkingTypes: EnclosingTypeWalkerState): void; - public walkMemberType(memberName: string, resolver: PullTypeResolver): void; - public postWalkMemberType(): void; - public walkSignature(kind: PullElementKind, index: number): void; - public postWalkSignature(): void; - public walkTypeArgument(index: number): void; - public postWalkTypeArgument(): void; - public walkTypeParameterConstraint(index: number): void; - public postWalkTypeParameterConstraint(): void; - public walkReturnType(): void; - public postWalkReturnType(): void; - public walkParameterType(iParam: number): void; - public postWalkParameterType(): void; - public getBothKindOfIndexSignatures(resolver: PullTypeResolver, context: PullTypeResolutionContext, includeAugmentedType: boolean): IndexSignatureInfo; - public walkIndexSignatureReturnType(indexSigInfo: IndexSignatureInfo, useStringIndexSignature: boolean, onlySignature?: boolean): void; - public postWalkIndexSignatureReturnType(onlySignature?: boolean): void; - public resetEnclosingTypeWalkerState(): EnclosingTypeWalkerState; - public setEnclosingTypeWalkerState(enclosingTypeWalkerState: EnclosingTypeWalkerState): void; - } -} -declare module TypeScript { - class CandidateInferenceInfo { - public typeParameter: PullTypeParameterSymbol; - public _inferredTypeAfterFixing: PullTypeSymbol; - public inferenceCandidates: PullTypeSymbol[]; - public addCandidate(candidate: PullTypeSymbol): void; - public isFixed(): boolean; - public fixTypeParameter(resolver: PullTypeResolver, context: PullTypeResolutionContext): void; - } - class TypeArgumentInferenceContext { - public resolver: PullTypeResolver; - public context: PullTypeResolutionContext; - public signatureBeingInferred: PullSignatureSymbol; - public inferenceCache: IBitMatrix; - public candidateCache: CandidateInferenceInfo[]; - constructor(resolver: PullTypeResolver, context: PullTypeResolutionContext, signatureBeingInferred: PullSignatureSymbol); - public alreadyRelatingTypes(objectType: PullTypeSymbol, parameterType: PullTypeSymbol): boolean; - public resetRelationshipCache(): void; - public addInferenceRoot(param: PullTypeParameterSymbol): void; - public getInferenceInfo(param: PullTypeParameterSymbol): CandidateInferenceInfo; - public addCandidateForInference(param: PullTypeParameterSymbol, candidate: PullTypeSymbol): void; - public inferTypeArguments(): PullTypeSymbol[]; - public fixTypeParameter(typeParameter: PullTypeParameterSymbol): void; - public _finalizeInferredTypeArguments(): PullTypeSymbol[]; - public isInvocationInferenceContext(): boolean; - } - class InvocationTypeArgumentInferenceContext extends TypeArgumentInferenceContext { - public argumentASTs: ISeparatedSyntaxList2; - constructor(resolver: PullTypeResolver, context: PullTypeResolutionContext, signatureBeingInferred: PullSignatureSymbol, argumentASTs: ISeparatedSyntaxList2); - public isInvocationInferenceContext(): boolean; - public inferTypeArguments(): PullTypeSymbol[]; - } - class ContextualSignatureInstantiationTypeArgumentInferenceContext extends TypeArgumentInferenceContext { - private contextualSignature; - private shouldFixContextualSignatureParameterTypes; - constructor(resolver: PullTypeResolver, context: PullTypeResolutionContext, signatureBeingInferred: PullSignatureSymbol, contextualSignature: PullSignatureSymbol, shouldFixContextualSignatureParameterTypes: boolean); - public isInvocationInferenceContext(): boolean; - public inferTypeArguments(): PullTypeSymbol[]; - } - class PullContextualTypeContext { - public contextualType: PullTypeSymbol; - public provisional: boolean; - public isInferentiallyTyping: boolean; - public typeArgumentInferenceContext: TypeArgumentInferenceContext; - public provisionallyTypedSymbols: PullSymbol[]; - public hasProvisionalErrors: boolean; - private astSymbolMap; - constructor(contextualType: PullTypeSymbol, provisional: boolean, isInferentiallyTyping: boolean, typeArgumentInferenceContext: TypeArgumentInferenceContext); - public recordProvisionallyTypedSymbol(symbol: PullSymbol): void; - public invalidateProvisionallyTypedSymbols(): void; - public setSymbolForAST(ast: AST, symbol: PullSymbol): void; - public getSymbolForAST(ast: AST): PullSymbol; - } - class PullTypeResolutionContext { - private resolver; - public inTypeCheck: boolean; - public fileName: string; - private contextStack; - private typeCheckedNodes; - private enclosingTypeWalker1; - private enclosingTypeWalker2; - constructor(resolver: PullTypeResolver, inTypeCheck?: boolean, fileName?: string); - public setTypeChecked(ast: AST): void; - public canTypeCheckAST(ast: AST): boolean; - private _pushAnyContextualType(type, provisional, isInferentiallyTyping, argContext); - public pushNewContextualType(type: PullTypeSymbol): void; - public propagateContextualType(type: PullTypeSymbol): void; - public pushInferentialType(type: PullTypeSymbol, typeArgumentInferenceContext: TypeArgumentInferenceContext): void; - public pushProvisionalType(type: PullTypeSymbol): void; - public popAnyContextualType(): PullContextualTypeContext; - public hasProvisionalErrors(): boolean; - public getContextualType(): PullTypeSymbol; - public fixAllTypeParametersReferencedByType(type: PullTypeSymbol, resolver: PullTypeResolver, argContext?: TypeArgumentInferenceContext): PullTypeSymbol; - private getCurrentTypeArgumentInferenceContext(); - public isInferentiallyTyping(): boolean; - public inProvisionalResolution(): boolean; - private inBaseTypeResolution; - public isInBaseTypeResolution(): boolean; - public startBaseTypeResolution(): boolean; - public doneBaseTypeResolution(wasInBaseTypeResolution: boolean): void; - public setTypeInContext(symbol: PullSymbol, type: PullTypeSymbol): void; - public postDiagnostic(diagnostic: Diagnostic): void; - public typeCheck(): boolean; - public setSymbolForAST(ast: AST, symbol: PullSymbol): void; - public getSymbolForAST(ast: AST): PullSymbol; - public startWalkingTypes(symbol1: PullTypeSymbol, symbol2: PullTypeSymbol): { - stateWhenStartedWalkingTypes1: EnclosingTypeWalkerState; - stateWhenStartedWalkingTypes2: EnclosingTypeWalkerState; - }; - public endWalkingTypes(statesWhenStartedWalkingTypes: { - stateWhenStartedWalkingTypes1: EnclosingTypeWalkerState; - stateWhenStartedWalkingTypes2: EnclosingTypeWalkerState; - }): void; - public setEnclosingTypeForSymbols(symbol1: PullSymbol, symbol2: PullSymbol): { - enclosingTypeWalkerState1: EnclosingTypeWalkerState; - enclosingTypeWalkerState2: EnclosingTypeWalkerState; - }; - public walkMemberTypes(memberName: string): void; - public postWalkMemberTypes(): void; - public walkSignatures(kind: PullElementKind, index: number, index2?: number): void; - public postWalkSignatures(): void; - public walkTypeParameterConstraints(index: number): void; - public postWalkTypeParameterConstraints(): void; - public walkTypeArgument(index: number): void; - public postWalkTypeArgument(): void; - public walkReturnTypes(): void; - public postWalkReturnTypes(): void; - public walkParameterTypes(iParam: number): void; - public postWalkParameterTypes(): void; - public getBothKindOfIndexSignatures(includeAugmentedType1: boolean, includeAugmentedType2: boolean): { - indexSigs1: IndexSignatureInfo; - indexSigs2: IndexSignatureInfo; - }; - public walkIndexSignatureReturnTypes(indexSigs: { - indexSigs1: IndexSignatureInfo; - indexSigs2: IndexSignatureInfo; - }, useStringIndexSignature1: boolean, useStringIndexSignature2: boolean, onlySignature?: boolean): void; - public postWalkIndexSignatureReturnTypes(onlySignature?: boolean): void; - public swapEnclosingTypeWalkers(): void; - public oneOfClassificationsIsInfinitelyExpanding(): boolean; - public resetEnclosingTypeWalkerStates(): { - enclosingTypeWalkerState1: EnclosingTypeWalkerState; - enclosingTypeWalkerState2: EnclosingTypeWalkerState; - }; - public setEnclosingTypeWalkerStates(enclosingTypeWalkerStates: { - enclosingTypeWalkerState1: EnclosingTypeWalkerState; - enclosingTypeWalkerState2: EnclosingTypeWalkerState; - }): void; - } -} -declare module TypeScript { - interface IPullTypeCollection { - getLength(): number; - getTypeAtIndex(index: number): PullTypeSymbol; - } - class PullAdditionalCallResolutionData { - public targetSymbol: PullSymbol; - public resolvedSignatures: PullSignatureSymbol[]; - public candidateSignature: PullSignatureSymbol; - public actualParametersContextTypeSymbols: PullTypeSymbol[]; - public diagnosticsFromOverloadResolution: Diagnostic[]; - } - class PullAdditionalObjectLiteralResolutionData { - public membersContextTypeSymbols: PullTypeSymbol[]; - } - interface IndexSignatureInfo { - numericSignature: PullSignatureSymbol; - stringSignature: PullSignatureSymbol; - } - class PullTypeResolver { - private compilationSettings; - public semanticInfoChain: SemanticInfoChain; - private _cachedArrayInterfaceType; - private _cachedNumberInterfaceType; - private _cachedStringInterfaceType; - private _cachedBooleanInterfaceType; - private _cachedObjectInterfaceType; - private _cachedFunctionInterfaceType; - private _cachedIArgumentsInterfaceType; - private _cachedRegExpInterfaceType; - private _cachedAnyTypeArgs; - private typeCheckCallBacks; - private postTypeCheckWorkitems; - private _cachedFunctionArgumentsSymbol; - private assignableCache; - private subtypeCache; - private identicalCache; - private inResolvingOtherDeclsWalker; - constructor(compilationSettings: ImmutableCompilationSettings, semanticInfoChain: SemanticInfoChain); - private cachedArrayInterfaceType(); - public getArrayNamedType(): PullTypeSymbol; - private cachedNumberInterfaceType(); - private cachedStringInterfaceType(); - private cachedBooleanInterfaceType(); - private cachedObjectInterfaceType(); - private cachedFunctionInterfaceType(); - private cachedIArgumentsInterfaceType(); - private cachedRegExpInterfaceType(); - private cachedFunctionArgumentsSymbol(); - private getApparentType(type); - private setTypeChecked(ast, context); - private canTypeCheckAST(ast, context); - private setSymbolForAST(ast, symbol, context); - private getSymbolForAST(ast, context); - public getASTForDecl(decl: PullDecl): AST; - public getNewErrorTypeSymbol(name?: string): PullErrorTypeSymbol; - public getEnclosingDecl(decl: PullDecl): PullDecl; - private getExportedMemberSymbol(symbol, parent); - public _getNamedPropertySymbolOfAugmentedType(symbolName: string, parent: PullTypeSymbol): PullSymbol; - private getNamedPropertySymbol(symbolName, declSearchKind, parent); - private getSymbolFromDeclPath(symbolName, declPath, declSearchKind); - private getVisibleDeclsFromDeclPath(declPath, declSearchKind); - private addFilteredDecls(decls, declSearchKind, result); - public getVisibleDecls(enclosingDecl: PullDecl): PullDecl[]; - public getVisibleContextSymbols(enclosingDecl: PullDecl, context: PullTypeResolutionContext): PullSymbol[]; - public getVisibleMembersFromExpression(expression: AST, enclosingDecl: PullDecl, context: PullTypeResolutionContext): PullSymbol[]; - private isAnyOrEquivalent(type); - private resolveExternalModuleReference(idText, currentFileName); - public resolveDeclaredSymbol(symbol: TSymbol, context?: PullTypeResolutionContext): TSymbol; - private resolveDeclaredSymbolWorker(symbol, context); - private resolveOtherDecl(otherDecl, context); - private resolveOtherDeclarations(astName, context); - private resolveSourceUnit(sourceUnit, context); - private typeCheckSourceUnit(sourceUnit, context); - private verifyUniquenessOfImportNamesInSourceUnit(sourceUnit); - private resolveEnumDeclaration(ast, context); - private typeCheckEnumDeclaration(ast, context); - private postTypeCheckEnumDeclaration(ast, context); - private checkInitializersInEnumDeclarations(decl, context); - private resolveModuleDeclaration(ast, context); - private ensureAllSymbolsAreBound(containerSymbol); - private resolveModuleSymbol(containerSymbol, context, moduleDeclAST, moduleDeclNameAST, sourceUnitAST); - private resolveFirstExportAssignmentStatement(moduleElements, context); - private resolveSingleModuleDeclaration(ast, astName, context); - private typeCheckModuleDeclaration(ast, context); - private typeCheckSingleModuleDeclaration(ast, astName, context); - private verifyUniquenessOfImportNamesInModule(decl); - private checkUniquenessOfImportNames(decls, doesNameExistOutside?); - private scanVariableDeclarationGroups(enclosingDecl, firstDeclHandler, subsequentDeclHandler?); - private postTypeCheckModuleDeclaration(ast, context); - private isTypeRefWithoutTypeArgs(term); - public createInstantiatedType(type: PullTypeSymbol, typeArguments: PullTypeSymbol[]): PullTypeSymbol; - private resolveReferenceTypeDeclaration(classOrInterface, name, heritageClauses, context); - private resolveClassDeclaration(classDeclAST, context); - private typeCheckTypeParametersOfTypeDeclaration(classOrInterface, context); - private typeCheckClassDeclaration(classDeclAST, context); - private postTypeCheckClassDeclaration(classDeclAST, context); - private resolveTypeSymbolSignatures(typeSymbol, context); - private resolveInterfaceDeclaration(interfaceDeclAST, context); - private typeCheckInterfaceDeclaration(interfaceDeclAST, context); - private checkInterfaceDeclForIdenticalTypeParameters(interfaceDeclAST, context); - private checkTypeForDuplicateIndexSignatures(enclosingTypeSymbol); - private filterSymbol(symbol, kind, enclosingDecl, context); - private getMemberSymbolOfKind(symbolName, kind, pullTypeSymbol, enclosingDecl, context); - private resolveIdentifierOfInternalModuleReference(importDecl, identifier, moduleSymbol, enclosingDecl, context); - private resolveModuleReference(importDecl, moduleNameExpr, enclosingDecl, context, declPath); - private resolveInternalModuleReference(importStatementAST, context); - private resolveImportDeclaration(importStatementAST, context); - private typeCheckImportDeclaration(importStatementAST, context); - private postTypeCheckImportDeclaration(importStatementAST, context); - private resolveExportAssignmentStatement(exportAssignmentAST, context); - private resolveAnyFunctionTypeSignature(funcDeclAST, typeParameters, parameterList, returnTypeAnnotation, context); - private resolveFunctionTypeSignatureParameter(argDeclAST, signature, enclosingDecl, context); - private resolveFunctionExpressionParameter(argDeclAST, id, typeExpr, equalsValueClause, contextParam, enclosingDecl, context); - private checkNameForCompilerGeneratedDeclarationCollision(astWithName, isDeclaration, name, context); - private hasRestParameterCodeGen(someFunctionDecl); - private checkArgumentsCollides(ast, context); - private checkIndexOfRestArgumentInitializationCollides(ast, isDeclaration, context); - private checkExternalModuleRequireExportsCollides(ast, name, context); - private resolveObjectTypeTypeReference(objectType, context); - private typeCheckObjectTypeTypeReference(objectType, context); - private resolveTypeAnnotation(typeAnnotation, context); - public resolveTypeReference(typeRef: AST, context: PullTypeResolutionContext): PullTypeSymbol; - private getArrayType(elementType); - private computeTypeReferenceSymbol(term, context); - private genericTypeIsUsedWithoutRequiredTypeArguments(typeSymbol, term, context); - private resolveMemberVariableDeclaration(varDecl, context); - private resolvePropertySignature(varDecl, context); - private resolveVariableDeclarator(varDecl, context); - private resolveParameterList(list, context); - private resolveParameter(parameter, context); - private getEnumTypeSymbol(enumElement, context); - private resolveEnumElement(enumElement, context); - private typeCheckEnumElement(enumElement, context); - private resolveEqualsValueClause(clause, isContextuallyTyped, context); - private resolveVariableDeclaratorOrParameterOrEnumElement(varDeclOrParameter, modifiers, name, typeExpr, init, context); - private resolveAndTypeCheckVariableDeclarationTypeExpr(varDeclOrParameter, name, typeExpr, context); - private resolveAndTypeCheckVariableDeclaratorOrParameterInitExpr(varDeclOrParameter, name, typeExpr, init, context, typeExprSymbol); - private typeCheckPropertySignature(varDecl, context); - private typeCheckMemberVariableDeclaration(varDecl, context); - private typeCheckVariableDeclarator(varDecl, context); - private typeCheckParameter(parameter, context); - private typeCheckVariableDeclaratorOrParameterOrEnumElement(varDeclOrParameter, modifiers, name, typeExpr, init, context); - private isForInVariableDeclarator(ast); - private checkSuperCaptureVariableCollides(superAST, isDeclaration, context); - private checkThisCaptureVariableCollides(_thisAST, isDeclaration, context); - private postTypeCheckVariableDeclaratorOrParameter(varDeclOrParameter, context); - private resolveTypeParameterDeclaration(typeParameterAST, context); - private resolveFirstTypeParameterDeclaration(typeParameterSymbol, context); - private typeCheckTypeParameterDeclaration(typeParameterAST, context); - private resolveConstraint(constraint, context); - private resolveFunctionBodyReturnTypes(funcDeclAST, block, bodyExpression, signature, useContextualType, enclosingDecl, context); - private typeCheckConstructorDeclaration(funcDeclAST, context); - private constructorHasSuperCall(constructorDecl); - private typeCheckFunctionExpression(funcDecl, isContextuallyTyped, context); - private typeCheckCallSignature(funcDecl, context); - private typeCheckConstructSignature(funcDecl, context); - private typeCheckMethodSignature(funcDecl, context); - private typeCheckMemberFunctionDeclaration(funcDecl, context); - private containsSingleThrowStatement(block); - private typeCheckAnyFunctionDeclaration(funcDeclAST, isStatic, name, typeParameters, parameters, returnTypeAnnotation, block, context); - private checkThatNonVoidFunctionHasReturnExpressionOrThrowStatement(functionDecl, returnTypeAnnotation, returnTypeSymbol, block, context); - private typeCheckIndexSignature(funcDeclAST, context); - private postTypeCheckFunctionDeclaration(funcDeclAST, context); - private resolveReturnTypeAnnotationOfFunctionDeclaration(funcDeclAST, returnTypeAnnotation, context); - private resolveMemberFunctionDeclaration(funcDecl, context); - private resolveCallSignature(funcDecl, context); - private resolveConstructSignature(funcDecl, context); - private resolveMethodSignature(funcDecl, context); - private resolveAnyFunctionDeclaration(funcDecl, context); - private resolveFunctionExpression(funcDecl, isContextuallyTyped, context); - private resolveSimpleArrowFunctionExpression(funcDecl, isContextuallyTyped, context); - private resolveParenthesizedArrowFunctionExpression(funcDecl, isContextuallyTyped, context); - private getEnclosingClassDeclaration(ast); - private resolveConstructorDeclaration(funcDeclAST, context); - private resolveIndexMemberDeclaration(ast, context); - private resolveIndexSignature(funcDeclAST, context); - private resolveFunctionDeclaration(funcDeclAST, isStatic, name, typeParameters, parameterList, returnTypeAnnotation, block, context); - private resolveGetterReturnTypeAnnotation(getterFunctionDeclarationAst, enclosingDecl, context); - private resolveSetterArgumentTypeAnnotation(setterFunctionDeclarationAst, enclosingDecl, context); - private resolveAccessorDeclaration(funcDeclAst, context); - private typeCheckAccessorDeclaration(funcDeclAst, context); - private resolveGetAccessorDeclaration(funcDeclAST, parameters, returnTypeAnnotation, block, setterAnnotatedType, context); - private checkIfGetterAndSetterTypeMatch(funcDeclAST, context); - private typeCheckGetAccessorDeclaration(funcDeclAST, context); - static hasSetAccessorParameterTypeAnnotation(setAccessor: SetAccessor): boolean; - private resolveSetAccessorDeclaration(funcDeclAST, parameterList, context); - private typeCheckSetAccessorDeclaration(funcDeclAST, context); - private resolveList(list, context); - private resolveSeparatedList(list, context); - private resolveVoidExpression(ast, context); - private resolveLogicalOperation(ast, context); - private typeCheckLogicalOperation(binex, context); - private resolveLogicalNotExpression(ast, context); - private resolveUnaryArithmeticOperation(ast, context); - private resolvePostfixUnaryExpression(ast, context); - private isAnyOrNumberOrEnum(type); - private typeCheckUnaryArithmeticOperation(unaryExpression, context); - private typeCheckPostfixUnaryExpression(unaryExpression, context); - private resolveBinaryArithmeticExpression(binaryExpression, context); - private typeCheckBinaryArithmeticExpression(binaryExpression, context); - private resolveTypeOfExpression(ast, context); - private resolveThrowStatement(ast, context); - private resolveDeleteExpression(ast, context); - private resolveInstanceOfExpression(ast, context); - private typeCheckInstanceOfExpression(binaryExpression, context); - private resolveCommaExpression(commaExpression, context); - private resolveInExpression(ast, context); - private typeCheckInExpression(binaryExpression, context); - private resolveForStatement(ast, context); - private resolveForInStatement(forInStatement, context); - private typeCheckForInStatement(forInStatement, context); - private resolveWhileStatement(ast, context); - private typeCheckWhileStatement(ast, context); - private resolveDoStatement(ast, context); - private typeCheckDoStatement(ast, context); - private resolveIfStatement(ast, context); - private typeCheckIfStatement(ast, context); - private resolveElseClause(ast, context); - private typeCheckElseClause(ast, context); - private resolveBlock(ast, context); - private resolveVariableStatement(ast, context); - private resolveVariableDeclarationList(ast, context); - private resolveWithStatement(ast, context); - private typeCheckWithStatement(ast, context); - private resolveTryStatement(ast, context); - private typeCheckTryStatement(ast, context); - private resolveCatchClause(ast, context); - private typeCheckCatchClause(ast, context); - private resolveFinallyClause(ast, context); - private typeCheckFinallyClause(ast, context); - private getEnclosingFunctionDeclaration(ast); - private resolveReturnExpression(expression, enclosingFunction, context); - private typeCheckReturnExpression(expression, expressionType, enclosingFunction, context); - private resolveReturnStatement(returnAST, context); - private resolveSwitchStatement(ast, context); - private typeCheckSwitchStatement(ast, context); - private resolveLabeledStatement(ast, context); - private typeCheckLabeledStatement(ast, context); - private labelIsOnContinuableConstruct(statement); - private resolveContinueStatement(ast, context); - private isIterationStatement(ast); - private isAnyFunctionExpressionOrDeclaration(ast); - private inSwitchStatement(ast); - private inIterationStatement(ast, crossFunctions); - private getEnclosingLabels(ast, breakable, crossFunctions); - private typeCheckContinueStatement(ast, context); - private resolveBreakStatement(ast, context); - private typeCheckBreakStatement(ast, context); - public resolveAST(ast: AST, isContextuallyTyped: boolean, context: PullTypeResolutionContext): PullSymbol; - private resolveExpressionAST(ast, isContextuallyOrInferentiallyTyped, context); - private resolveExpressionWorker(ast, isContextuallyTyped, context); - private typeCheckAST(ast, isContextuallyTyped, context); - private processPostTypeCheckWorkItems(context); - private postTypeCheck(ast, context); - private resolveRegularExpressionLiteral(); - private postTypeCheckNameExpression(nameAST, context); - private typeCheckNameExpression(nameAST, context); - private resolveNameExpression(nameAST, context); - private isInEnumDecl(decl); - private getSomeInnermostFunctionScopeDecl(declPath); - private isFromFunctionScope(nameSymbol, functionScopeDecl); - private findConstructorDeclOfEnclosingType(decl); - private checkNameAsPartOfInitializerExpressionForInstanceMemberVariable(nameAST, nameSymbol, context); - private computeNameExpression(nameAST, context); - private getCurrentParameterIndexForFunction(parameter, funcDecl); - private resolveMemberAccessExpression(dottedNameAST, context); - private resolveDottedNameExpression(dottedNameAST, expression, name, context); - private computeDottedNameExpression(expression, name, context, checkSuperPrivateAndStaticAccess); - private computeDottedNameExpressionFromLHS(lhs, expression, name, context, checkSuperPrivateAndStaticAccess); - private resolveTypeNameExpression(nameAST, context); - private computeTypeNameExpression(nameAST, context); - private isInStaticMemberContext(decl); - private isLeftSideOfQualifiedName(ast); - private resolveGenericTypeReference(genericTypeAST, context); - private resolveQualifiedName(dottedNameAST, context); - private isLastNameOfModuleNameModuleReference(ast); - private computeQualifiedName(dottedNameAST, context); - private shouldContextuallyTypeAnyFunctionExpression(functionExpressionAST, typeParameters, parameters, returnTypeAnnotation, context); - private resolveAnyFunctionExpression(funcDeclAST, typeParameters, parameters, returnTypeAnnotation, block, bodyExpression, isContextuallyTyped, context); - private resolveAnyFunctionExpressionParameters(funcDeclAST, typeParameters, parameters, returnTypeAnnotation, isContextuallyTyped, context); - private typeCheckSimpleArrowFunctionExpression(arrowFunction, isContextuallyTyped, context); - private typeCheckParenthesizedArrowFunctionExpression(arrowFunction, isContextuallyTyped, context); - private typeCheckAnyFunctionExpression(funcDeclAST, typeParameters, parameters, returnTypeAnnotation, block, bodyExpression, isContextuallyTyped, context); - private resolveThisExpression(thisExpression, context); - private inTypeArgumentList(ast); - private inClassExtendsHeritageClause(ast); - private inTypeQuery(ast); - private inArgumentListOfSuperInvocation(ast); - private inConstructorParameterList(ast); - private isFunctionAccessorOrNonArrowFunctionExpression(decl); - private isFunctionOrNonArrowFunctionExpression(decl); - private typeCheckThisExpression(thisExpression, context, enclosingDecl); - private getContextualClassSymbolForEnclosingDecl(ast, enclosingDecl); - private inStaticMemberVariableDeclaration(ast); - private resolveSuperExpression(ast, context); - private typeCheckSuperExpression(ast, context, enclosingDecl); - private resolveSimplePropertyAssignment(propertyAssignment, isContextuallyTyped, context); - private resolveFunctionPropertyAssignment(funcProp, isContextuallyTyped, context); - private typeCheckFunctionPropertyAssignment(funcProp, isContextuallyTyped, context); - public resolveObjectLiteralExpression(expressionAST: ObjectLiteralExpression, isContextuallyTyped: boolean, context: PullTypeResolutionContext, additionalResults?: PullAdditionalObjectLiteralResolutionData): PullSymbol; - private bindObjectLiteralMembers(objectLiteralDeclaration, objectLiteralTypeSymbol, objectLiteralMembers, isUsingExistingSymbol, pullTypeContext); - private resolveObjectLiteralMembers(objectLiteralDeclaration, objectLiteralTypeSymbol, objectLiteralContextualType, objectLiteralMembers, stringIndexerSignature, numericIndexerSignature, allMemberTypes, allNumericMemberTypes, boundMemberSymbols, isUsingExistingSymbol, pullTypeContext, additionalResults?); - private computeObjectLiteralExpression(objectLitAST, isContextuallyTyped, context, additionalResults?); - private getPropertyAssignmentName(propertyAssignment); - private stampObjectLiteralWithIndexSignature(objectLiteralSymbol, indexerTypeCandidates, contextualIndexSignature, context); - private resolveArrayLiteralExpression(arrayLit, isContextuallyTyped, context); - private computeArrayLiteralExpressionSymbol(arrayLit, isContextuallyTyped, context); - private resolveElementAccessExpression(callEx, context); - private typeCheckElementAccessExpression(callEx, context, symbolAndDiagnostic); - private computeElementAccessExpressionSymbolAndDiagnostic(callEx, context); - private getBothKindsOfIndexSignaturesIncludingAugmentedType(enclosingType, context); - private getBothKindsOfIndexSignaturesExcludingAugmentedType(enclosingType, context); - public _getBothKindsOfIndexSignatures(enclosingType: PullTypeSymbol, context: PullTypeResolutionContext, includeAugmentedType: boolean): IndexSignatureInfo; - public _addUnhiddenSignaturesFromBaseType(derivedTypeSignatures: PullSignatureSymbol[], baseTypeSignatures: PullSignatureSymbol[], signaturesBeingAggregated: PullSignatureSymbol[]): void; - private resolveBinaryAdditionOperation(binaryExpression, context); - private bestCommonTypeOfTwoTypes(type1, type2, context); - private bestCommonTypeOfThreeTypes(type1, type2, type3, context); - private resolveLogicalOrExpression(binex, isContextuallyTyped, context); - private resolveLogicalAndExpression(binex, context); - private computeTypeOfConditionalExpression(leftType, rightType, isContextuallyTyped, context); - private resolveConditionalExpression(trinex, isContextuallyTyped, context); - private conditionExpressionTypesAreValid(leftType, rightType, expressionType, isContextuallyTyped, context); - private resolveParenthesizedExpression(ast, context); - private resolveExpressionStatement(ast, context); - public resolveInvocationExpression(callEx: InvocationExpression, context: PullTypeResolutionContext, additionalResults?: PullAdditionalCallResolutionData): PullSymbol; - private typeCheckInvocationExpression(callEx, context); - private computeInvocationExpressionSymbol(callEx, context, additionalResults); - public resolveObjectCreationExpression(callEx: ObjectCreationExpression, context: PullTypeResolutionContext, additionalResults?: PullAdditionalCallResolutionData): PullSymbol; - private typeCheckObjectCreationExpression(callEx, context); - private postOverloadResolutionDiagnostics(diagnostic, additionalResults, context); - private computeObjectCreationExpressionSymbol(callEx, context, additionalResults); - private instantiateSignatureInContext(signatureAToInstantiate, contextualSignatureB, context, shouldFixContextualSignatureParameterTypes); - private resolveCastExpression(assertionExpression, context); - private typeCheckCastExpression(assertionExpression, context, typeAssertionType); - private resolveAssignmentExpression(binaryExpression, context); - private getInstanceTypeForAssignment(lhs, type, context); - public widenType(type: PullTypeSymbol, ast: AST, context: PullTypeResolutionContext): PullTypeSymbol; - private widenArrayType(type, ast, context); - private widenObjectLiteralType(type, ast, context); - private needsToWidenObjectLiteralType(type, ast, context); - public findBestCommonType(collection: IPullTypeCollection, context: PullTypeResolutionContext, comparisonInfo?: TypeComparisonInfo): PullTypeSymbol; - private typeIsBestCommonTypeCandidate(candidateType, collection, context); - private typesAreIdenticalInEnclosingTypes(t1, t2, context); - private typesAreIdenticalWithNewEnclosingTypes(t1, t2, context); - public typesAreIdentical(t1: PullTypeSymbol, t2: PullTypeSymbol, context: PullTypeResolutionContext): boolean; - private typesAreIdenticalWorker(t1, t2, context); - private propertiesAreIdentical(propertySymbol1, propertySymbol2, context); - private propertiesAreIdenticalWithNewEnclosingTypes(type1, type2, property1, property2, context); - private signatureGroupsAreIdentical(sg1, sg2, context); - private typeParametersAreIdentical(tp1, tp2, context); - private typeParametersAreIdenticalWorker(tp1, tp2, context); - private setTypeParameterIdentity(tp1, tp2, val); - public signaturesAreIdenticalWithNewEnclosingTypes(s1: PullSignatureSymbol, s2: PullSignatureSymbol, context: PullTypeResolutionContext, includingReturnType?: boolean): boolean; - private signaturesAreIdentical(s1, s2, context, includingReturnType?); - public signaturesAreIdenticalWorker(s1: PullSignatureSymbol, s2: PullSignatureSymbol, context: PullTypeResolutionContext, includingReturnType?: boolean): boolean; - private signatureTypeParametersParametersAndReturnTypesAreIdentical(s1, s2, context, includingReturnType?); - public signatureReturnTypesAreIdentical(s1: PullSignatureSymbol, s2: PullSignatureSymbol, context: PullTypeResolutionContext): boolean; - private symbolsShareDeclaration(symbol1, symbol2); - private sourceIsSubtypeOfTarget(source, target, ast, context, comparisonInfo?, isComparingInstantiatedSignatures?); - private sourceMembersAreAssignableToTargetMembers(source, target, ast, context, comparisonInfo, isComparingInstantiatedSignatures?); - private sourcePropertyIsAssignableToTargetProperty(source, target, sourceProp, targetProp, ast, context, comparisonInfo, isComparingInstantiatedSignatures?); - private sourceCallSignaturesAreAssignableToTargetCallSignatures(source, target, ast, context, comparisonInfo, isComparingInstantiatedSignatures?); - private sourceConstructSignaturesAreAssignableToTargetConstructSignatures(source, target, ast, context, comparisonInfo, isComparingInstantiatedSignatures?); - private sourceIndexSignaturesAreAssignableToTargetIndexSignatures(source, target, ast, context, comparisonInfo, isComparingInstantiatedSignatures?); - private typeIsAssignableToFunction(source, ast, context); - private signatureIsAssignableToTarget(s1, s2, ast, context, comparisonInfo?, isComparingInstantiatedSignatures?); - private sourceIsAssignableToTarget(source, target, ast, context, comparisonInfo?, isComparingInstantiatedSignatures?); - private sourceIsAssignableToTargetWithNewEnclosingTypes(source, target, ast, context, comparisonInfo?, isComparingInstantiatedSignatures?); - private getSymbolForRelationshipCheck(symbol); - private sourceIsRelatableToTargetInEnclosingTypes(source, target, assignableTo, comparisonCache, ast, context, comparisonInfo, isComparingInstantiatedSignatures); - private sourceIsRelatableToTargetWithNewEnclosingTypes(source, target, assignableTo, comparisonCache, ast, context, comparisonInfo, isComparingInstantiatedSignatures); - private sourceIsRelatableToTargetInCache(source, target, comparisonCache, comparisonInfo); - private sourceIsRelatableToTarget(source, target, assignableTo, comparisonCache, ast, context, comparisonInfo, isComparingInstantiatedSignatures); - private isSourceTypeParameterConstrainedToTargetTypeParameter(source, target); - private sourceIsRelatableToTargetWorker(source, target, assignableTo, comparisonCache, ast, context, comparisonInfo, isComparingInstantiatedSignatures); - private sourceMembersAreRelatableToTargetMembers(source, target, assignableTo, comparisonCache, ast, context, comparisonInfo, isComparingInstantiatedSignatures); - private infinitelyExpandingSourceTypeIsRelatableToTargetType(sourceType, targetType, assignableTo, comparisonCache, ast, context, comparisonInfo, isComparingInstantiatedSignatures); - private infinitelyExpandingTypesAreIdentical(sourceType, targetType, context); - private sourcePropertyIsRelatableToTargetProperty(source, target, sourceProp, targetProp, assignableTo, comparisonCache, ast, context, comparisonInfo, isComparingInstantiatedSignatures); - private sourceCallSignaturesAreRelatableToTargetCallSignatures(source, target, assignableTo, comparisonCache, ast, context, comparisonInfo, isComparingInstantiatedSignatures); - private sourceConstructSignaturesAreRelatableToTargetConstructSignatures(source, target, assignableTo, comparisonCache, ast, context, comparisonInfo, isComparingInstantiatedSignatures); - private sourceIndexSignaturesAreRelatableToTargetIndexSignatures(source, target, assignableTo, comparisonCache, ast, context, comparisonInfo, isComparingInstantiatedSignatures); - private signatureGroupIsRelatableToTarget(source, target, sourceSG, targetSG, assignableTo, comparisonCache, ast, context, comparisonInfo, isComparingInstantiatedSignatures); - private signatureIsRelatableToTarget(sourceSig, targetSig, assignableTo, comparisonCache, ast, context, comparisonInfo, isComparingInstantiatedSignatures); - private signatureIsRelatableToTargetWorker(sourceSig, targetSig, assignableTo, comparisonCache, ast, context, comparisonInfo, isComparingInstantiatedSignatures); - private resolveOverloads(application, group, haveTypeArgumentsAtCallSite, context, diagnostics); - private getCallTargetErrorSpanAST(callEx); - private overloadHasCorrectArity(signature, args); - private overloadIsApplicable(signature, args, context, comparisonInfo); - private overloadIsApplicableForArgument(paramType, arg, argIndex, context, comparisonInfo); - private overloadIsApplicableForAnyFunctionExpressionArgument(paramType, arg, typeParameters, parameters, returnTypeAnnotation, block, bodyExpression, argIndex, context, comparisonInfo); - private overloadIsApplicableForObjectLiteralArgument(paramType, arg, argIndex, context, comparisonInfo); - private overloadIsApplicableForArrayLiteralArgument(paramType, arg, argIndex, context, comparisonInfo); - private overloadIsApplicableForOtherArgument(paramType, arg, argIndex, context, comparisonInfo); - private overloadIsApplicableForArgumentHelper(paramType, argSym, argumentIndex, comparisonInfo, arg, context); - private inferArgumentTypesForSignature(argContext, comparisonInfo, context); - private typeParametersAreInScopeAtArgumentList(typeParameters, args); - private relateTypeToTypeParametersInEnclosingType(expressionType, parameterType, argContext, context); - public relateTypeToTypeParametersWithNewEnclosingTypes(expressionType: PullTypeSymbol, parameterType: PullTypeSymbol, argContext: TypeArgumentInferenceContext, context: PullTypeResolutionContext): void; - public relateTypeToTypeParameters(expressionType: PullTypeSymbol, parameterType: PullTypeSymbol, argContext: TypeArgumentInferenceContext, context: PullTypeResolutionContext): void; - private relateTypeArgumentsOfTypeToTypeParameters(expressionType, parameterType, argContext, context); - private relateInifinitelyExpandingTypeToTypeParameters(expressionType, parameterType, argContext, context); - private relateFunctionSignatureToTypeParameters(expressionSignature, parameterSignature, argContext, context); - private relateObjectTypeToTypeParameters(objectType, parameterType, argContext, context); - private relateSignatureGroupToTypeParameters(argumentSignatures, parameterSignatures, signatureKind, argContext, context); - private alterPotentialGenericFunctionTypeToInstantiatedFunctionTypeForTypeArgumentInference(expressionSymbol, context); - private isFunctionTypeWithExactlyOneCallSignatureAndNoOtherMembers(type, callSignatureShouldBeGeneric); - public instantiateTypeToAny(typeToSpecialize: PullTypeSymbol, context: PullTypeResolutionContext): PullTypeSymbol; - public instantiateSignatureToAny(signature: PullSignatureSymbol): PullSignatureSymbol; - static globalTypeCheckPhase: number; - static typeCheck(compilationSettings: ImmutableCompilationSettings, semanticInfoChain: SemanticInfoChain, document: Document): void; - private validateVariableDeclarationGroups(enclosingDecl, context); - private typeCheckFunctionOverloads(funcDecl, context, signature?, allSignatures?); - private checkSymbolPrivacy(declSymbol, symbol, privacyErrorReporter); - private checkTypePrivacyOfSignatures(declSymbol, signatures, privacyErrorReporter); - private typeParameterOfTypeDeclarationPrivacyErrorReporter(classOrInterface, typeParameterAST, typeParameter, symbol, context); - private baseListPrivacyErrorReporter(classOrInterface, declSymbol, baseAst, isExtendedType, symbol, context); - private variablePrivacyErrorReporter(declAST, declSymbol, symbol, context); - private checkFunctionTypePrivacy(funcDeclAST, isStatic, typeParameters, parameters, returnTypeAnnotation, block, context); - private functionTypeArgumentArgumentTypePrivacyErrorReporter(declAST, isStatic, typeParameterAST, typeParameter, symbol, context); - private functionArgumentTypePrivacyErrorReporter(declAST, isStatic, parameters, argIndex, paramSymbol, symbol, context); - private functionReturnTypePrivacyErrorReporter(declAST, isStatic, returnTypeAnnotation, block, funcReturnType, symbol, context); - private enclosingClassIsDerived(classDecl); - private isSuperInvocationExpression(ast); - private isSuperInvocationExpressionStatement(node); - private getFirstStatementOfBlockOrNull(block); - private superCallMustBeFirstStatementInConstructor(constructorDecl); - private checkForThisCaptureInArrowFunction(expression); - private typeCheckMembersAgainstIndexer(containerType, containerTypeDecl, context); - private determineRelevantIndexerForMember(member, numberIndexSignature, stringIndexSignature); - private reportErrorThatMemberIsNotSubtypeOfIndexer(member, indexSignature, astForError, context, comparisonInfo); - private typeCheckIfTypeMemberPropertyOkToOverride(typeSymbol, extendedType, typeMember, extendedTypeMember, enclosingDecl, comparisonInfo); - private typeCheckIfTypeExtendsType(classOrInterface, name, typeSymbol, extendedType, enclosingDecl, context); - private typeCheckIfClassImplementsType(classDecl, classSymbol, implementedType, enclosingDecl, context); - private computeValueSymbolFromAST(valueDeclAST, context); - private hasClassTypeSymbolConflictAsValue(baseDeclAST, typeSymbol, enclosingDecl, context); - private typeCheckBase(classOrInterface, name, typeSymbol, baseDeclAST, isExtendedType, enclosingDecl, context); - private typeCheckBases(classOrInterface, name, heritageClauses, typeSymbol, enclosingDecl, context); - private checkTypeCompatibilityBetweenBases(name, typeSymbol, context); - private checkNamedPropertyIdentityBetweenBases(interfaceName, interfaceSymbol, baseTypeSymbol, inheritedMembersMap, context); - private checkIndexSignatureIdentityBetweenBases(interfaceName, interfaceSymbol, baseTypeSymbol, allInheritedSignatures, derivedTypeHasOwnNumberSignature, derivedTypeHasOwnStringSignature, context); - private checkInheritedMembersAgainstInheritedIndexSignatures(interfaceName, interfaceSymbol, inheritedIndexSignatures, inheritedMembers, context); - private checkThatInheritedNumberSignatureIsSubtypeOfInheritedStringSignature(interfaceName, interfaceSymbol, inheritedIndexSignatures, context); - private checkAssignability(ast, source, target, context); - private isReference(ast, astSymbol); - private checkForSuperMemberAccess(expression, name, resolvedName, context); - private getEnclosingDeclForAST(ast); - private getEnclosingSymbolForAST(ast); - private checkForPrivateMemberAccess(name, expressionType, resolvedName, context); - public instantiateType(type: PullTypeSymbol, typeParameterArgumentMap: TypeArgumentMap): PullTypeSymbol; - public instantiateTypeParameter(typeParameter: PullTypeParameterSymbol, typeParameterArgumentMap: TypeArgumentMap): PullTypeParameterSymbol; - public instantiateSignature(signature: PullSignatureSymbol, typeParameterArgumentMap: TypeArgumentMap): PullSignatureSymbol; - } - class TypeComparisonInfo { - public onlyCaptureFirstError: boolean; - public flags: TypeRelationshipFlags; - public message: string; - public stringConstantVal: AST; - private indent; - constructor(sourceComparisonInfo?: TypeComparisonInfo, useSameIndent?: boolean); - private indentString(); - public addMessage(message: string): void; - } - function getPropertyAssignmentNameTextFromIdentifier(identifier: AST): { - actualText: string; - memberName: string; - }; - function isTypesOnlyLocation(ast: AST): boolean; -} -declare module TypeScript { - var declCacheHit: number; - var declCacheMiss: number; - var symbolCacheHit: number; - var symbolCacheMiss: number; - class SemanticInfoChain { - private compiler; - private logger; - private documents; - private fileNameToDocument; - public anyTypeDecl: PullDecl; - public booleanTypeDecl: PullDecl; - public numberTypeDecl: PullDecl; - public stringTypeDecl: PullDecl; - public nullTypeDecl: PullDecl; - public undefinedTypeDecl: PullDecl; - public voidTypeDecl: PullDecl; - public undefinedValueDecl: PullDecl; - public anyTypeSymbol: PullPrimitiveTypeSymbol; - public booleanTypeSymbol: PullPrimitiveTypeSymbol; - public numberTypeSymbol: PullPrimitiveTypeSymbol; - public stringTypeSymbol: PullPrimitiveTypeSymbol; - public nullTypeSymbol: PullPrimitiveTypeSymbol; - public undefinedTypeSymbol: PullPrimitiveTypeSymbol; - public voidTypeSymbol: PullPrimitiveTypeSymbol; - public undefinedValueSymbol: PullSymbol; - public emptyTypeSymbol: PullTypeSymbol; - private astSymbolMap; - private astAliasSymbolMap; - private astCallResolutionDataMap; - private declSymbolMap; - private declSignatureSymbolMap; - private declCache; - private symbolCache; - private fileNameToDiagnostics; - private _binder; - private _resolver; - private _topLevelDecls; - private _fileNames; - constructor(compiler: TypeScriptCompiler, logger: ILogger); - public getDocument(fileName: string): Document; - public lineMap(fileName: string): LineMap; - public fileNames(): string[]; - private bindPrimitiveSymbol(decl, newSymbol); - private addPrimitiveTypeSymbol(decl); - private addPrimitiveValueSymbol(decl, type); - private resetGlobalSymbols(); - public addDocument(document: Document): void; - public removeDocument(fileName: string): void; - private getDeclPathCacheID(declPath, declKind); - public findTopLevelSymbol(name: string, kind: PullElementKind, doNotGoPastThisDecl: PullDecl): PullSymbol; - private findTopLevelSymbolInDecl(topLevelDecl, name, kind, doNotGoPastThisDecl); - public findExternalModule(id: string): PullContainerSymbol; - public findAmbientExternalModuleInGlobalContext(id: string): PullContainerSymbol; - public findDecls(declPath: string[], declKind: PullElementKind): PullDecl[]; - public findDeclsFromPath(declPath: PullDecl[], declKind: PullElementKind): PullDecl[]; - public findSymbol(declPath: string[], declType: PullElementKind): PullSymbol; - public cacheGlobalSymbol(symbol: PullSymbol, kind: PullElementKind): void; - public invalidate(oldSettings?: ImmutableCompilationSettings, newSettings?: ImmutableCompilationSettings): void; - private settingsChangeAffectsSyntax(before, after); - public setSymbolForAST(ast: AST, symbol: PullSymbol): void; - public getSymbolForAST(ast: AST): PullSymbol; - public setAliasSymbolForAST(ast: AST, symbol: PullTypeAliasSymbol): void; - public getAliasSymbolForAST(ast: AST): PullTypeAliasSymbol; - public getCallResolutionDataForAST(ast: AST): PullAdditionalCallResolutionData; - public setCallResolutionDataForAST(ast: AST, callResolutionData: PullAdditionalCallResolutionData): void; - public setSymbolForDecl(decl: PullDecl, symbol: PullSymbol): void; - public getSymbolForDecl(decl: PullDecl): PullSymbol; - public setSignatureSymbolForDecl(decl: PullDecl, signatureSymbol: PullSignatureSymbol): void; - public getSignatureSymbolForDecl(decl: PullDecl): PullSignatureSymbol; - public addDiagnostic(diagnostic: Diagnostic): void; - public getDiagnostics(fileName: string): Diagnostic[]; - public getBinder(): PullSymbolBinder; - public getResolver(): PullTypeResolver; - public addSyntheticIndexSignature(containingDecl: PullDecl, containingSymbol: PullTypeSymbol, ast: AST, indexParamName: string, indexParamType: PullTypeSymbol, returnType: PullTypeSymbol): void; - public getDeclForAST(ast: AST): PullDecl; - public getEnclosingDecl(ast: AST): PullDecl; - public setDeclForAST(ast: AST, decl: PullDecl): void; - public getASTForDecl(decl: PullDecl): AST; - public setASTForDecl(decl: PullDecl, ast: AST): void; - public topLevelDecl(fileName: string): PullDecl; - public topLevelDecls(): PullDecl[]; - public addDiagnosticFromAST(ast: AST, diagnosticKey: string, _arguments?: any[], additionalLocations?: Location[]): void; - public diagnosticFromAST(ast: AST, diagnosticKey: string, _arguments?: any[], additionalLocations?: Location[]): Diagnostic; - public locationFromAST(ast: AST): Location; - public duplicateIdentifierDiagnosticFromAST(ast: AST, identifier: string, additionalLocationAST: AST): Diagnostic; - public addDuplicateIdentifierDiagnosticFromAST(ast: AST, identifier: string, additionalLocationAST: AST): void; - } -} -declare module TypeScript { - module DeclarationCreator { - function create(document: Document, semanticInfoChain: SemanticInfoChain, compilationSettings: ImmutableCompilationSettings): PullDecl; - } -} -declare module TypeScript { - class PullSymbolBinder { - private semanticInfoChain; - private declsBeingBound; - private inBindingOtherDeclsWalker; - constructor(semanticInfoChain: SemanticInfoChain); - private getParent(decl, returnInstanceType?); - private findDeclsInContext(startingDecl, declKind, searchGlobally); - private getExistingSymbol(decl, searchKind, parent); - private checkThatExportsMatch(decl, prevSymbol, reportError?); - private getIndexForInsertingSignatureAtEndOfEnclosingDeclInSignatureList(signature, currentSignatures); - private bindEnumDeclarationToPullSymbol(enumContainerDecl); - private bindEnumIndexerDeclsToPullSymbols(enumContainerSymbol); - private findExistingVariableSymbolForModuleValueDecl(decl); - private bindModuleDeclarationToPullSymbol(moduleContainerDecl); - private bindImportDeclaration(importDeclaration); - private ensurePriorDeclarationsAreBound(container, currentDecl); - private bindClassDeclarationToPullSymbol(classDecl); - private bindInterfaceDeclarationToPullSymbol(interfaceDecl); - private bindObjectTypeDeclarationToPullSymbol(objectDecl); - private bindConstructorTypeDeclarationToPullSymbol(constructorTypeDeclaration); - private bindVariableDeclarationToPullSymbol(variableDeclaration); - private bindCatchVariableToPullSymbol(variableDeclaration); - private bindEnumMemberDeclarationToPullSymbol(propertyDeclaration); - private bindPropertyDeclarationToPullSymbol(propertyDeclaration); - private bindParameterSymbols(functionDeclaration, parameterList, funcType, signatureSymbol); - private bindFunctionDeclarationToPullSymbol(functionDeclaration); - private bindFunctionExpressionToPullSymbol(functionExpressionDeclaration); - private bindFunctionTypeDeclarationToPullSymbol(functionTypeDeclaration); - private bindMethodDeclarationToPullSymbol(methodDeclaration); - private bindStaticPrototypePropertyOfClass(classAST, classTypeSymbol, constructorTypeSymbol); - private bindConstructorDeclarationToPullSymbol(constructorDeclaration); - private bindConstructSignatureDeclarationToPullSymbol(constructSignatureDeclaration); - private bindCallSignatureDeclarationToPullSymbol(callSignatureDeclaration); - private bindIndexSignatureDeclarationToPullSymbol(indexSignatureDeclaration); - private bindGetAccessorDeclarationToPullSymbol(getAccessorDeclaration); - private bindSetAccessorDeclarationToPullSymbol(setAccessorDeclaration); - private getDeclsToBind(decl); - private shouldBindDeclaration(decl); - public bindDeclToPullSymbol(decl: PullDecl): void; - private bindAllDeclsToPullSymbol(askedDecl); - private bindSingleDeclToPullSymbol(decl); - } -} -declare module TypeScript { - module PullHelpers { - function diagnosticFromDecl(decl: PullDecl, diagnosticKey: string, _arguments?: any[], additionalLocations?: Location[]): Diagnostic; - function resolveDeclaredSymbolToUseType(symbol: PullSymbol): void; - interface SignatureInfoForFuncDecl { - signature: PullSignatureSymbol; - allSignatures: PullSignatureSymbol[]; - } - function getSignatureForFuncDecl(functionDecl: PullDecl): { - signature: PullSignatureSymbol; - allSignatures: PullSignatureSymbol[]; - }; - function getAccessorSymbol(getterOrSetter: AST, semanticInfoChain: SemanticInfoChain): PullAccessorSymbol; - function getGetterAndSetterFunction(funcDecl: AST, semanticInfoChain: SemanticInfoChain): { - getter: GetAccessor; - setter: SetAccessor; - }; - function symbolIsEnum(source: PullSymbol): boolean; - function symbolIsModule(symbol: PullSymbol): boolean; - function isNameNumeric(name: string): boolean; - function typeSymbolsAreIdentical(a: PullTypeSymbol, b: PullTypeSymbol): boolean; - function getRootType(type: PullTypeSymbol): PullTypeSymbol; - function isSymbolLocal(symbol: PullSymbol): boolean; - function isExportedSymbolInClodule(symbol: PullSymbol): boolean; - function isSymbolDeclaredInScopeChain(symbol: PullSymbol, scopeSymbol: PullSymbol): boolean; - interface PullTypeSymbolStructureWalker { - memberSymbolWalk(memberSymbol: PullSymbol): boolean; - callSignatureWalk(signatureSymbol: PullSignatureSymbol): boolean; - constructSignatureWalk(signatureSymbol: PullSignatureSymbol): boolean; - indexSignatureWalk(signatureSymbol: PullSignatureSymbol): boolean; - signatureParameterWalk(parameterSymbol: PullSymbol): boolean; - signatureReturnTypeWalk(returnType: PullTypeSymbol): boolean; - } - function walkPullTypeSymbolStructure(typeSymbol: PullTypeSymbol, walker: PullTypeSymbolStructureWalker): void; - class OtherPullDeclsWalker { - private currentlyWalkingOtherDecls; - public walkOtherPullDecls(currentDecl: PullDecl, otherDecls: PullDecl[], callBack: (otherDecl: PullDecl) => void): void; - } - } -} -declare module TypeScript { - class WrapsTypeParameterCache { - private _wrapsTypeParameterCache; - public getWrapsTypeParameter(typeParameterArgumentMap: TypeArgumentMap): number; - public setWrapsTypeParameter(typeParameterArgumentMap: TypeArgumentMap, wrappingTypeParameterID: number): void; - } - module PullInstantiationHelpers { - class MutableTypeArgumentMap { - public typeParameterArgumentMap: TypeArgumentMap; - public createdDuplicateTypeArgumentMap: boolean; - constructor(typeParameterArgumentMap: TypeArgumentMap); - public ensureTypeArgumentCopy(): void; - } - function instantiateTypeArgument(resolver: PullTypeResolver, symbol: InstantiableSymbol, mutableTypeParameterMap: MutableTypeArgumentMap): void; - function cleanUpTypeArgumentMap(symbol: InstantiableSymbol, mutableTypeArgumentMap: MutableTypeArgumentMap): void; - function getAllowedToReferenceTypeParametersFromDecl(decl: PullDecl): PullTypeParameterSymbol[]; - function createTypeParameterArgumentMap(typeParameters: PullTypeParameterSymbol[], typeArguments: PullTypeSymbol[]): TypeArgumentMap; - function updateTypeParameterArgumentMap(typeParameters: PullTypeParameterSymbol[], typeArguments: PullTypeSymbol[], typeParameterArgumentMap: TypeArgumentMap): TypeArgumentMap; - function updateMutableTypeParameterArgumentMap(typeParameters: PullTypeParameterSymbol[], typeArguments: PullTypeSymbol[], mutableMap: MutableTypeArgumentMap): void; - function twoTypesAreInstantiationsOfSameNamedGenericType(type1: PullTypeSymbol, type2: PullTypeSymbol): boolean; - } -} -declare module TypeScript { - var fileResolutionTime: number; - var fileResolutionIOTime: number; - var fileResolutionScanImportsTime: number; - var fileResolutionImportFileSearchTime: number; - var fileResolutionGetDefaultLibraryTime: number; - var sourceCharactersCompiled: number; - var syntaxTreeParseTime: number; - var syntaxDiagnosticsTime: number; - var astTranslationTime: number; - var typeCheckTime: number; - var compilerResolvePathTime: number; - var compilerDirectoryNameTime: number; - var compilerDirectoryExistsTime: number; - var compilerFileExistsTime: number; - var emitTime: number; - var emitWriteFileTime: number; - var declarationEmitTime: number; - var declarationEmitIsExternallyVisibleTime: number; - var declarationEmitTypeSignatureTime: number; - var declarationEmitGetBoundDeclTypeTime: number; - var declarationEmitIsOverloadedCallSignatureTime: number; - var declarationEmitFunctionDeclarationGetSymbolTime: number; - var declarationEmitGetBaseTypeTime: number; - var declarationEmitGetAccessorFunctionTime: number; - var declarationEmitGetTypeParameterSymbolTime: number; - var declarationEmitGetImportDeclarationSymbolTime: number; - var ioHostResolvePathTime: number; - var ioHostDirectoryNameTime: number; - var ioHostCreateDirectoryStructureTime: number; - var ioHostWriteFileTime: number; - interface PullSymbolInfo { - symbol: PullSymbol; - aliasSymbol: PullTypeAliasSymbol; - ast: AST; - enclosingScopeSymbol: PullSymbol; - } - interface PullCallSymbolInfo { - targetSymbol: PullSymbol; - resolvedSignatures: PullSignatureSymbol[]; - candidateSignature: PullSignatureSymbol; - isConstructorCall: boolean; - ast: AST; - enclosingScopeSymbol: PullSymbol; - } - interface PullVisibleSymbolsInfo { - symbols: PullSymbol[]; - enclosingScopeSymbol: PullSymbol; - } - enum EmitOutputResult { - Succeeded = 0, - FailedBecauseOfSyntaxErrors = 1, - FailedBecauseOfCompilerOptionsErrors = 2, - FailedToGenerateDeclarationsBecauseOfSemanticErrors = 3, - } - class EmitOutput { - public outputFiles: OutputFile[]; - public emitOutputResult: EmitOutputResult; - constructor(emitOutputResult?: EmitOutputResult); - } - enum OutputFileType { - JavaScript = 0, - SourceMap = 1, - Declaration = 2, - } - class OutputFile { - public name: string; - public writeByteOrderMark: boolean; - public text: string; - public fileType: OutputFileType; - public sourceMapEntries: SourceMapEntry[]; - constructor(name: string, writeByteOrderMark: boolean, text: string, fileType: OutputFileType, sourceMapEntries?: SourceMapEntry[]); - } - class CompileResult { - public diagnostics: Diagnostic[]; - public outputFiles: OutputFile[]; - static fromDiagnostics(diagnostics: Diagnostic[]): CompileResult; - static fromOutputFiles(outputFiles: OutputFile[]): CompileResult; - } - class TypeScriptCompiler { - public logger: ILogger; - private _settings; - private semanticInfoChain; - constructor(logger?: ILogger, _settings?: ImmutableCompilationSettings); - public compilationSettings(): ImmutableCompilationSettings; - public setCompilationSettings(newSettings: ImmutableCompilationSettings): void; - public getDocument(fileName: string): Document; - public cleanupSemanticCache(): void; - public addFile(fileName: string, scriptSnapshot: IScriptSnapshot, byteOrderMark: ByteOrderMark, version: number, isOpen: boolean, referencedFiles?: string[]): void; - public updateFile(fileName: string, scriptSnapshot: IScriptSnapshot, version: number, isOpen: boolean, textChangeRange: TextChangeRange): void; - public removeFile(fileName: string): void; - public mapOutputFileName(document: Document, emitOptions: EmitOptions, extensionChanger: (fname: string, wholeFileNameReplaced: boolean) => string): string; - private writeByteOrderMarkForDocument(document); - static mapToDTSFileName(fileName: string, wholeFileNameReplaced: boolean): string; - public _shouldEmit(document: Document): boolean; - public _shouldEmitDeclarations(document: Document): boolean; - private emitDocumentDeclarationsWorker(document, emitOptions, declarationEmitter?); - public _emitDocumentDeclarations(document: Document, emitOptions: EmitOptions, onSingleFileEmitComplete: (files: OutputFile) => void, sharedEmitter: DeclarationEmitter): DeclarationEmitter; - public emitAllDeclarations(resolvePath: (path: string) => string): EmitOutput; - public emitDeclarations(fileName: string, resolvePath: (path: string) => string): EmitOutput; - public canEmitDeclarations(fileName: string): boolean; - static mapToFileNameExtension(extension: string, fileName: string, wholeFileNameReplaced: boolean): string; - static mapToJSFileName(fileName: string, wholeFileNameReplaced: boolean): string; - private emitDocumentWorker(document, emitOptions, emitter?); - public _emitDocument(document: Document, emitOptions: EmitOptions, onSingleFileEmitComplete: (files: OutputFile[]) => void, sharedEmitter: Emitter): Emitter; - public emitAll(resolvePath: (path: string) => string): EmitOutput; - public emit(fileName: string, resolvePath: (path: string) => string): EmitOutput; - public compile(resolvePath: (path: string) => string, continueOnDiagnostics?: boolean): Iterator; - public getSyntacticDiagnostics(fileName: string): Diagnostic[]; - private getSyntaxTree(fileName); - private getSourceUnit(fileName); - public getSemanticDiagnostics(fileName: string): Diagnostic[]; - public getCompilerOptionsDiagnostics(resolvePath: (path: string) => string): Diagnostic[]; - public resolveAllFiles(): void; - public getSymbolOfDeclaration(decl: PullDecl): PullSymbol; - private extractResolutionContextFromAST(resolver, ast, document, propagateContextualTypes); - private extractResolutionContextForVariable(inContextuallyTypedAssignment, propagateContextualTypes, resolver, resolutionContext, enclosingDecl, assigningAST, init); - private getASTPath(ast); - public pullGetSymbolInformationFromAST(ast: AST, document: Document): PullSymbolInfo; - public pullGetCallInformationFromAST(ast: AST, document: Document): PullCallSymbolInfo; - public pullGetVisibleMemberSymbolsFromAST(ast: AST, document: Document): PullVisibleSymbolsInfo; - public pullGetVisibleDeclsFromAST(ast: AST, document: Document): PullDecl[]; - public pullGetContextualMembersFromAST(ast: AST, document: Document): PullVisibleSymbolsInfo; - public pullGetDeclInformation(decl: PullDecl, ast: AST, document: Document): PullSymbolInfo; - public topLevelDeclaration(fileName: string): PullDecl; - public getDeclForAST(ast: AST): PullDecl; - public fileNames(): string[]; - public topLevelDecl(fileName: string): PullDecl; - private static getLocationText(location, resolvePath); - static getFullDiagnosticText(diagnostic: Diagnostic, resolvePath: (path: string) => string): string; - } - function compareDataObjects(dst: any, src: any): boolean; -} -declare module TypeScript { - enum GenerativeTypeClassification { - Unknown = 0, - Open = 1, - Closed = 2, - InfinitelyExpanding = 3, - } - interface TypeArgumentMap { - [n: number]: PullTypeSymbol; - } - class PullTypeReferenceSymbol extends PullTypeSymbol { - public referencedTypeSymbol: PullTypeSymbol; - static createTypeReference(type: PullTypeSymbol): PullTypeReferenceSymbol; - constructor(referencedTypeSymbol: PullTypeSymbol); - public isTypeReference(): boolean; - public isResolved: boolean; - public setResolved(): void; - public setUnresolved(): void; - public invalidate(): void; - public ensureReferencedTypeIsResolved(): void; - public getReferencedTypeSymbol(): PullTypeSymbol; - public _getResolver(): PullTypeResolver; - public hasMembers(): boolean; - public setAssociatedContainerType(type: PullTypeSymbol): void; - public getAssociatedContainerType(): PullTypeSymbol; - public getFunctionSymbol(): PullSymbol; - public setFunctionSymbol(symbol: PullSymbol): void; - public addContainedNonMember(nonMember: PullSymbol): void; - public findContainedNonMemberContainer(containerName: string, kind?: PullElementKind): PullTypeSymbol; - public addMember(memberSymbol: PullSymbol): void; - public addEnclosedMemberType(enclosedType: PullTypeSymbol): void; - public addEnclosedMemberContainer(enclosedContainer: PullTypeSymbol): void; - public addEnclosedNonMember(enclosedNonMember: PullSymbol): void; - public addEnclosedNonMemberType(enclosedNonMemberType: PullTypeSymbol): void; - public addEnclosedNonMemberContainer(enclosedNonMemberContainer: PullTypeSymbol): void; - public addTypeParameter(typeParameter: PullTypeParameterSymbol): void; - public addConstructorTypeParameter(typeParameter: PullTypeParameterSymbol): void; - public findContainedNonMember(name: string): PullSymbol; - public findContainedNonMemberType(typeName: string, kind?: PullElementKind): PullTypeSymbol; - public getMembers(): PullSymbol[]; - public setHasDefaultConstructor(hasOne?: boolean): void; - public getHasDefaultConstructor(): boolean; - public getConstructorMethod(): PullSymbol; - public setConstructorMethod(constructorMethod: PullSymbol): void; - public getTypeParameters(): PullTypeParameterSymbol[]; - public isGeneric(): boolean; - public addSpecialization(specializedVersionOfThisType: PullTypeSymbol, substitutingTypes: PullTypeSymbol[]): void; - public getSpecialization(substitutingTypes: PullTypeSymbol[]): PullTypeSymbol; - public getKnownSpecializations(): PullTypeSymbol[]; - public getTypeArguments(): PullTypeSymbol[]; - public getTypeArgumentsOrTypeParameters(): PullTypeSymbol[]; - public appendCallSignature(callSignature: PullSignatureSymbol): void; - public insertCallSignatureAtIndex(callSignature: PullSignatureSymbol, index: number): void; - public appendConstructSignature(callSignature: PullSignatureSymbol): void; - public insertConstructSignatureAtIndex(callSignature: PullSignatureSymbol, index: number): void; - public addIndexSignature(indexSignature: PullSignatureSymbol): void; - public hasOwnCallSignatures(): boolean; - public getCallSignatures(): PullSignatureSymbol[]; - public hasOwnConstructSignatures(): boolean; - public getConstructSignatures(): PullSignatureSymbol[]; - public hasOwnIndexSignatures(): boolean; - public getIndexSignatures(): PullSignatureSymbol[]; - public addImplementedType(implementedType: PullTypeSymbol): void; - public getImplementedTypes(): PullTypeSymbol[]; - public addExtendedType(extendedType: PullTypeSymbol): void; - public getExtendedTypes(): PullTypeSymbol[]; - public addTypeThatExtendsThisType(type: PullTypeSymbol): void; - public getTypesThatExtendThisType(): PullTypeSymbol[]; - public addTypeThatExplicitlyImplementsThisType(type: PullTypeSymbol): void; - public getTypesThatExplicitlyImplementThisType(): PullTypeSymbol[]; - public isValidBaseKind(baseType: PullTypeSymbol, isExtendedType: boolean): boolean; - public findMember(name: string, lookInParent?: boolean): PullSymbol; - public findNestedType(name: string, kind?: PullElementKind): PullTypeSymbol; - public findNestedContainer(name: string, kind?: PullElementKind): PullTypeSymbol; - public getAllMembers(searchDeclKind: PullElementKind, memberVisiblity: GetAllMembersVisiblity): PullSymbol[]; - public findTypeParameter(name: string): PullTypeParameterSymbol; - public hasOnlyOverloadCallSignatures(): boolean; - } - var nSpecializationsCreated: number; - var nSpecializedSignaturesCreated: number; - var nSpecializedTypeParameterCreated: number; - class PullInstantiatedTypeReferenceSymbol extends PullTypeReferenceSymbol { - public referencedTypeSymbol: PullTypeSymbol; - private _typeParameterArgumentMap; - public isInstanceReferenceType: boolean; - private _instantiatedMembers; - private _allInstantiatedMemberNameCache; - private _instantiatedMemberNameCache; - private _instantiatedCallSignatures; - private _instantiatedConstructSignatures; - private _instantiatedIndexSignatures; - private _typeArgumentReferences; - private _instantiatedConstructorMethod; - private _instantiatedAssociatedContainerType; - private _isArray; - public getIsSpecialized(): boolean; - private _generativeTypeClassification; - public getGenerativeTypeClassification(enclosingType: PullTypeSymbol): GenerativeTypeClassification; - public isArrayNamedTypeReference(): boolean; - public getElementType(): PullTypeSymbol; - public getReferencedTypeSymbol(): PullTypeSymbol; - static create(resolver: PullTypeResolver, type: PullTypeSymbol, typeParameterArgumentMap: TypeArgumentMap): PullInstantiatedTypeReferenceSymbol; - constructor(referencedTypeSymbol: PullTypeSymbol, _typeParameterArgumentMap: TypeArgumentMap, isInstanceReferenceType: boolean); - public isGeneric(): boolean; - public getTypeParameterArgumentMap(): TypeArgumentMap; - public getTypeArguments(): PullTypeSymbol[]; - public getTypeArgumentsOrTypeParameters(): PullTypeSymbol[]; - private populateInstantiatedMemberFromReferencedMember(referencedMember); - public getMembers(): PullSymbol[]; - public findMember(name: string, lookInParent?: boolean): PullSymbol; - public getAllMembers(searchDeclKind: PullElementKind, memberVisiblity: GetAllMembersVisiblity): PullSymbol[]; - public getConstructorMethod(): PullSymbol; - public getAssociatedContainerType(): PullTypeSymbol; - public getCallSignatures(): PullSignatureSymbol[]; - public getConstructSignatures(): PullSignatureSymbol[]; - public getIndexSignatures(): PullSignatureSymbol[]; - } - class PullInstantiatedSignatureSymbol extends PullSignatureSymbol { - private _typeParameterArgumentMap; - public getTypeParameterArgumentMap(): TypeArgumentMap; - constructor(rootSignature: PullSignatureSymbol, _typeParameterArgumentMap: TypeArgumentMap); - public getIsSpecialized(): boolean; - public _getResolver(): PullTypeResolver; - public getTypeParameters(): PullTypeParameterSymbol[]; - public getAllowedToReferenceTypeParameters(): PullTypeParameterSymbol[]; - } - class PullInstantiatedTypeParameterSymbol extends PullTypeParameterSymbol { - constructor(rootTypeParameter: PullTypeSymbol, constraintType: PullTypeSymbol); - public _getResolver(): PullTypeResolver; - } -} -declare module TypeScript { - class SyntaxTreeToAstVisitor implements ISyntaxVisitor { - private fileName; - public lineMap: LineMap; - private compilationSettings; - public position: number; - public previousTokenTrailingComments: Comment[]; - constructor(fileName: string, lineMap: LineMap, compilationSettings: ImmutableCompilationSettings); - static visit(syntaxTree: SyntaxTree, fileName: string, compilationSettings: ImmutableCompilationSettings, incrementalAST: boolean): SourceUnit; - public movePast(element: ISyntaxElement): void; - private moveTo(element1, element2); - private setCommentsAndSpan(ast, fullStart, node); - public createTokenSpan(fullStart: number, element: ISyntaxToken): ASTSpan; - public setSpan(span: AST, fullStart: number, element: ISyntaxElement, firstToken?: ISyntaxToken, lastToken?: ISyntaxToken): void; - public setSpanExplicit(span: IASTSpan, start: number, end: number): void; - public visitSyntaxList(node: ISyntaxList): ISyntaxList2; - public visitSeparatedSyntaxList(list: ISeparatedSyntaxList): ISeparatedSyntaxList2; - private convertComment(trivia, commentStartPosition, hasTrailingNewLine); - private convertComments(triviaList, commentStartPosition); - private mergeComments(comments1, comments2); - private convertTokenLeadingComments(token, commentStartPosition); - private convertTokenTrailingComments(token, commentStartPosition); - private convertNodeTrailingComments(node, lastToken, nodeStart); - private visitIdentifier(token); - public visitToken(token: ISyntaxToken): IASTToken; - public visitTokenWorker(token: ISyntaxToken): IASTToken; - public visitSourceUnit(node: SourceUnitSyntax): SourceUnit; - public visitExternalModuleReference(node: ExternalModuleReferenceSyntax): ExternalModuleReference; - public visitModuleNameModuleReference(node: ModuleNameModuleReferenceSyntax): ModuleNameModuleReference; - public visitClassDeclaration(node: ClassDeclarationSyntax): ClassDeclaration; - private visitModifiers(modifiers); - public visitInterfaceDeclaration(node: InterfaceDeclarationSyntax): InterfaceDeclaration; - public visitHeritageClause(node: HeritageClauseSyntax): HeritageClause; - public visitModuleDeclaration(node: ModuleDeclarationSyntax): ModuleDeclaration; - public visitFunctionDeclaration(node: FunctionDeclarationSyntax): FunctionDeclaration; - public visitEnumDeclaration(node: EnumDeclarationSyntax): EnumDeclaration; - public visitEnumElement(node: EnumElementSyntax): EnumElement; - public visitImportDeclaration(node: ImportDeclarationSyntax): ImportDeclaration; - public visitExportAssignment(node: ExportAssignmentSyntax): ExportAssignment; - public visitVariableStatement(node: VariableStatementSyntax): VariableStatement; - public visitVariableDeclaration(node: VariableDeclarationSyntax): VariableDeclaration; - public visitVariableDeclarator(node: VariableDeclaratorSyntax): VariableDeclarator; - public visitEqualsValueClause(node: EqualsValueClauseSyntax): EqualsValueClause; - public visitPrefixUnaryExpression(node: PrefixUnaryExpressionSyntax): PrefixUnaryExpression; - public visitArrayLiteralExpression(node: ArrayLiteralExpressionSyntax): ArrayLiteralExpression; - public visitOmittedExpression(node: OmittedExpressionSyntax): OmittedExpression; - public visitParenthesizedExpression(node: ParenthesizedExpressionSyntax): ParenthesizedExpression; - public visitSimpleArrowFunctionExpression(node: SimpleArrowFunctionExpressionSyntax): SimpleArrowFunctionExpression; - public visitParenthesizedArrowFunctionExpression(node: ParenthesizedArrowFunctionExpressionSyntax): ParenthesizedArrowFunctionExpression; - public visitType(type: ITypeSyntax): AST; - public visitTypeQuery(node: TypeQuerySyntax): TypeQuery; - public visitQualifiedName(node: QualifiedNameSyntax): QualifiedName; - public visitTypeArgumentList(node: TypeArgumentListSyntax): TypeArgumentList; - public visitConstructorType(node: ConstructorTypeSyntax): ConstructorType; - public visitFunctionType(node: FunctionTypeSyntax): FunctionType; - public visitObjectType(node: ObjectTypeSyntax): ObjectType; - public visitArrayType(node: ArrayTypeSyntax): ArrayType; - public visitGenericType(node: GenericTypeSyntax): GenericType; - public visitTypeAnnotation(node: TypeAnnotationSyntax): TypeAnnotation; - public visitBlock(node: BlockSyntax): Block; - public visitParameter(node: ParameterSyntax): Parameter; - public visitMemberAccessExpression(node: MemberAccessExpressionSyntax): MemberAccessExpression; - public visitPostfixUnaryExpression(node: PostfixUnaryExpressionSyntax): PostfixUnaryExpression; - public visitElementAccessExpression(node: ElementAccessExpressionSyntax): ElementAccessExpression; - public visitInvocationExpression(node: InvocationExpressionSyntax): InvocationExpression; - public visitArgumentList(node: ArgumentListSyntax): ArgumentList; - public visitBinaryExpression(node: BinaryExpressionSyntax): BinaryExpression; - public visitConditionalExpression(node: ConditionalExpressionSyntax): ConditionalExpression; - public visitConstructSignature(node: ConstructSignatureSyntax): ConstructSignature; - public visitMethodSignature(node: MethodSignatureSyntax): MethodSignature; - public visitIndexSignature(node: IndexSignatureSyntax): IndexSignature; - public visitPropertySignature(node: PropertySignatureSyntax): PropertySignature; - public visitParameterList(node: ParameterListSyntax): ParameterList; - public visitCallSignature(node: CallSignatureSyntax): CallSignature; - public visitTypeParameterList(node: TypeParameterListSyntax): TypeParameterList; - public visitTypeParameter(node: TypeParameterSyntax): TypeParameter; - public visitConstraint(node: ConstraintSyntax): Constraint; - public visitIfStatement(node: IfStatementSyntax): IfStatement; - public visitElseClause(node: ElseClauseSyntax): ElseClause; - public visitExpressionStatement(node: ExpressionStatementSyntax): ExpressionStatement; - public visitConstructorDeclaration(node: ConstructorDeclarationSyntax): ConstructorDeclaration; - public visitIndexMemberDeclaration(node: IndexMemberDeclarationSyntax): IndexMemberDeclaration; - public visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): MemberFunctionDeclaration; - public visitGetAccessor(node: GetAccessorSyntax): GetAccessor; - public visitSetAccessor(node: SetAccessorSyntax): SetAccessor; - public visitMemberVariableDeclaration(node: MemberVariableDeclarationSyntax): MemberVariableDeclaration; - public visitThrowStatement(node: ThrowStatementSyntax): ThrowStatement; - public visitReturnStatement(node: ReturnStatementSyntax): ReturnStatement; - public visitObjectCreationExpression(node: ObjectCreationExpressionSyntax): ObjectCreationExpression; - public visitSwitchStatement(node: SwitchStatementSyntax): SwitchStatement; - public visitCaseSwitchClause(node: CaseSwitchClauseSyntax): CaseSwitchClause; - public visitDefaultSwitchClause(node: DefaultSwitchClauseSyntax): DefaultSwitchClause; - public visitBreakStatement(node: BreakStatementSyntax): BreakStatement; - public visitContinueStatement(node: ContinueStatementSyntax): ContinueStatement; - public visitForStatement(node: ForStatementSyntax): ForStatement; - public visitForInStatement(node: ForInStatementSyntax): ForInStatement; - public visitWhileStatement(node: WhileStatementSyntax): WhileStatement; - public visitWithStatement(node: WithStatementSyntax): WithStatement; - public visitCastExpression(node: CastExpressionSyntax): CastExpression; - public visitObjectLiteralExpression(node: ObjectLiteralExpressionSyntax): ObjectLiteralExpression; - public visitSimplePropertyAssignment(node: SimplePropertyAssignmentSyntax): SimplePropertyAssignment; - public visitFunctionPropertyAssignment(node: FunctionPropertyAssignmentSyntax): FunctionPropertyAssignment; - public visitFunctionExpression(node: FunctionExpressionSyntax): FunctionExpression; - public visitEmptyStatement(node: EmptyStatementSyntax): EmptyStatement; - public visitTryStatement(node: TryStatementSyntax): TryStatement; - public visitCatchClause(node: CatchClauseSyntax): CatchClause; - public visitFinallyClause(node: FinallyClauseSyntax): FinallyClause; - public visitLabeledStatement(node: LabeledStatementSyntax): LabeledStatement; - public visitDoStatement(node: DoStatementSyntax): DoStatement; - public visitTypeOfExpression(node: TypeOfExpressionSyntax): TypeOfExpression; - public visitDeleteExpression(node: DeleteExpressionSyntax): DeleteExpression; - public visitVoidExpression(node: VoidExpressionSyntax): VoidExpression; - public visitDebuggerStatement(node: DebuggerStatementSyntax): DebuggerStatement; - } -} -declare module TypeScript { - interface IASTSpan { - _start: number; - _end: number; - start(): number; - end(): number; - } - class ASTSpan implements IASTSpan { - public _start: number; - public _end: number; - constructor(_start: number, _end: number); - public start(): number; - public end(): number; - } - function structuralEqualsNotIncludingPosition(ast1: AST, ast2: AST): boolean; - function structuralEqualsIncludingPosition(ast1: AST, ast2: AST): boolean; - class AST implements IASTSpan { - public parent: AST; - public _start: number; - public _end: number; - public _trailingTriviaWidth: number; - private _astID; - private _preComments; - private _postComments; - constructor(); - public syntaxID(): number; - public start(): number; - public end(): number; - public trailingTriviaWidth(): number; - public fileName(): string; - public kind(): SyntaxKind; - public preComments(): Comment[]; - public postComments(): Comment[]; - public setPreComments(comments: Comment[]): void; - public setPostComments(comments: Comment[]): void; - public width(): number; - public structuralEquals(ast: AST, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - interface IASTToken extends AST { - text(): string; - valueText(): string; - } - class ISyntaxList2 extends AST { - private _fileName; - private members; - constructor(_fileName: string, members: AST[]); - public childCount(): number; - public childAt(index: number): AST; - public fileName(): string; - public kind(): SyntaxKind; - public firstOrDefault(func: (v: AST, index: number) => boolean): AST; - public lastOrDefault(func: (v: AST, index: number) => boolean): AST; - public any(func: (v: AST) => boolean): boolean; - public structuralEquals(ast: ISyntaxList2, includingPosition: boolean): boolean; - } - class ISeparatedSyntaxList2 extends AST { - private _fileName; - private members; - private _separatorCount; - constructor(_fileName: string, members: AST[], _separatorCount: number); - public nonSeparatorCount(): number; - public separatorCount(): number; - public nonSeparatorAt(index: number): AST; - public nonSeparatorIndexOf(ast: AST): number; - public fileName(): string; - public kind(): SyntaxKind; - public structuralEquals(ast: ISeparatedSyntaxList2, includingPosition: boolean): boolean; - } - class SourceUnit extends AST { - public moduleElements: ISyntaxList2; - public endOfFileTokenLeadingComments: Comment[]; - private _fileName; - constructor(moduleElements: ISyntaxList2, endOfFileTokenLeadingComments: Comment[], _fileName: string); - public fileName(): string; - public kind(): SyntaxKind; - public structuralEquals(ast: SourceUnit, includingPosition: boolean): boolean; - } - class Identifier extends AST implements IASTToken { - private _text; - private _valueText; - constructor(_text: string); - public text(): string; - public valueText(): string; - public kind(): SyntaxKind; - public structuralEquals(ast: Identifier, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class LiteralExpression extends AST { - private _nodeType; - private _text; - private _valueText; - constructor(_nodeType: SyntaxKind, _text: string, _valueText: string); - public text(): string; - public valueText(): string; - public kind(): SyntaxKind; - public structuralEquals(ast: ParenthesizedExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class ThisExpression extends AST implements IASTToken { - private _text; - private _valueText; - constructor(_text: string, _valueText: string); - public text(): string; - public valueText(): string; - public kind(): SyntaxKind; - public structuralEquals(ast: ParenthesizedExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class SuperExpression extends AST implements IASTToken { - private _text; - private _valueText; - constructor(_text: string, _valueText: string); - public text(): string; - public valueText(): string; - public kind(): SyntaxKind; - public structuralEquals(ast: ParenthesizedExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class NumericLiteral extends AST implements IASTToken { - private _value; - private _text; - private _valueText; - constructor(_value: number, _text: string, _valueText: string); - public text(): string; - public valueText(): string; - public value(): any; - public kind(): SyntaxKind; - public structuralEquals(ast: NumericLiteral, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class RegularExpressionLiteral extends AST implements IASTToken { - private _text; - private _valueText; - constructor(_text: string, _valueText: string); - public text(): string; - public valueText(): string; - public kind(): SyntaxKind; - public isExpression(): boolean; - } - class StringLiteral extends AST implements IASTToken { - private _text; - private _valueText; - constructor(_text: string, _valueText: string); - public text(): string; - public valueText(): string; - public kind(): SyntaxKind; - public structuralEquals(ast: StringLiteral, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class TypeAnnotation extends AST { - public type: AST; - constructor(type: AST); - public kind(): SyntaxKind; - } - class BuiltInType extends AST implements IASTToken { - private _nodeType; - private _text; - private _valueText; - constructor(_nodeType: SyntaxKind, _text: string, _valueText: string); - public text(): string; - public valueText(): string; - public kind(): SyntaxKind; - } - class ExternalModuleReference extends AST { - public stringLiteral: StringLiteral; - constructor(stringLiteral: StringLiteral); - public kind(): SyntaxKind; - } - class ModuleNameModuleReference extends AST { - public moduleName: AST; - constructor(moduleName: AST); - public kind(): SyntaxKind; - } - class ImportDeclaration extends AST { - public modifiers: PullElementFlags[]; - public identifier: Identifier; - public moduleReference: AST; - constructor(modifiers: PullElementFlags[], identifier: Identifier, moduleReference: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: ImportDeclaration, includingPosition: boolean): boolean; - } - class ExportAssignment extends AST { - public identifier: Identifier; - constructor(identifier: Identifier); - public kind(): SyntaxKind; - public structuralEquals(ast: ExportAssignment, includingPosition: boolean): boolean; - } - class TypeParameterList extends AST { - public typeParameters: ISeparatedSyntaxList2; - constructor(typeParameters: ISeparatedSyntaxList2); - public kind(): SyntaxKind; - } - class ClassDeclaration extends AST { - public modifiers: PullElementFlags[]; - public identifier: Identifier; - public typeParameterList: TypeParameterList; - public heritageClauses: ISyntaxList2; - public classElements: ISyntaxList2; - public closeBraceToken: ASTSpan; - constructor(modifiers: PullElementFlags[], identifier: Identifier, typeParameterList: TypeParameterList, heritageClauses: ISyntaxList2, classElements: ISyntaxList2, closeBraceToken: ASTSpan); - public kind(): SyntaxKind; - public structuralEquals(ast: ClassDeclaration, includingPosition: boolean): boolean; - } - class InterfaceDeclaration extends AST { - public modifiers: PullElementFlags[]; - public identifier: Identifier; - public typeParameterList: TypeParameterList; - public heritageClauses: ISyntaxList2; - public body: ObjectType; - constructor(modifiers: PullElementFlags[], identifier: Identifier, typeParameterList: TypeParameterList, heritageClauses: ISyntaxList2, body: ObjectType); - public kind(): SyntaxKind; - public structuralEquals(ast: InterfaceDeclaration, includingPosition: boolean): boolean; - } - class HeritageClause extends AST { - private _nodeType; - public typeNames: ISeparatedSyntaxList2; - constructor(_nodeType: SyntaxKind, typeNames: ISeparatedSyntaxList2); - public kind(): SyntaxKind; - public structuralEquals(ast: HeritageClause, includingPosition: boolean): boolean; - } - class ModuleDeclaration extends AST { - public modifiers: PullElementFlags[]; - public name: AST; - public stringLiteral: StringLiteral; - public moduleElements: ISyntaxList2; - public endingToken: ASTSpan; - constructor(modifiers: PullElementFlags[], name: AST, stringLiteral: StringLiteral, moduleElements: ISyntaxList2, endingToken: ASTSpan); - public kind(): SyntaxKind; - public structuralEquals(ast: ModuleDeclaration, includingPosition: boolean): boolean; - } - class FunctionDeclaration extends AST { - public modifiers: PullElementFlags[]; - public identifier: Identifier; - public callSignature: CallSignature; - public block: Block; - constructor(modifiers: PullElementFlags[], identifier: Identifier, callSignature: CallSignature, block: Block); - public kind(): SyntaxKind; - public structuralEquals(ast: FunctionDeclaration, includingPosition: boolean): boolean; - } - class VariableStatement extends AST { - public modifiers: PullElementFlags[]; - public declaration: VariableDeclaration; - constructor(modifiers: PullElementFlags[], declaration: VariableDeclaration); - public kind(): SyntaxKind; - public structuralEquals(ast: VariableStatement, includingPosition: boolean): boolean; - } - class VariableDeclaration extends AST { - public declarators: ISeparatedSyntaxList2; - constructor(declarators: ISeparatedSyntaxList2); - public kind(): SyntaxKind; - public structuralEquals(ast: VariableDeclaration, includingPosition: boolean): boolean; - } - class VariableDeclarator extends AST { - public propertyName: IASTToken; - public typeAnnotation: TypeAnnotation; - public equalsValueClause: EqualsValueClause; - constructor(propertyName: IASTToken, typeAnnotation: TypeAnnotation, equalsValueClause: EqualsValueClause); - public kind(): SyntaxKind; - } - class EqualsValueClause extends AST { - public value: AST; - constructor(value: AST); - public kind(): SyntaxKind; - } - class PrefixUnaryExpression extends AST { - private _nodeType; - public operand: AST; - constructor(_nodeType: SyntaxKind, operand: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: PrefixUnaryExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class ArrayLiteralExpression extends AST { - public expressions: ISeparatedSyntaxList2; - constructor(expressions: ISeparatedSyntaxList2); - public kind(): SyntaxKind; - public structuralEquals(ast: ArrayLiteralExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class OmittedExpression extends AST { - public kind(): SyntaxKind; - public structuralEquals(ast: CatchClause, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class ParenthesizedExpression extends AST { - public openParenTrailingComments: Comment[]; - public expression: AST; - constructor(openParenTrailingComments: Comment[], expression: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: ParenthesizedExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - interface ICallExpression extends IASTSpan { - expression: AST; - argumentList: ArgumentList; - } - class SimpleArrowFunctionExpression extends AST { - public identifier: Identifier; - public block: Block; - public expression: AST; - constructor(identifier: Identifier, block: Block, expression: AST); - public kind(): SyntaxKind; - public isExpression(): boolean; - } - class ParenthesizedArrowFunctionExpression extends AST { - public callSignature: CallSignature; - public block: Block; - public expression: AST; - constructor(callSignature: CallSignature, block: Block, expression: AST); - public kind(): SyntaxKind; - public isExpression(): boolean; - } - class QualifiedName extends AST { - public left: AST; - public right: Identifier; - constructor(left: AST, right: Identifier); - public kind(): SyntaxKind; - public structuralEquals(ast: QualifiedName, includingPosition: boolean): boolean; - } - class ParameterList extends AST { - public openParenTrailingComments: Comment[]; - public parameters: ISeparatedSyntaxList2; - constructor(openParenTrailingComments: Comment[], parameters: ISeparatedSyntaxList2); - public kind(): SyntaxKind; - } - class ConstructorType extends AST { - public typeParameterList: TypeParameterList; - public parameterList: ParameterList; - public type: AST; - constructor(typeParameterList: TypeParameterList, parameterList: ParameterList, type: AST); - public kind(): SyntaxKind; - } - class FunctionType extends AST { - public typeParameterList: TypeParameterList; - public parameterList: ParameterList; - public type: AST; - constructor(typeParameterList: TypeParameterList, parameterList: ParameterList, type: AST); - public kind(): SyntaxKind; - } - class ObjectType extends AST { - public typeMembers: ISeparatedSyntaxList2; - constructor(typeMembers: ISeparatedSyntaxList2); - public kind(): SyntaxKind; - public structuralEquals(ast: ObjectType, includingPosition: boolean): boolean; - } - class ArrayType extends AST { - public type: AST; - constructor(type: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: ArrayType, includingPosition: boolean): boolean; - } - class TypeArgumentList extends AST { - public typeArguments: ISeparatedSyntaxList2; - constructor(typeArguments: ISeparatedSyntaxList2); - public kind(): SyntaxKind; - } - class GenericType extends AST { - public name: AST; - public typeArgumentList: TypeArgumentList; - constructor(name: AST, typeArgumentList: TypeArgumentList); - public kind(): SyntaxKind; - public structuralEquals(ast: GenericType, includingPosition: boolean): boolean; - } - class TypeQuery extends AST { - public name: AST; - constructor(name: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: TypeQuery, includingPosition: boolean): boolean; - } - class Block extends AST { - public statements: ISyntaxList2; - public closeBraceLeadingComments: Comment[]; - public closeBraceToken: IASTSpan; - constructor(statements: ISyntaxList2, closeBraceLeadingComments: Comment[], closeBraceToken: IASTSpan); - public kind(): SyntaxKind; - public structuralEquals(ast: Block, includingPosition: boolean): boolean; - } - class Parameter extends AST { - public dotDotDotToken: ASTSpan; - public modifiers: PullElementFlags[]; - public identifier: Identifier; - public questionToken: ASTSpan; - public typeAnnotation: TypeAnnotation; - public equalsValueClause: EqualsValueClause; - constructor(dotDotDotToken: ASTSpan, modifiers: PullElementFlags[], identifier: Identifier, questionToken: ASTSpan, typeAnnotation: TypeAnnotation, equalsValueClause: EqualsValueClause); - public kind(): SyntaxKind; - } - class MemberAccessExpression extends AST { - public expression: AST; - public name: Identifier; - constructor(expression: AST, name: Identifier); - public kind(): SyntaxKind; - public structuralEquals(ast: MemberAccessExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class PostfixUnaryExpression extends AST { - private _nodeType; - public operand: AST; - constructor(_nodeType: SyntaxKind, operand: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: PostfixUnaryExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class ElementAccessExpression extends AST { - public expression: AST; - public argumentExpression: AST; - constructor(expression: AST, argumentExpression: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: ElementAccessExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class InvocationExpression extends AST implements ICallExpression { - public expression: AST; - public argumentList: ArgumentList; - constructor(expression: AST, argumentList: ArgumentList); - public kind(): SyntaxKind; - public structuralEquals(ast: InvocationExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class ArgumentList extends AST { - public typeArgumentList: TypeArgumentList; - public closeParenToken: ASTSpan; - public arguments: ISeparatedSyntaxList2; - constructor(typeArgumentList: TypeArgumentList, _arguments: ISeparatedSyntaxList2, closeParenToken: ASTSpan); - public kind(): SyntaxKind; - } - class BinaryExpression extends AST { - private _nodeType; - public left: AST; - public right: AST; - constructor(_nodeType: SyntaxKind, left: AST, right: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: BinaryExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class ConditionalExpression extends AST { - public condition: AST; - public whenTrue: AST; - public whenFalse: AST; - constructor(condition: AST, whenTrue: AST, whenFalse: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: ConditionalExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class ConstructSignature extends AST { - public callSignature: CallSignature; - constructor(callSignature: CallSignature); - public kind(): SyntaxKind; - } - class MethodSignature extends AST { - public propertyName: IASTToken; - public questionToken: ASTSpan; - public callSignature: CallSignature; - constructor(propertyName: IASTToken, questionToken: ASTSpan, callSignature: CallSignature); - public kind(): SyntaxKind; - } - class IndexSignature extends AST { - public parameter: Parameter; - public typeAnnotation: TypeAnnotation; - constructor(parameter: Parameter, typeAnnotation: TypeAnnotation); - public kind(): SyntaxKind; - } - class PropertySignature extends AST { - public propertyName: IASTToken; - public questionToken: ASTSpan; - public typeAnnotation: TypeAnnotation; - constructor(propertyName: IASTToken, questionToken: ASTSpan, typeAnnotation: TypeAnnotation); - public kind(): SyntaxKind; - } - class CallSignature extends AST { - public typeParameterList: TypeParameterList; - public parameterList: ParameterList; - public typeAnnotation: TypeAnnotation; - constructor(typeParameterList: TypeParameterList, parameterList: ParameterList, typeAnnotation: TypeAnnotation); - public kind(): SyntaxKind; - } - class TypeParameter extends AST { - public identifier: Identifier; - public constraint: Constraint; - constructor(identifier: Identifier, constraint: Constraint); - public kind(): SyntaxKind; - public structuralEquals(ast: TypeParameter, includingPosition: boolean): boolean; - } - class Constraint extends AST { - public type: AST; - constructor(type: AST); - public kind(): SyntaxKind; - } - class ElseClause extends AST { - public statement: AST; - constructor(statement: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: ElseClause, includingPosition: boolean): boolean; - } - class IfStatement extends AST { - public condition: AST; - public statement: AST; - public elseClause: ElseClause; - constructor(condition: AST, statement: AST, elseClause: ElseClause); - public kind(): SyntaxKind; - public structuralEquals(ast: IfStatement, includingPosition: boolean): boolean; - } - class ExpressionStatement extends AST { - public expression: AST; - constructor(expression: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: ExpressionStatement, includingPosition: boolean): boolean; - } - class ConstructorDeclaration extends AST { - public callSignature: CallSignature; - public block: Block; - constructor(callSignature: CallSignature, block: Block); - public kind(): SyntaxKind; - } - class MemberFunctionDeclaration extends AST { - public modifiers: PullElementFlags[]; - public propertyName: IASTToken; - public callSignature: CallSignature; - public block: Block; - constructor(modifiers: PullElementFlags[], propertyName: IASTToken, callSignature: CallSignature, block: Block); - public kind(): SyntaxKind; - } - class GetAccessor extends AST { - public modifiers: PullElementFlags[]; - public propertyName: IASTToken; - public parameterList: ParameterList; - public typeAnnotation: TypeAnnotation; - public block: Block; - constructor(modifiers: PullElementFlags[], propertyName: IASTToken, parameterList: ParameterList, typeAnnotation: TypeAnnotation, block: Block); - public kind(): SyntaxKind; - } - class SetAccessor extends AST { - public modifiers: PullElementFlags[]; - public propertyName: IASTToken; - public parameterList: ParameterList; - public block: Block; - constructor(modifiers: PullElementFlags[], propertyName: IASTToken, parameterList: ParameterList, block: Block); - public kind(): SyntaxKind; - } - class MemberVariableDeclaration extends AST { - public modifiers: PullElementFlags[]; - public variableDeclarator: VariableDeclarator; - constructor(modifiers: PullElementFlags[], variableDeclarator: VariableDeclarator); - public kind(): SyntaxKind; - } - class IndexMemberDeclaration extends AST { - public indexSignature: IndexSignature; - constructor(indexSignature: IndexSignature); - public kind(): SyntaxKind; - } - class ThrowStatement extends AST { - public expression: AST; - constructor(expression: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: ThrowStatement, includingPosition: boolean): boolean; - } - class ReturnStatement extends AST { - public expression: AST; - constructor(expression: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: ReturnStatement, includingPosition: boolean): boolean; - } - class ObjectCreationExpression extends AST implements ICallExpression { - public expression: AST; - public argumentList: ArgumentList; - constructor(expression: AST, argumentList: ArgumentList); - public kind(): SyntaxKind; - public structuralEquals(ast: ObjectCreationExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class SwitchStatement extends AST { - public expression: AST; - public closeParenToken: ASTSpan; - public switchClauses: ISyntaxList2; - constructor(expression: AST, closeParenToken: ASTSpan, switchClauses: ISyntaxList2); - public kind(): SyntaxKind; - public structuralEquals(ast: SwitchStatement, includingPosition: boolean): boolean; - } - class CaseSwitchClause extends AST { - public expression: AST; - public statements: ISyntaxList2; - constructor(expression: AST, statements: ISyntaxList2); - public kind(): SyntaxKind; - public structuralEquals(ast: CaseSwitchClause, includingPosition: boolean): boolean; - } - class DefaultSwitchClause extends AST { - public statements: ISyntaxList2; - constructor(statements: ISyntaxList2); - public kind(): SyntaxKind; - public structuralEquals(ast: DefaultSwitchClause, includingPosition: boolean): boolean; - } - class BreakStatement extends AST { - public identifier: Identifier; - constructor(identifier: Identifier); - public kind(): SyntaxKind; - public structuralEquals(ast: BreakStatement, includingPosition: boolean): boolean; - } - class ContinueStatement extends AST { - public identifier: Identifier; - constructor(identifier: Identifier); - public kind(): SyntaxKind; - public structuralEquals(ast: ContinueStatement, includingPosition: boolean): boolean; - } - class ForStatement extends AST { - public variableDeclaration: VariableDeclaration; - public initializer: AST; - public condition: AST; - public incrementor: AST; - public statement: AST; - constructor(variableDeclaration: VariableDeclaration, initializer: AST, condition: AST, incrementor: AST, statement: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: ForStatement, includingPosition: boolean): boolean; - } - class ForInStatement extends AST { - public variableDeclaration: VariableDeclaration; - public left: AST; - public expression: AST; - public statement: AST; - constructor(variableDeclaration: VariableDeclaration, left: AST, expression: AST, statement: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: ForInStatement, includingPosition: boolean): boolean; - } - class WhileStatement extends AST { - public condition: AST; - public statement: AST; - constructor(condition: AST, statement: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: WhileStatement, includingPosition: boolean): boolean; - } - class WithStatement extends AST { - public condition: AST; - public statement: AST; - constructor(condition: AST, statement: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: WithStatement, includingPosition: boolean): boolean; - } - class EnumDeclaration extends AST { - public modifiers: PullElementFlags[]; - public identifier: Identifier; - public enumElements: ISeparatedSyntaxList2; - constructor(modifiers: PullElementFlags[], identifier: Identifier, enumElements: ISeparatedSyntaxList2); - public kind(): SyntaxKind; - } - class EnumElement extends AST { - public propertyName: IASTToken; - public equalsValueClause: EqualsValueClause; - constructor(propertyName: IASTToken, equalsValueClause: EqualsValueClause); - public kind(): SyntaxKind; - } - class CastExpression extends AST { - public type: AST; - public expression: AST; - constructor(type: AST, expression: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: CastExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class ObjectLiteralExpression extends AST { - public propertyAssignments: ISeparatedSyntaxList2; - constructor(propertyAssignments: ISeparatedSyntaxList2); - public kind(): SyntaxKind; - public structuralEquals(ast: ObjectLiteralExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class SimplePropertyAssignment extends AST { - public propertyName: Identifier; - public expression: AST; - constructor(propertyName: Identifier, expression: AST); - public kind(): SyntaxKind; - } - class FunctionPropertyAssignment extends AST { - public propertyName: Identifier; - public callSignature: CallSignature; - public block: Block; - constructor(propertyName: Identifier, callSignature: CallSignature, block: Block); - public kind(): SyntaxKind; - } - class FunctionExpression extends AST { - public identifier: Identifier; - public callSignature: CallSignature; - public block: Block; - constructor(identifier: Identifier, callSignature: CallSignature, block: Block); - public kind(): SyntaxKind; - public isExpression(): boolean; - } - class EmptyStatement extends AST { - public kind(): SyntaxKind; - public structuralEquals(ast: CatchClause, includingPosition: boolean): boolean; - } - class TryStatement extends AST { - public block: Block; - public catchClause: CatchClause; - public finallyClause: FinallyClause; - constructor(block: Block, catchClause: CatchClause, finallyClause: FinallyClause); - public kind(): SyntaxKind; - public structuralEquals(ast: TryStatement, includingPosition: boolean): boolean; - } - class CatchClause extends AST { - public identifier: Identifier; - public typeAnnotation: TypeAnnotation; - public block: Block; - constructor(identifier: Identifier, typeAnnotation: TypeAnnotation, block: Block); - public kind(): SyntaxKind; - public structuralEquals(ast: CatchClause, includingPosition: boolean): boolean; - } - class FinallyClause extends AST { - public block: Block; - constructor(block: Block); - public kind(): SyntaxKind; - public structuralEquals(ast: CatchClause, includingPosition: boolean): boolean; - } - class LabeledStatement extends AST { - public identifier: Identifier; - public statement: AST; - constructor(identifier: Identifier, statement: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: LabeledStatement, includingPosition: boolean): boolean; - } - class DoStatement extends AST { - public statement: AST; - public whileKeyword: ASTSpan; - public condition: AST; - constructor(statement: AST, whileKeyword: ASTSpan, condition: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: DoStatement, includingPosition: boolean): boolean; - } - class TypeOfExpression extends AST { - public expression: AST; - constructor(expression: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: TypeOfExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class DeleteExpression extends AST { - public expression: AST; - constructor(expression: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: DeleteExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class VoidExpression extends AST { - public expression: AST; - constructor(expression: AST); - public kind(): SyntaxKind; - public structuralEquals(ast: VoidExpression, includingPosition: boolean): boolean; - public isExpression(): boolean; - } - class DebuggerStatement extends AST { - public kind(): SyntaxKind; - } - class Comment { - private _trivia; - public endsLine: boolean; - public _start: number; - public _end: number; - constructor(_trivia: ISyntaxTrivia, endsLine: boolean, _start: number, _end: number); - public start(): number; - public end(): number; - public fullText(): string; - public kind(): SyntaxKind; - public structuralEquals(ast: Comment, includingPosition: boolean): boolean; - } -} -declare module TypeScript.Services { - enum EndOfLineState { - Start = 0, - InMultiLineCommentTrivia = 1, - InSingleQuoteStringLiteral = 2, - InDoubleQuoteStringLiteral = 3, - } - enum TokenClass { - Punctuation = 0, - Keyword = 1, - Operator = 2, - Comment = 3, - Whitespace = 4, - Identifier = 5, - NumberLiteral = 6, - StringLiteral = 7, - RegExpLiteral = 8, - } - class Classifier { - public host: IClassifierHost; - private scanner; - private characterWindow; - private diagnostics; - constructor(host: IClassifierHost); - public getClassificationsForLine(text: string, lexState: EndOfLineState): ClassificationResult; - private processToken(text, offset, token, result); - private processTriviaList(text, offset, triviaList, result); - private addResult(text, offset, result, length, kind); - private classFromKind(kind); - } - interface IClassifierHost extends ILogger { - } - class ClassificationResult { - public finalLexState: EndOfLineState; - public entries: ClassificationInfo[]; - constructor(); - } - class ClassificationInfo { - public length: number; - public classification: TokenClass; - constructor(length: number, classification: TokenClass); - } -} -declare module TypeScript.Services { - interface ILanguageServicesDiagnostics { - log(content: string): void; - } -} -declare module TypeScript.Services { - interface ILanguageServiceHost extends ILogger, IReferenceResolverHost { - getCompilationSettings(): CompilationSettings; - getScriptFileNames(): string[]; - getScriptVersion(fileName: string): number; - getScriptIsOpen(fileName: string): boolean; - getScriptByteOrderMark(fileName: string): ByteOrderMark; - getScriptSnapshot(fileName: string): IScriptSnapshot; - getDiagnosticsObject(): ILanguageServicesDiagnostics; - getLocalizedDiagnosticMessages(): any; - } - interface ILanguageService { - refresh(): void; - cleanupSemanticCache(): void; - getSyntacticDiagnostics(fileName: string): Diagnostic[]; - getSemanticDiagnostics(fileName: string): Diagnostic[]; - getCompilerOptionsDiagnostics(): Diagnostic[]; - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; - getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; - getTypeAtPosition(fileName: string, position: number): TypeInfo; - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): SpanInfo; - getBreakpointStatementAtPosition(fileName: string, position: number): SpanInfo; - getSignatureAtPosition(fileName: string, position: number): SignatureInfo; - getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; - getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - getImplementorsAtPosition(fileName: string, position: number): ReferenceEntry[]; - getNavigateToItems(searchValue: string): NavigateToItem[]; - getScriptLexicalStructure(fileName: string): NavigateToItem[]; - getOutliningRegions(fileName: string): TextSpan[]; - getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; - getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; - getFormattingEditsForRange(fileName: string, minChar: number, limChar: number, options: FormatCodeOptions): TextEdit[]; - getFormattingEditsForDocument(fileName: string, minChar: number, limChar: number, options: FormatCodeOptions): TextEdit[]; - getFormattingEditsOnPaste(fileName: string, minChar: number, limChar: number, options: FormatCodeOptions): TextEdit[]; - getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextEdit[]; - getEmitOutput(fileName: string): EmitOutput; - getSyntaxTree(fileName: string): SyntaxTree; - } - function logInternalError(logger: ILogger, err: Error): void; - class ReferenceEntry { - public fileName: string; - public minChar: number; - public limChar: number; - public isWriteAccess: boolean; - constructor(fileName: string, minChar: number, limChar: number, isWriteAccess: boolean); - } - class NavigateToItem { - public name: string; - public kind: string; - public kindModifiers: string; - public matchKind: string; - public fileName: string; - public minChar: number; - public limChar: number; - public additionalSpans: SpanInfo[]; - public containerName: string; - public containerKind: string; - } - class TextEdit { - public minChar: number; - public limChar: number; - public text: string; - constructor(minChar: number, limChar: number, text: string); - static createInsert(pos: number, text: string): TextEdit; - static createDelete(minChar: number, limChar: number): TextEdit; - static createReplace(minChar: number, limChar: number, text: string): TextEdit; - } - class EditorOptions { - public IndentSize: number; - public TabSize: number; - public NewLineCharacter: string; - public ConvertTabsToSpaces: boolean; - static clone(objectToClone: EditorOptions): EditorOptions; - } - class FormatCodeOptions extends EditorOptions { - public InsertSpaceAfterCommaDelimiter: boolean; - public InsertSpaceAfterSemicolonInForStatements: boolean; - public InsertSpaceBeforeAndAfterBinaryOperators: boolean; - public InsertSpaceAfterKeywordsInControlFlowStatements: boolean; - public InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; - public InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; - public PlaceOpenBraceOnNewLineForFunctions: boolean; - public PlaceOpenBraceOnNewLineForControlBlocks: boolean; - static clone(objectToClone: FormatCodeOptions): FormatCodeOptions; - } - class DefinitionInfo { - public fileName: string; - public minChar: number; - public limChar: number; - public kind: string; - public name: string; - public containerKind: string; - public containerName: string; - constructor(fileName: string, minChar: number, limChar: number, kind: string, name: string, containerKind: string, containerName: string); - } - class TypeInfo { - public memberName: MemberName; - public docComment: string; - public fullSymbolName: string; - public kind: string; - public minChar: number; - public limChar: number; - constructor(memberName: MemberName, docComment: string, fullSymbolName: string, kind: string, minChar: number, limChar: number); - } - class SpanInfo { - public minChar: number; - public limChar: number; - public text: string; - constructor(minChar: number, limChar: number, text?: string); - } - class SignatureInfo { - public actual: ActualSignatureInfo; - public formal: FormalSignatureItemInfo[]; - public activeFormal: number; - } - class FormalSignatureItemInfo { - public signatureInfo: string; - public typeParameters: FormalTypeParameterInfo[]; - public parameters: FormalParameterInfo[]; - public docComment: string; - } - class FormalTypeParameterInfo { - public name: string; - public docComment: string; - public minChar: number; - public limChar: number; - } - class FormalParameterInfo { - public name: string; - public isVariable: boolean; - public docComment: string; - public minChar: number; - public limChar: number; - } - class ActualSignatureInfo { - public parameterMinChar: number; - public parameterLimChar: number; - public currentParameterIsTypeParameter: boolean; - public currentParameter: number; - } - class CompletionInfo { - public maybeInaccurate: boolean; - public isMemberCompletion: boolean; - public entries: CompletionEntry[]; - } - interface CompletionEntry { - name: string; - kind: string; - kindModifiers: string; - } - interface CompletionEntryDetails { - name: string; - kind: string; - kindModifiers: string; - type: string; - fullSymbolName: string; - docComment: string; - } - class ScriptElementKind { - static unknown: string; - static keyword: string; - static scriptElement: string; - static moduleElement: string; - static classElement: string; - static interfaceElement: string; - static enumElement: string; - static variableElement: string; - static localVariableElement: string; - static functionElement: string; - static localFunctionElement: string; - static memberFunctionElement: string; - static memberGetAccessorElement: string; - static memberSetAccessorElement: string; - static memberVariableElement: string; - static constructorImplementationElement: string; - static callSignatureElement: string; - static indexSignatureElement: string; - static constructSignatureElement: string; - static parameterElement: string; - static typeParameterElement: string; - static primitiveType: string; - } - class ScriptElementKindModifier { - static none: string; - static publicMemberModifier: string; - static privateMemberModifier: string; - static exportedModifier: string; - static ambientModifier: string; - static staticModifier: string; - } - class MatchKind { - static none: string; - static exact: string; - static subString: string; - static prefix: string; - } - class DiagnosticCategory { - static none: string; - static error: string; - static warning: string; - static message: string; - } -} -declare module TypeScript.Services.Formatting { - interface ITextSnapshot { - getText(span: TextSpan): string; - getLineNumberFromPosition(position: number): number; - getLineFromPosition(position: number): ITextSnapshotLine; - getLineFromLineNumber(lineNumber: number): ITextSnapshotLine; - } - class TextSnapshot implements ITextSnapshot { - private snapshot; - private lines; - constructor(snapshot: ISimpleText); - public getText(span: TextSpan): string; - public getLineNumberFromPosition(position: number): number; - public getLineFromPosition(position: number): ITextSnapshotLine; - public getLineFromLineNumber(lineNumber: number): ITextSnapshotLine; - private getLineFromLineNumberWorker(lineNumber); - } -} -declare module TypeScript.Services.Formatting { - interface ITextSnapshotLine { - snapshot(): ITextSnapshot; - start(): SnapshotPoint; - startPosition(): number; - end(): SnapshotPoint; - endPosition(): number; - endIncludingLineBreak(): SnapshotPoint; - endIncludingLineBreakPosition(): number; - length(): number; - lineNumber(): number; - getText(): string; - } - class TextSnapshotLine implements ITextSnapshotLine { - private _snapshot; - private _lineNumber; - private _start; - private _end; - private _lineBreak; - constructor(_snapshot: ITextSnapshot, _lineNumber: number, _start: number, _end: number, _lineBreak: string); - public snapshot(): ITextSnapshot; - public start(): SnapshotPoint; - public startPosition(): number; - public end(): SnapshotPoint; - public endPosition(): number; - public endIncludingLineBreak(): SnapshotPoint; - public endIncludingLineBreakPosition(): number; - public length(): number; - public lineNumber(): number; - public getText(): string; - } -} -declare module TypeScript.Services.Formatting { - class SnapshotPoint { - public snapshot: ITextSnapshot; - public position: number; - constructor(snapshot: ITextSnapshot, position: number); - public getContainingLine(): ITextSnapshotLine; - public add(offset: number): SnapshotPoint; - } -} -declare module TypeScript.Services.Formatting { - class FormattingContext { - private snapshot; - public formattingRequestKind: FormattingRequestKind; - public currentTokenSpan: TokenSpan; - public nextTokenSpan: TokenSpan; - public contextNode: IndentationNodeContext; - public currentTokenParent: IndentationNodeContext; - public nextTokenParent: IndentationNodeContext; - private contextNodeAllOnSameLine; - private nextNodeAllOnSameLine; - private tokensAreOnSameLine; - private contextNodeBlockIsOnOneLine; - private nextNodeBlockIsOnOneLine; - constructor(snapshot: ITextSnapshot, formattingRequestKind: FormattingRequestKind); - public updateContext(currentTokenSpan: TokenSpan, currentTokenParent: IndentationNodeContext, nextTokenSpan: TokenSpan, nextTokenParent: IndentationNodeContext, commonParent: IndentationNodeContext): void; - public ContextNodeAllOnSameLine(): boolean; - public NextNodeAllOnSameLine(): boolean; - public TokensAreOnSameLine(): boolean; - public ContextNodeBlockIsOnOneLine(): boolean; - public NextNodeBlockIsOnOneLine(): boolean; - public NodeIsOnOneLine(node: IndentationNodeContext): boolean; - public BlockIsOnOneLine(node: IndentationNodeContext): boolean; - } -} -declare module TypeScript.Services.Formatting { - class FormattingManager { - private syntaxTree; - private snapshot; - private rulesProvider; - private options; - constructor(syntaxTree: SyntaxTree, snapshot: ITextSnapshot, rulesProvider: RulesProvider, editorOptions: EditorOptions); - public formatSelection(minChar: number, limChar: number): TextEdit[]; - public formatDocument(minChar: number, limChar: number): TextEdit[]; - public formatOnPaste(minChar: number, limChar: number): TextEdit[]; - public formatOnSemicolon(caretPosition: number): TextEdit[]; - public formatOnClosingCurlyBrace(caretPosition: number): TextEdit[]; - public formatOnEnter(caretPosition: number): TextEdit[]; - private formatSpan(span, formattingRequestKind); - } -} -declare module TypeScript.Services.Formatting { - enum FormattingRequestKind { - FormatDocument = 0, - FormatSelection = 1, - FormatOnEnter = 2, - FormatOnSemicolon = 3, - FormatOnClosingCurlyBrace = 4, - FormatOnPaste = 5, - } -} -declare module TypeScript.Services.Formatting { - class Rule { - public Descriptor: RuleDescriptor; - public Operation: RuleOperation; - public Flag: RuleFlags; - constructor(Descriptor: RuleDescriptor, Operation: RuleOperation, Flag?: RuleFlags); - public toString(): string; - } -} -declare module TypeScript.Services.Formatting { - enum RuleAction { - Ignore = 0, - Space = 1, - NewLine = 2, - Delete = 3, - } -} -declare module TypeScript.Services.Formatting { - class RuleDescriptor { - public LeftTokenRange: Shared.TokenRange; - public RightTokenRange: Shared.TokenRange; - constructor(LeftTokenRange: Shared.TokenRange, RightTokenRange: Shared.TokenRange); - public toString(): string; - static create1(left: SyntaxKind, right: SyntaxKind): RuleDescriptor; - static create2(left: Shared.TokenRange, right: SyntaxKind): RuleDescriptor; - static create3(left: SyntaxKind, right: Shared.TokenRange): RuleDescriptor; - static create4(left: Shared.TokenRange, right: Shared.TokenRange): RuleDescriptor; - } -} -declare module TypeScript.Services.Formatting { - enum RuleFlags { - None = 0, - CanDeleteNewLines = 1, - } -} -declare module TypeScript.Services.Formatting { - class RuleOperation { - public Context: RuleOperationContext; - public Action: RuleAction; - constructor(); - public toString(): string; - static create1(action: RuleAction): RuleOperation; - static create2(context: RuleOperationContext, action: RuleAction): RuleOperation; - } -} -declare module TypeScript.Services.Formatting { - class RuleOperationContext { - private customContextChecks; - constructor(...funcs: { - (context: FormattingContext): boolean; - }[]); - static Any: RuleOperationContext; - public IsAny(): boolean; - public InContext(context: FormattingContext): boolean; - } -} -declare module TypeScript.Services.Formatting { - class Rules { - public getRuleName(rule: Rule): any; - [name: string]: any; - public IgnoreBeforeComment: Rule; - public IgnoreAfterLineComment: Rule; - public NoSpaceBeforeSemicolon: Rule; - public NoSpaceBeforeColon: Rule; - public NoSpaceBeforeQMark: Rule; - public SpaceAfterColon: Rule; - public SpaceAfterQMark: Rule; - public SpaceAfterSemicolon: Rule; - public SpaceAfterCloseBrace: Rule; - public SpaceBetweenCloseBraceAndElse: Rule; - public SpaceBetweenCloseBraceAndWhile: Rule; - public NoSpaceAfterCloseBrace: Rule; - public NoSpaceBeforeDot: Rule; - public NoSpaceAfterDot: Rule; - public NoSpaceBeforeOpenBracket: Rule; - public NoSpaceAfterOpenBracket: Rule; - public NoSpaceBeforeCloseBracket: Rule; - public NoSpaceAfterCloseBracket: Rule; - public SpaceAfterOpenBrace: Rule; - public SpaceBeforeCloseBrace: Rule; - public NoSpaceBetweenEmptyBraceBrackets: Rule; - public NewLineAfterOpenBraceInBlockContext: Rule; - public NewLineBeforeCloseBraceInBlockContext: Rule; - public NoSpaceAfterUnaryPrefixOperator: Rule; - public NoSpaceAfterUnaryPreincrementOperator: Rule; - public NoSpaceAfterUnaryPredecrementOperator: Rule; - public NoSpaceBeforeUnaryPostincrementOperator: Rule; - public NoSpaceBeforeUnaryPostdecrementOperator: Rule; - public SpaceAfterPostincrementWhenFollowedByAdd: Rule; - public SpaceAfterAddWhenFollowedByUnaryPlus: Rule; - public SpaceAfterAddWhenFollowedByPreincrement: Rule; - public SpaceAfterPostdecrementWhenFollowedBySubtract: Rule; - public SpaceAfterSubtractWhenFollowedByUnaryMinus: Rule; - public SpaceAfterSubtractWhenFollowedByPredecrement: Rule; - public NoSpaceBeforeComma: Rule; - public SpaceAfterCertainKeywords: Rule; - public NoSpaceBeforeOpenParenInFuncCall: Rule; - public SpaceAfterFunctionInFuncDecl: Rule; - public NoSpaceBeforeOpenParenInFuncDecl: Rule; - public SpaceAfterVoidOperator: Rule; - public NoSpaceBetweenReturnAndSemicolon: Rule; - public SpaceBetweenStatements: Rule; - public SpaceAfterTryFinally: Rule; - public SpaceAfterGetSetInMember: Rule; - public SpaceBeforeBinaryKeywordOperator: Rule; - public SpaceAfterBinaryKeywordOperator: Rule; - public NoSpaceAfterConstructor: Rule; - public NoSpaceAfterModuleImport: Rule; - public SpaceAfterCertainTypeScriptKeywords: Rule; - public SpaceBeforeCertainTypeScriptKeywords: Rule; - public SpaceAfterModuleName: Rule; - public SpaceAfterArrow: Rule; - public NoSpaceAfterEllipsis: Rule; - public NoSpaceAfterOptionalParameters: Rule; - public NoSpaceBeforeOpenAngularBracket: Rule; - public NoSpaceBetweenCloseParenAndAngularBracket: Rule; - public NoSpaceAfterOpenAngularBracket: Rule; - public NoSpaceBeforeCloseAngularBracket: Rule; - public NoSpaceAfterCloseAngularBracket: Rule; - public NoSpaceBetweenEmptyInterfaceBraceBrackets: Rule; - public HighPriorityCommonRules: Rule[]; - public LowPriorityCommonRules: Rule[]; - public SpaceAfterComma: Rule; - public NoSpaceAfterComma: Rule; - public SpaceBeforeBinaryOperator: Rule; - public SpaceAfterBinaryOperator: Rule; - public NoSpaceBeforeBinaryOperator: Rule; - public NoSpaceAfterBinaryOperator: Rule; - public SpaceAfterKeywordInControl: Rule; - public NoSpaceAfterKeywordInControl: Rule; - public FunctionOpenBraceLeftTokenRange: Shared.TokenRange; - public SpaceBeforeOpenBraceInFunction: Rule; - public NewLineBeforeOpenBraceInFunction: Rule; - public TypeScriptOpenBraceLeftTokenRange: Shared.TokenRange; - public SpaceBeforeOpenBraceInTypeScriptDeclWithBlock: Rule; - public NewLineBeforeOpenBraceInTypeScriptDeclWithBlock: Rule; - public ControlOpenBraceLeftTokenRange: Shared.TokenRange; - public SpaceBeforeOpenBraceInControl: Rule; - public NewLineBeforeOpenBraceInControl: Rule; - public SpaceAfterSemicolonInFor: Rule; - public NoSpaceAfterSemicolonInFor: Rule; - public SpaceAfterOpenParen: Rule; - public SpaceBeforeCloseParen: Rule; - public NoSpaceBetweenParens: Rule; - public NoSpaceAfterOpenParen: Rule; - public NoSpaceBeforeCloseParen: Rule; - public SpaceAfterAnonymousFunctionKeyword: Rule; - public NoSpaceAfterAnonymousFunctionKeyword: Rule; - constructor(); - static IsForContext(context: FormattingContext): boolean; - static IsNotForContext(context: FormattingContext): boolean; - static IsBinaryOpContext(context: FormattingContext): boolean; - static IsNotBinaryOpContext(context: FormattingContext): boolean; - static IsSameLineTokenOrBeforeMultilineBlockContext(context: FormattingContext): boolean; - static IsBeforeMultilineBlockContext(context: FormattingContext): boolean; - static IsMultilineBlockContext(context: FormattingContext): boolean; - static IsSingleLineBlockContext(context: FormattingContext): boolean; - static IsBlockContext(context: FormattingContext): boolean; - static IsBeforeBlockContext(context: FormattingContext): boolean; - static NodeIsBlockContext(node: IndentationNodeContext): boolean; - static IsFunctionDeclContext(context: FormattingContext): boolean; - static IsTypeScriptDeclWithBlockContext(context: FormattingContext): boolean; - static NodeIsTypeScriptDeclWithBlockContext(node: IndentationNodeContext): boolean; - static IsAfterCodeBlockContext(context: FormattingContext): boolean; - static IsControlDeclContext(context: FormattingContext): boolean; - static IsObjectContext(context: FormattingContext): boolean; - static IsFunctionCallContext(context: FormattingContext): boolean; - static IsNewContext(context: FormattingContext): boolean; - static IsFunctionCallOrNewContext(context: FormattingContext): boolean; - static IsSameLineTokenContext(context: FormattingContext): boolean; - static IsNotFormatOnEnter(context: FormattingContext): boolean; - static IsModuleDeclContext(context: FormattingContext): boolean; - static IsObjectTypeContext(context: FormattingContext): boolean; - static IsTypeArgumentOrParameter(tokenKind: SyntaxKind, parentKind: SyntaxKind): boolean; - static IsTypeArgumentOrParameterContext(context: FormattingContext): boolean; - static IsVoidOpContext(context: FormattingContext): boolean; - } -} -declare module TypeScript.Services.Formatting { - class RulesMap { - public map: RulesBucket[]; - public mapRowLength: number; - constructor(); - static create(rules: Rule[]): RulesMap; - public Initialize(rules: Rule[]): RulesBucket[]; - public FillRules(rules: Rule[], rulesBucketConstructionStateList: RulesBucketConstructionState[]): void; - private GetRuleBucketIndex(row, column); - private FillRule(rule, rulesBucketConstructionStateList); - public GetRule(context: FormattingContext): Rule; - } - enum RulesPosition { - IgnoreRulesSpecific = 0, - IgnoreRulesAny, - ContextRulesSpecific, - ContextRulesAny, - NoContextRulesSpecific, - NoContextRulesAny, - } - class RulesBucketConstructionState { - private rulesInsertionIndexBitmap; - constructor(); - public GetInsertionIndex(maskPosition: RulesPosition): number; - public IncreaseInsertionIndex(maskPosition: RulesPosition): void; - } - class RulesBucket { - private rules; - constructor(); - public Rules(): Rule[]; - public AddRule(rule: Rule, specificTokens: boolean, constructionState: RulesBucketConstructionState[], rulesBucketIndex: number): void; - } -} -declare module TypeScript.Services.Formatting { - class RulesProvider { - private logger; - private globalRules; - private options; - private activeRules; - private rulesMap; - constructor(logger: ILogger); - public getRuleName(rule: Rule): string; - public getRuleByName(name: string): Rule; - public getRulesMap(): RulesMap; - public ensureUpToDate(options: FormatCodeOptions): void; - private createActiveRules(options); - } -} -declare module TypeScript.Services.Formatting { - class TextEditInfo { - public position: number; - public length: number; - public replaceWith: string; - constructor(position: number, length: number, replaceWith: string); - public toString(): string; - } -} -declare module TypeScript.Services.Formatting { - module Shared { - interface ITokenAccess { - GetTokens(): SyntaxKind[]; - Contains(token: SyntaxKind): boolean; - } - class TokenRangeAccess implements ITokenAccess { - private tokens; - constructor(from: SyntaxKind, to: SyntaxKind, except: SyntaxKind[]); - public GetTokens(): SyntaxKind[]; - public Contains(token: SyntaxKind): boolean; - public toString(): string; - } - class TokenValuesAccess implements ITokenAccess { - private tokens; - constructor(tks: SyntaxKind[]); - public GetTokens(): SyntaxKind[]; - public Contains(token: SyntaxKind): boolean; - } - class TokenSingleValueAccess implements ITokenAccess { - public token: SyntaxKind; - constructor(token: SyntaxKind); - public GetTokens(): SyntaxKind[]; - public Contains(tokenValue: SyntaxKind): boolean; - public toString(): string; - } - class TokenAllAccess implements ITokenAccess { - public GetTokens(): SyntaxKind[]; - public Contains(tokenValue: SyntaxKind): boolean; - public toString(): string; - } - class TokenRange { - public tokenAccess: ITokenAccess; - constructor(tokenAccess: ITokenAccess); - static FromToken(token: SyntaxKind): TokenRange; - static FromTokens(tokens: SyntaxKind[]): TokenRange; - static FromRange(f: SyntaxKind, to: SyntaxKind, except?: SyntaxKind[]): TokenRange; - static AllTokens(): TokenRange; - public GetTokens(): SyntaxKind[]; - public Contains(token: SyntaxKind): boolean; - public toString(): string; - static Any: TokenRange; - static AnyIncludingMultilineComments: TokenRange; - static Keywords: TokenRange; - static Operators: TokenRange; - static BinaryOperators: TokenRange; - static BinaryKeywordOperators: TokenRange; - static ReservedKeywords: TokenRange; - static UnaryPrefixOperators: TokenRange; - static UnaryPrefixExpressions: TokenRange; - static UnaryPreincrementExpressions: TokenRange; - static UnaryPostincrementExpressions: TokenRange; - static UnaryPredecrementExpressions: TokenRange; - static UnaryPostdecrementExpressions: TokenRange; - static Comments: TokenRange; - static TypeNames: TokenRange; - } - } -} -declare module TypeScript.Services.Formatting { - class TokenSpan extends TextSpan { - private _kind; - constructor(kind: SyntaxKind, start: number, length: number); - public kind(): SyntaxKind; - } -} -declare module TypeScript.Services.Formatting { - class IndentationNodeContext { - private _node; - private _parent; - private _fullStart; - private _indentationAmount; - private _childIndentationAmountDelta; - private _depth; - private _hasSkippedOrMissingTokenChild; - constructor(parent: IndentationNodeContext, node: SyntaxNode, fullStart: number, indentationAmount: number, childIndentationAmountDelta: number); - public parent(): IndentationNodeContext; - public node(): SyntaxNode; - public fullStart(): number; - public fullWidth(): number; - public start(): number; - public end(): number; - public indentationAmount(): number; - public childIndentationAmountDelta(): number; - public depth(): number; - public kind(): SyntaxKind; - public hasSkippedOrMissingTokenChild(): boolean; - public clone(pool: IndentationNodeContextPool): IndentationNodeContext; - public update(parent: IndentationNodeContext, node: SyntaxNode, fullStart: number, indentationAmount: number, childIndentationAmountDelta: number): void; - } -} -declare module TypeScript.Services.Formatting { - class IndentationNodeContextPool { - private nodes; - public getNode(parent: IndentationNodeContext, node: SyntaxNode, fullStart: number, indentationLevel: number, childIndentationLevelDelta: number): IndentationNodeContext; - public releaseNode(node: IndentationNodeContext, recursive?: boolean): void; - } -} -declare module TypeScript.Services.Formatting { - class IndentationTrackingWalker extends SyntaxWalker { - public options: FormattingOptions; - private _position; - private _parent; - private _textSpan; - private _snapshot; - private _lastTriviaWasNewLine; - private _indentationNodeContextPool; - constructor(textSpan: TextSpan, sourceUnit: SourceUnitSyntax, snapshot: ITextSnapshot, indentFirstToken: boolean, options: FormattingOptions); - public position(): number; - public parent(): IndentationNodeContext; - public textSpan(): TextSpan; - public snapshot(): ITextSnapshot; - public indentationNodeContextPool(): IndentationNodeContextPool; - public forceIndentNextToken(tokenStart: number): void; - public forceSkipIndentingNextToken(tokenStart: number): void; - public indentToken(token: ISyntaxToken, indentationAmount: number, commentIndentationAmount: number): void; - public visitTokenInSpan(token: ISyntaxToken): void; - public visitToken(token: ISyntaxToken): void; - public visitNode(node: SyntaxNode): void; - private getTokenIndentationAmount(token); - private getCommentIndentationAmount(token); - private getNodeIndentation(node, newLineInsertedByFormatting?); - private shouldIndentBlockInParent(parent); - private forceRecomputeIndentationOfParent(tokenStart, newLineAdded); - } -} -declare module TypeScript.Services.Formatting { - class MultipleTokenIndenter extends IndentationTrackingWalker { - private _edits; - constructor(textSpan: TextSpan, sourceUnit: SourceUnitSyntax, snapshot: ITextSnapshot, indentFirstToken: boolean, options: FormattingOptions); - public indentToken(token: ISyntaxToken, indentationAmount: number, commentIndentationAmount: number): void; - public edits(): TextEditInfo[]; - public recordEdit(position: number, length: number, replaceWith: string): void; - private recordIndentationEditsForToken(token, indentationString, commentIndentationString); - private recordIndentationEditsForSingleLineOrSkippedText(trivia, fullStart, indentationString); - private recordIndentationEditsForWhitespace(trivia, fullStart, indentationString); - private recordIndentationEditsForMultiLineComment(trivia, fullStart, indentationString, leadingWhiteSpace, firstLineAlreadyIndented); - private recordIndentationEditsForSegment(segment, fullStart, indentationColumns, whiteSpaceColumnsInFirstSegment); - } -} -declare module TypeScript.Services.Formatting { - class SingleTokenIndenter extends IndentationTrackingWalker { - private indentationAmount; - private indentationPosition; - constructor(indentationPosition: number, sourceUnit: SourceUnitSyntax, snapshot: ITextSnapshot, indentFirstToken: boolean, options: FormattingOptions); - static getIndentationAmount(position: number, sourceUnit: SourceUnitSyntax, snapshot: ITextSnapshot, options: FormattingOptions): number; - public indentToken(token: ISyntaxToken, indentationAmount: number, commentIndentationAmount: number): void; - } -} -declare module TypeScript.Services.Formatting { - class Formatter extends MultipleTokenIndenter { - private previousTokenSpan; - private previousTokenParent; - private scriptHasErrors; - private rulesProvider; - private formattingRequestKind; - private formattingContext; - constructor(textSpan: TextSpan, sourceUnit: SourceUnitSyntax, indentFirstToken: boolean, options: FormattingOptions, snapshot: ITextSnapshot, rulesProvider: RulesProvider, formattingRequestKind: FormattingRequestKind); - static getEdits(textSpan: TextSpan, sourceUnit: SourceUnitSyntax, options: FormattingOptions, indentFirstToken: boolean, snapshot: ITextSnapshot, rulesProvider: RulesProvider, formattingRequestKind: FormattingRequestKind): TextEditInfo[]; - public visitTokenInSpan(token: ISyntaxToken): void; - private processToken(token); - private processTrivia(triviaList, fullStart); - private findCommonParents(parent1, parent2); - private formatPair(t1, t1Parent, t2, t2Parent); - private getLineNumber(span); - private trimWhitespaceInLineRange(startLine, endLine, token?); - private trimWhitespace(line, token?); - private RecordRuleEdits(rule, t1, t2); - } -} -declare var debugObjectHost: any; -declare module TypeScript.Services { - interface ICoreServicesHost { - logger: ILogger; - } - class CoreServices { - public host: ICoreServicesHost; - constructor(host: ICoreServicesHost); - public getPreProcessedFileInfo(fileName: string, sourceText: IScriptSnapshot): IPreProcessedFileInfo; - public getDefaultCompilationSettings(): CompilationSettings; - public dumpMemory(): string; - public getMemoryInfo(): any[]; - public collectGarbage(): void; - } -} -declare module TypeScript.Services { - class SyntaxTreeCache { - private _host; - private _hostCache; - private _currentFileName; - private _currentFileVersion; - private _currentFileSyntaxTree; - private _currentFileScriptSnapshot; - constructor(_host: ILanguageServiceHost); - public getCurrentFileSyntaxTree(fileName: string): SyntaxTree; - private createSyntaxTree(fileName, scriptSnapshot); - private updateSyntaxTree(fileName, scriptSnapshot, previousSyntaxTree, previousFileVersion); - private ensureInvariants(fileName, editRange, incrementalTree, oldScriptSnapshot, newScriptSnapshot); - } - class LanguageServiceCompiler { - private host; - private logger; - private compiler; - private hostCache; - constructor(host: ILanguageServiceHost); - private synchronizeHostData(); - private synchronizeHostDataWorker(); - private tryUpdateFile(compiler, fileName); - public getScriptSnapshot(fileName: string): IScriptSnapshot; - public getCachedHostFileName(fileName: string): string; - public getCachedTopLevelDeclaration(fileName: string): PullDecl; - public compilationSettings(): ImmutableCompilationSettings; - public fileNames(): string[]; - public cleanupSemanticCache(): void; - public getDocument(fileName: string): Document; - public getSyntacticDiagnostics(fileName: string): Diagnostic[]; - public getSemanticDiagnostics(fileName: string): Diagnostic[]; - public getCompilerOptionsDiagnostics(resolvePath: (path: string) => string): Diagnostic[]; - public getSymbolInformationFromAST(ast: AST, document: Document): PullSymbolInfo; - public getCallInformationFromAST(ast: AST, document: Document): PullCallSymbolInfo; - public getVisibleMemberSymbolsFromAST(ast: AST, document: Document): PullVisibleSymbolsInfo; - public getVisibleDeclsFromAST(ast: AST, document: Document): PullDecl[]; - public getContextualMembersFromAST(ast: AST, document: Document): PullVisibleSymbolsInfo; - public pullGetDeclInformation(decl: PullDecl, ast: AST, document: Document): PullSymbolInfo; - public topLevelDeclaration(fileName: string): PullDecl; - public getDeclForAST(ast: AST): PullDecl; - public emit(fileName: string, resolvePath: (path: string) => string): EmitOutput; - public emitDeclarations(fileName: string, resolvePath: (path: string) => string): EmitOutput; - public canEmitDeclarations(fileName: string): boolean; - } -} -declare module TypeScript.Services { - class CompletionHelpers { - private static getSpan(ast); - private static symbolDeclarationIntersectsPosition(symbol, fileName, position); - static filterContextualMembersList(contextualMemberSymbols: PullSymbol[], existingMembers: PullVisibleSymbolsInfo, fileName: string, position: number): PullSymbol[]; - static isCompletionListBlocker(sourceUnit: SourceUnitSyntax, position: number): boolean; - static getContainingObjectLiteralApplicableForCompletion(sourceUnit: SourceUnitSyntax, position: number): PositionedElement; - static isIdentifierDefinitionLocation(sourceUnit: SourceUnitSyntax, position: number): boolean; - static getNonIdentifierCompleteTokenOnLeft(sourceUnit: SourceUnitSyntax, position: number): PositionedToken; - static isRightOfIllegalDot(sourceUnit: SourceUnitSyntax, position: number): boolean; - static getValidCompletionEntryDisplayName(displayName: string): string; - } -} -declare module TypeScript.Services { - class KeywordCompletions { - private static keywords; - private static keywordCompletions; - static getKeywordCompltions(): ResolvedCompletionEntry[]; - } -} -declare module TypeScript.Services { - interface IPartiallyWrittenTypeArgumentListInformation { - genericIdentifer: PositionedToken; - lessThanToken: PositionedToken; - argumentIndex: number; - } - class SignatureInfoHelpers { - static isInPartiallyWrittenTypeArgumentList(syntaxTree: SyntaxTree, position: number): IPartiallyWrittenTypeArgumentListInformation; - static getSignatureInfoFromSignatureSymbol(symbol: PullSymbol, signatures: PullSignatureSymbol[], enclosingScopeSymbol: PullSymbol, compilerState: LanguageServiceCompiler): FormalSignatureItemInfo[]; - static getSignatureInfoFromGenericSymbol(symbol: PullSymbol, enclosingScopeSymbol: PullSymbol, compilerState: LanguageServiceCompiler): FormalSignatureItemInfo[]; - static getActualSignatureInfoFromCallExpression(ast: ICallExpression, caretPosition: number, typeParameterInformation: IPartiallyWrittenTypeArgumentListInformation): ActualSignatureInfo; - static getActualSignatureInfoFromPartiallyWritenGenericExpression(caretPosition: number, typeParameterInformation: IPartiallyWrittenTypeArgumentListInformation): ActualSignatureInfo; - static isSignatureHelpBlocker(sourceUnit: SourceUnitSyntax, position: number): boolean; - static isTargetOfObjectCreationExpression(positionedToken: PositionedToken): boolean; - private static moveBackUpTillMatchingTokenKind(token, tokenKind, matchingTokenKind); - } -} -declare module TypeScript.Services { - interface CachedCompletionEntryDetails extends CompletionEntryDetails { - isResolved(): boolean; - } - class ResolvedCompletionEntry implements CachedCompletionEntryDetails { - public name: string; - public kind: string; - public kindModifiers: string; - public type: string; - public fullSymbolName: string; - public docComment: string; - constructor(name: string, kind: string, kindModifiers: string, type: string, fullSymbolName: string, docComment: string); - public isResolved(): boolean; - } - class DeclReferenceCompletionEntry implements CachedCompletionEntryDetails { - public name: string; - public kind: string; - public kindModifiers: string; - public decl: PullDecl; - public type: string; - public fullSymbolName: string; - public docComment: string; - private hasBeenResolved; - constructor(name: string, kind: string, kindModifiers: string, decl: PullDecl); - public isResolved(): boolean; - public resolve(type: string, fullSymbolName: string, docComments: string): void; - } - class CompletionSession { - public fileName: string; - public position: number; - public entries: IdentiferNameHashTable; - constructor(fileName: string, position: number, entries: IdentiferNameHashTable); - } -} -declare module TypeScript.Services { - class LanguageService implements ILanguageService { - public host: ILanguageServiceHost; - private logger; - private compiler; - private _syntaxTreeCache; - private formattingRulesProvider; - private activeCompletionSession; - constructor(host: ILanguageServiceHost); - public cleanupSemanticCache(): void; - public refresh(): void; - private getSymbolInfoAtPosition(fileName, pos, requireName); - public getReferencesAtPosition(fileName: string, pos: number): ReferenceEntry[]; - private getSymbolScopeAST(symbol, ast); - public getOccurrencesAtPosition(fileName: string, pos: number): ReferenceEntry[]; - private getSingleNodeReferenceAtPosition(fileName, position); - public getImplementorsAtPosition(fileName: string, pos: number): ReferenceEntry[]; - public getOverrides(container: PullTypeSymbol, memberSym: PullSymbol): PullTypeSymbol[]; - private getImplementorsInFile(fileName, symbol); - private getReferencesInFile(fileName, symbol, containingASTOpt); - private isWriteAccess(current); - private isLetterOrDigit(char); - private getPossibleSymbolReferencePositions(fileName, symbolName); - public getSignatureAtPosition(fileName: string, position: number): SignatureInfo; - private getTypeParameterSignatureFromPartiallyWrittenExpression(document, position, genericTypeArgumentListInfo); - public getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; - private addDeclarations(symbolKind, symbolName, containerKind, containerName, declarations, result); - private addDeclaration(symbolKind, symbolName, containerKind, containerName, declaration, result); - private tryAddDefinition(symbolKind, symbolName, containerKind, containerName, declarations, result); - private tryAddSignatures(symbolKind, symbolName, containerKind, containerName, declarations, result); - private tryAddConstructor(symbolKind, symbolName, containerKind, containerName, declarations, result); - public getNavigateToItems(searchValue: string): NavigateToItem[]; - private hasAnyUpperCaseCharacter(s); - private findSearchValueInPullDecl(fileName, declarations, results, searchTerms, parentName?, parentkindName?); - private getScriptElementKindModifiersFromDecl(decl); - private isContainerDeclaration(declaration); - private shouldIncludeDeclarationInNavigationItems(declaration); - public getSyntacticDiagnostics(fileName: string): Diagnostic[]; - public getSemanticDiagnostics(fileName: string): Diagnostic[]; - private _getHostSpecificDiagnosticWithFileName(diagnostic); - public getCompilerOptionsDiagnostics(): Diagnostic[]; - private _getHostFileName(fileName); - public getEmitOutput(fileName: string): EmitOutput; - private getAllSyntacticDiagnostics(); - private getAllSemanticDiagnostics(); - private containErrors(diagnostics); - private getFullNameOfSymbol(symbol, enclosingScopeSymbol); - private getTypeInfoEligiblePath(fileName, position, isConstructorValidPosition); - public getTypeAtPosition(fileName: string, position: number): TypeInfo; - public getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): CompletionInfo; - private getCompletionEntriesFromSymbols(symbolInfo, result); - private getCompletionEntriesFromDecls(decls, result); - private getResolvedCompletionEntryDetailsFromSymbol(symbol, enclosingScopeSymbol); - private getCompletionEntriesForKeywords(keywords, result); - public getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; - private tryFindDeclFromPreviousCompilerVersion(invalidatedDecl); - private getModuleOrEnumKind(symbol); - private mapPullElementKind(kind, symbol?, useConstructorAsClass?, varIsFunction?, functionIsConstructor?); - private getScriptElementKindModifiers(symbol); - private getScriptElementKindModifiersFromFlags(flags); - public getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): SpanInfo; - public getBreakpointStatementAtPosition(fileName: string, pos: number): SpanInfo; - public getFormattingEditsForRange(fileName: string, minChar: number, limChar: number, options: FormatCodeOptions): TextEdit[]; - public getFormattingEditsForDocument(fileName: string, minChar: number, limChar: number, options: FormatCodeOptions): TextEdit[]; - public getFormattingEditsOnPaste(fileName: string, minChar: number, limChar: number, options: FormatCodeOptions): TextEdit[]; - public getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextEdit[]; - private getFormattingManager(fileName, options); - public getOutliningRegions(fileName: string): TextSpan[]; - public getIndentationAtPosition(fileName: string, position: number, editorOptions: EditorOptions): number; - public getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; - public getScriptLexicalStructure(fileName: string): NavigateToItem[]; - public getSyntaxTree(fileName: string): SyntaxTree; - } -} -declare module TypeScript.Services { - class FindReferenceHelpers { - static compareSymbolsForLexicalIdentity(firstSymbol: PullSymbol, secondSymbol: PullSymbol): boolean; - private static checkSymbolsForDeclarationEquality(firstSymbol, secondSymbol); - private static declarationsAreSameOrParents(firstDecl, secondDecl); - } -} -declare module TypeScript.Services { - interface IScriptSnapshotShim { - getText(start: number, end: number): string; - getLength(): number; - getLineStartPositions(): string; - getTextChangeRangeSinceVersion(scriptVersion: number): string; - } - interface ILanguageServiceShimHost extends ILogger { - getCompilationSettings(): string; - getScriptFileNames(): string; - getScriptVersion(fileName: string): number; - getScriptIsOpen(fileName: string): boolean; - getScriptByteOrderMark(fileName: string): number; - getScriptSnapshot(fileName: string): IScriptSnapshotShim; - resolveRelativePath(path: string, directory: string): string; - fileExists(path: string): boolean; - directoryExists(path: string): boolean; - getParentDirectory(path: string): string; - getDiagnosticsObject(): ILanguageServicesDiagnostics; - getLocalizedDiagnosticMessages(): string; - } - interface IShimFactory { - registerShim(shim: IShim): void; - unregisterShim(shim: IShim): void; - } - interface IShim { - dispose(dummy: any): void; - } - class ShimBase implements IShim { - private factory; - constructor(factory: IShimFactory); - public dispose(dummy: any): void; - } - interface ILanguageServiceShim extends IShim { - languageService: ILanguageService; - dispose(dummy: any): void; - refresh(throwOnError: boolean): void; - cleanupSemanticCache(): void; - getSyntacticDiagnostics(fileName: string): string; - getSemanticDiagnostics(fileName: string): string; - getCompilerOptionsDiagnostics(): string; - getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): string; - getCompletionEntryDetails(fileName: string, position: number, entryName: string): string; - getTypeAtPosition(fileName: string, position: number): string; - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): string; - getBreakpointStatementAtPosition(fileName: string, position: number): string; - getSignatureAtPosition(fileName: string, position: number): string; - getDefinitionAtPosition(fileName: string, position: number): string; - getReferencesAtPosition(fileName: string, position: number): string; - getOccurrencesAtPosition(fileName: string, position: number): string; - getImplementorsAtPosition(fileName: string, position: number): string; - getNavigateToItems(searchValue: string): string; - getScriptLexicalStructure(fileName: string): string; - getOutliningRegions(fileName: string): string; - getBraceMatchingAtPosition(fileName: string, position: number): string; - getIndentationAtPosition(fileName: string, position: number, options: string): string; - getFormattingEditsForRange(fileName: string, minChar: number, limChar: number, options: string): string; - getFormattingEditsForDocument(fileName: string, minChar: number, limChar: number, options: string): string; - getFormattingEditsOnPaste(fileName: string, minChar: number, limChar: number, options: string): string; - getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: string): string; - getEmitOutput(fileName: string): string; - } - class LanguageServiceShimHostAdapter implements ILanguageServiceHost { - private shimHost; - constructor(shimHost: ILanguageServiceShimHost); - public information(): boolean; - public debug(): boolean; - public warning(): boolean; - public error(): boolean; - public fatal(): boolean; - public log(s: string): void; - public getCompilationSettings(): CompilationSettings; - public getScriptFileNames(): string[]; - public getScriptSnapshot(fileName: string): IScriptSnapshot; - public getScriptVersion(fileName: string): number; - public getScriptIsOpen(fileName: string): boolean; - public getScriptByteOrderMark(fileName: string): ByteOrderMark; - public getDiagnosticsObject(): ILanguageServicesDiagnostics; - public getLocalizedDiagnosticMessages(): any; - public resolveRelativePath(path: string, directory: string): string; - public fileExists(path: string): boolean; - public directoryExists(path: string): boolean; - public getParentDirectory(path: string): string; - } - function simpleForwardCall(logger: ILogger, actionDescription: string, action: () => any): any; - function forwardJSONCall(logger: ILogger, actionDescription: string, action: () => any): string; - class LanguageServiceShim extends ShimBase implements ILanguageServiceShim { - private host; - public languageService: ILanguageService; - private logger; - constructor(factory: IShimFactory, host: ILanguageServiceShimHost, languageService: ILanguageService); - public forwardJSONCall(actionDescription: string, action: () => any): string; - public dispose(dummy: any): void; - public refresh(throwOnError: boolean): void; - public cleanupSemanticCache(): void; - private static realizeDiagnosticCategory(category); - private static realizeDiagnostic(diagnostic); - private realizeDiagnosticWithFileName(diagnostic); - public getSyntacticDiagnostics(fileName: string): string; - public getSemanticDiagnostics(fileName: string): string; - public getCompilerOptionsDiagnostics(): string; - public getTypeAtPosition(fileName: string, position: number): string; - public getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): string; - public getBreakpointStatementAtPosition(fileName: string, position: number): string; - public getSignatureAtPosition(fileName: string, position: number): string; - public getDefinitionAtPosition(fileName: string, position: number): string; - public getBraceMatchingAtPosition(fileName: string, position: number): string; - public getIndentationAtPosition(fileName: string, position: number, options: string): string; - public getReferencesAtPosition(fileName: string, position: number): string; - public getOccurrencesAtPosition(fileName: string, position: number): string; - public getImplementorsAtPosition(fileName: string, position: number): string; - public getCompletionsAtPosition(fileName: string, position: number, isMemberCompletion: boolean): string; - public getCompletionEntryDetails(fileName: string, position: number, entryName: string): string; - public getFormattingEditsForRange(fileName: string, minChar: number, limChar: number, options: string): string; - public getFormattingEditsForDocument(fileName: string, minChar: number, limChar: number, options: string): string; - public getFormattingEditsOnPaste(fileName: string, minChar: number, limChar: number, options: string): string; - public getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: string): string; - public getNavigateToItems(searchValue: string): string; - public getScriptLexicalStructure(fileName: string): string; - public getOutliningRegions(fileName: string): string; - public getEmitOutput(fileName: string): string; - private _navigateToItemsToString(items); - } - class ClassifierShim extends ShimBase { - public host: IClassifierHost; - public classifier: Classifier; - constructor(factory: IShimFactory, host: IClassifierHost); - public getClassificationsForLine(text: string, lexState: EndOfLineState): string; - } - class CoreServicesShim extends ShimBase { - public host: ICoreServicesHost; - public logger: ILogger; - public services: CoreServices; - constructor(factory: IShimFactory, host: ICoreServicesHost); - private forwardJSONCall(actionDescription, action); - public getPreProcessedFileInfo(fileName: string, sourceText: IScriptSnapshot): string; - public getDefaultCompilationSettings(): string; - public dumpMemory(dummy: any): string; - public getMemoryInfo(dummy: any): string; - } -} -declare module TypeScript.Services { - class OutliningElementsCollector extends DepthLimitedWalker { - private static MaximumDepth; - private inObjectLiteralExpression; - private elements; - constructor(); - public visitClassDeclaration(node: ClassDeclarationSyntax): void; - public visitInterfaceDeclaration(node: InterfaceDeclarationSyntax): void; - public visitModuleDeclaration(node: ModuleDeclarationSyntax): void; - public visitEnumDeclaration(node: EnumDeclarationSyntax): void; - public visitFunctionDeclaration(node: FunctionDeclarationSyntax): void; - public visitFunctionExpression(node: FunctionExpressionSyntax): void; - public visitConstructorDeclaration(node: ConstructorDeclarationSyntax): void; - public visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): void; - public visitGetAccessor(node: GetAccessorSyntax): void; - public visitSetAccessor(node: SetAccessorSyntax): void; - public visitObjectLiteralExpression(node: ObjectLiteralExpressionSyntax): void; - private addOutlineRange(node, startElement, endElement); - static collectElements(node: SourceUnitSyntax): TextSpan[]; - } -} -declare module TypeScript.Services { - class Indenter { - static getIndentation(node: SourceUnitSyntax, soruceText: IScriptSnapshot, position: number, editorOptions: EditorOptions): number; - private static belongsToBracket(sourceText, token, position); - private static isInContainerNode(parent, element); - private static getCustomListIndentation(list, element); - private static getListItemIndentation(list, elementIndex); - } -} -declare module TypeScript.Services.Breakpoints { - function getBreakpointLocation(syntaxTree: SyntaxTree, askedPos: number): SpanInfo; -} -declare module TypeScript.Services { - class GetScriptLexicalStructureWalker extends PositionTrackingWalker { - private fileName; - private nameStack; - private kindStack; - private currentMemberVariableDeclaration; - private currentVariableStatement; - private currentInterfaceDeclaration; - private parentScopes; - private currentScope; - private createScope(); - private pushNewContainerScope(containerName, kind); - private popScope(); - constructor(fileName: string); - private collectItems(items, scope?); - static getListsOfAllScriptLexicalStructure(items: NavigateToItem[], fileName: string, unit: SourceUnitSyntax): void; - private createItem(node, modifiers, kind, name); - private addAdditionalSpan(node, key); - private getKindModifiers(modifiers); - public visitModuleDeclaration(node: ModuleDeclarationSyntax): void; - private visitModuleDeclarationWorker(node, names, nameIndex); - private getModuleNames(node); - private getModuleNamesHelper(name, result); - public visitClassDeclaration(node: ClassDeclarationSyntax): void; - public visitInterfaceDeclaration(node: InterfaceDeclarationSyntax): void; - public visitObjectType(node: ObjectTypeSyntax): void; - public visitEnumDeclaration(node: EnumDeclarationSyntax): void; - public visitConstructorDeclaration(node: ConstructorDeclarationSyntax): void; - public visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): void; - public visitGetAccessor(node: GetAccessorSyntax): void; - public visitSetAccessor(node: SetAccessorSyntax): void; - public visitMemberVariableDeclaration(node: MemberVariableDeclarationSyntax): void; - public visitVariableStatement(node: VariableStatementSyntax): void; - public visitVariableDeclarator(node: VariableDeclaratorSyntax): void; - public visitIndexSignature(node: IndexSignatureSyntax): void; - public visitEnumElement(node: EnumElementSyntax): void; - public visitCallSignature(node: CallSignatureSyntax): void; - public visitConstructSignature(node: ConstructSignatureSyntax): void; - public visitMethodSignature(node: MethodSignatureSyntax): void; - public visitPropertySignature(node: PropertySignatureSyntax): void; - public visitFunctionDeclaration(node: FunctionDeclarationSyntax): void; - public visitBlock(node: BlockSyntax): void; - public visitIfStatement(node: IfStatementSyntax): void; - public visitExpressionStatement(node: ExpressionStatementSyntax): void; - public visitThrowStatement(node: ThrowStatementSyntax): void; - public visitReturnStatement(node: ReturnStatementSyntax): void; - public visitSwitchStatement(node: SwitchStatementSyntax): void; - public visitWithStatement(node: WithStatementSyntax): void; - public visitTryStatement(node: TryStatementSyntax): void; - public visitLabeledStatement(node: LabeledStatementSyntax): void; - } -} -declare module TypeScript.Services { - function copyDataObject(dst: any, src: any): any; - class TypeScriptServicesFactory implements IShimFactory { - private _shims; - public createPullLanguageService(host: ILanguageServiceHost): ILanguageService; - public createLanguageServiceShim(host: ILanguageServiceShimHost): ILanguageServiceShim; - public createClassifier(host: IClassifierHost): Classifier; - public createClassifierShim(host: IClassifierHost): ClassifierShim; - public createCoreServices(host: ICoreServicesHost): CoreServices; - public createCoreServicesShim(host: ICoreServicesHost): CoreServicesShim; - public close(): void; - public registerShim(shim: IShim): void; - public unregisterShim(shim: IShim): void; - } -} -declare module TypeScript.Services { - class BraceMatcher { - static getMatchSpans(syntaxTree: SyntaxTree, position: number): TextSpan[]; - private static getMatchingCloseBrace(currentToken, position, result); - private static getMatchingOpenBrace(currentToken, position, result); - private static getMatchingCloseBraceTokenKind(positionedElement); - private static getMatchingOpenBraceTokenKind(positionedElement); - } -} - -declare module 'typescript-services' { - export = TypeScript; -} +// Type definitions for TypeScript API v0.4.0 +// Project: http://www.typescriptlang.org/ +// Definitions by: Microsoft TypeScript +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +declare namespace ts { + interface Map { + [index: string]: T; + } + interface FileMap { + get(fileName: string): T; + set(fileName: string, value: T): void; + contains(fileName: string): boolean; + remove(fileName: string): void; + forEachValue(f: (v: T) => void): void; + clear(): void; + } + interface TextRange { + pos: number; + end: number; + } + const enum SyntaxKind { + Unknown = 0, + EndOfFileToken = 1, + SingleLineCommentTrivia = 2, + MultiLineCommentTrivia = 3, + NewLineTrivia = 4, + WhitespaceTrivia = 5, + ShebangTrivia = 6, + ConflictMarkerTrivia = 7, + NumericLiteral = 8, + StringLiteral = 9, + RegularExpressionLiteral = 10, + NoSubstitutionTemplateLiteral = 11, + TemplateHead = 12, + TemplateMiddle = 13, + TemplateTail = 14, + OpenBraceToken = 15, + CloseBraceToken = 16, + OpenParenToken = 17, + CloseParenToken = 18, + OpenBracketToken = 19, + CloseBracketToken = 20, + DotToken = 21, + DotDotDotToken = 22, + SemicolonToken = 23, + CommaToken = 24, + LessThanToken = 25, + LessThanSlashToken = 26, + GreaterThanToken = 27, + LessThanEqualsToken = 28, + GreaterThanEqualsToken = 29, + EqualsEqualsToken = 30, + ExclamationEqualsToken = 31, + EqualsEqualsEqualsToken = 32, + ExclamationEqualsEqualsToken = 33, + EqualsGreaterThanToken = 34, + PlusToken = 35, + MinusToken = 36, + AsteriskToken = 37, + SlashToken = 38, + PercentToken = 39, + PlusPlusToken = 40, + MinusMinusToken = 41, + LessThanLessThanToken = 42, + GreaterThanGreaterThanToken = 43, + GreaterThanGreaterThanGreaterThanToken = 44, + AmpersandToken = 45, + BarToken = 46, + CaretToken = 47, + ExclamationToken = 48, + TildeToken = 49, + AmpersandAmpersandToken = 50, + BarBarToken = 51, + QuestionToken = 52, + ColonToken = 53, + AtToken = 54, + EqualsToken = 55, + PlusEqualsToken = 56, + MinusEqualsToken = 57, + AsteriskEqualsToken = 58, + SlashEqualsToken = 59, + PercentEqualsToken = 60, + LessThanLessThanEqualsToken = 61, + GreaterThanGreaterThanEqualsToken = 62, + GreaterThanGreaterThanGreaterThanEqualsToken = 63, + AmpersandEqualsToken = 64, + BarEqualsToken = 65, + CaretEqualsToken = 66, + Identifier = 67, + BreakKeyword = 68, + CaseKeyword = 69, + CatchKeyword = 70, + ClassKeyword = 71, + ConstKeyword = 72, + ContinueKeyword = 73, + DebuggerKeyword = 74, + DefaultKeyword = 75, + DeleteKeyword = 76, + DoKeyword = 77, + ElseKeyword = 78, + EnumKeyword = 79, + ExportKeyword = 80, + ExtendsKeyword = 81, + FalseKeyword = 82, + FinallyKeyword = 83, + ForKeyword = 84, + FunctionKeyword = 85, + IfKeyword = 86, + ImportKeyword = 87, + InKeyword = 88, + InstanceOfKeyword = 89, + NewKeyword = 90, + NullKeyword = 91, + ReturnKeyword = 92, + SuperKeyword = 93, + SwitchKeyword = 94, + ThisKeyword = 95, + ThrowKeyword = 96, + TrueKeyword = 97, + TryKeyword = 98, + TypeOfKeyword = 99, + VarKeyword = 100, + VoidKeyword = 101, + WhileKeyword = 102, + WithKeyword = 103, + ImplementsKeyword = 104, + InterfaceKeyword = 105, + LetKeyword = 106, + PackageKeyword = 107, + PrivateKeyword = 108, + ProtectedKeyword = 109, + PublicKeyword = 110, + StaticKeyword = 111, + YieldKeyword = 112, + AbstractKeyword = 113, + AsKeyword = 114, + AnyKeyword = 115, + AsyncKeyword = 116, + AwaitKeyword = 117, + BooleanKeyword = 118, + ConstructorKeyword = 119, + DeclareKeyword = 120, + GetKeyword = 121, + IsKeyword = 122, + ModuleKeyword = 123, + NamespaceKeyword = 124, + RequireKeyword = 125, + NumberKeyword = 126, + SetKeyword = 127, + StringKeyword = 128, + SymbolKeyword = 129, + TypeKeyword = 130, + FromKeyword = 131, + OfKeyword = 132, + QualifiedName = 133, + ComputedPropertyName = 134, + TypeParameter = 135, + Parameter = 136, + Decorator = 137, + PropertySignature = 138, + PropertyDeclaration = 139, + MethodSignature = 140, + MethodDeclaration = 141, + Constructor = 142, + GetAccessor = 143, + SetAccessor = 144, + CallSignature = 145, + ConstructSignature = 146, + IndexSignature = 147, + TypePredicate = 148, + TypeReference = 149, + FunctionType = 150, + ConstructorType = 151, + TypeQuery = 152, + TypeLiteral = 153, + ArrayType = 154, + TupleType = 155, + UnionType = 156, + IntersectionType = 157, + ParenthesizedType = 158, + ObjectBindingPattern = 159, + ArrayBindingPattern = 160, + BindingElement = 161, + ArrayLiteralExpression = 162, + ObjectLiteralExpression = 163, + PropertyAccessExpression = 164, + ElementAccessExpression = 165, + CallExpression = 166, + NewExpression = 167, + TaggedTemplateExpression = 168, + TypeAssertionExpression = 169, + ParenthesizedExpression = 170, + FunctionExpression = 171, + ArrowFunction = 172, + DeleteExpression = 173, + TypeOfExpression = 174, + VoidExpression = 175, + AwaitExpression = 176, + PrefixUnaryExpression = 177, + PostfixUnaryExpression = 178, + BinaryExpression = 179, + ConditionalExpression = 180, + TemplateExpression = 181, + YieldExpression = 182, + SpreadElementExpression = 183, + ClassExpression = 184, + OmittedExpression = 185, + ExpressionWithTypeArguments = 186, + AsExpression = 187, + TemplateSpan = 188, + SemicolonClassElement = 189, + Block = 190, + VariableStatement = 191, + EmptyStatement = 192, + ExpressionStatement = 193, + IfStatement = 194, + DoStatement = 195, + WhileStatement = 196, + ForStatement = 197, + ForInStatement = 198, + ForOfStatement = 199, + ContinueStatement = 200, + BreakStatement = 201, + ReturnStatement = 202, + WithStatement = 203, + SwitchStatement = 204, + LabeledStatement = 205, + ThrowStatement = 206, + TryStatement = 207, + DebuggerStatement = 208, + VariableDeclaration = 209, + VariableDeclarationList = 210, + FunctionDeclaration = 211, + ClassDeclaration = 212, + InterfaceDeclaration = 213, + TypeAliasDeclaration = 214, + EnumDeclaration = 215, + ModuleDeclaration = 216, + ModuleBlock = 217, + CaseBlock = 218, + ImportEqualsDeclaration = 219, + ImportDeclaration = 220, + ImportClause = 221, + NamespaceImport = 222, + NamedImports = 223, + ImportSpecifier = 224, + ExportAssignment = 225, + ExportDeclaration = 226, + NamedExports = 227, + ExportSpecifier = 228, + MissingDeclaration = 229, + ExternalModuleReference = 230, + JsxElement = 231, + JsxSelfClosingElement = 232, + JsxOpeningElement = 233, + JsxText = 234, + JsxClosingElement = 235, + JsxAttribute = 236, + JsxSpreadAttribute = 237, + JsxExpression = 238, + CaseClause = 239, + DefaultClause = 240, + HeritageClause = 241, + CatchClause = 242, + PropertyAssignment = 243, + ShorthandPropertyAssignment = 244, + EnumMember = 245, + SourceFile = 246, + JSDocTypeExpression = 247, + JSDocAllType = 248, + JSDocUnknownType = 249, + JSDocArrayType = 250, + JSDocUnionType = 251, + JSDocTupleType = 252, + JSDocNullableType = 253, + JSDocNonNullableType = 254, + JSDocRecordType = 255, + JSDocRecordMember = 256, + JSDocTypeReference = 257, + JSDocOptionalType = 258, + JSDocFunctionType = 259, + JSDocVariadicType = 260, + JSDocConstructorType = 261, + JSDocThisType = 262, + JSDocComment = 263, + JSDocTag = 264, + JSDocParameterTag = 265, + JSDocReturnTag = 266, + JSDocTypeTag = 267, + JSDocTemplateTag = 268, + SyntaxList = 269, + Count = 270, + FirstAssignment = 55, + LastAssignment = 66, + FirstReservedWord = 68, + LastReservedWord = 103, + FirstKeyword = 68, + LastKeyword = 132, + FirstFutureReservedWord = 104, + LastFutureReservedWord = 112, + FirstTypeNode = 149, + LastTypeNode = 158, + FirstPunctuation = 15, + LastPunctuation = 66, + FirstToken = 0, + LastToken = 132, + FirstTriviaToken = 2, + LastTriviaToken = 7, + FirstLiteralToken = 8, + LastLiteralToken = 11, + FirstTemplateToken = 11, + LastTemplateToken = 14, + FirstBinaryOperator = 25, + LastBinaryOperator = 66, + FirstNode = 133, + } + const enum NodeFlags { + Export = 1, + Ambient = 2, + Public = 16, + Private = 32, + Protected = 64, + Static = 128, + Abstract = 256, + Async = 512, + Default = 1024, + MultiLine = 2048, + Synthetic = 4096, + DeclarationFile = 8192, + Let = 16384, + Const = 32768, + OctalLiteral = 65536, + Namespace = 131072, + ExportContext = 262144, + Modifier = 2035, + AccessibilityModifier = 112, + BlockScoped = 49152, + } + const enum JsxFlags { + None = 0, + IntrinsicNamedElement = 1, + IntrinsicIndexedElement = 2, + ClassElement = 4, + UnknownElement = 8, + IntrinsicElement = 3, + } + interface Node extends TextRange { + kind: SyntaxKind; + flags: NodeFlags; + decorators?: NodeArray; + modifiers?: ModifiersArray; + parent?: Node; + } + interface NodeArray extends Array, TextRange { + hasTrailingComma?: boolean; + } + interface ModifiersArray extends NodeArray { + flags: number; + } + interface Identifier extends PrimaryExpression { + text: string; + originalKeywordKind?: SyntaxKind; + } + interface QualifiedName extends Node { + left: EntityName; + right: Identifier; + } + type EntityName = Identifier | QualifiedName; + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern; + interface Declaration extends Node { + _declarationBrand: any; + name?: DeclarationName; + } + interface ComputedPropertyName extends Node { + expression: Expression; + } + interface Decorator extends Node { + expression: LeftHandSideExpression; + } + interface TypeParameterDeclaration extends Declaration { + name: Identifier; + constraint?: TypeNode; + expression?: Expression; + } + interface SignatureDeclaration extends Declaration { + typeParameters?: NodeArray; + parameters: NodeArray; + type?: TypeNode; + } + interface VariableDeclaration extends Declaration { + parent?: VariableDeclarationList; + name: Identifier | BindingPattern; + type?: TypeNode; + initializer?: Expression; + } + interface VariableDeclarationList extends Node { + declarations: NodeArray; + } + interface ParameterDeclaration extends Declaration { + dotDotDotToken?: Node; + name: Identifier | BindingPattern; + questionToken?: Node; + type?: TypeNode; + initializer?: Expression; + } + interface BindingElement extends Declaration { + propertyName?: Identifier; + dotDotDotToken?: Node; + name: Identifier | BindingPattern; + initializer?: Expression; + } + interface PropertyDeclaration extends Declaration, ClassElement { + name: DeclarationName; + questionToken?: Node; + type?: TypeNode; + initializer?: Expression; + } + interface ObjectLiteralElement extends Declaration { + _objectLiteralBrandBrand: any; + } + interface PropertyAssignment extends ObjectLiteralElement { + _propertyAssignmentBrand: any; + name: DeclarationName; + questionToken?: Node; + initializer: Expression; + } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { + name: Identifier; + questionToken?: Node; + } + interface VariableLikeDeclaration extends Declaration { + propertyName?: Identifier; + dotDotDotToken?: Node; + name: DeclarationName; + questionToken?: Node; + type?: TypeNode; + initializer?: Expression; + } + interface BindingPattern extends Node { + elements: NodeArray; + } + /** + * Several node kinds share function-like features such as a signature, + * a name, and a body. These nodes should extend FunctionLikeDeclaration. + * Examples: + * - FunctionDeclaration + * - MethodDeclaration + * - AccessorDeclaration + */ + interface FunctionLikeDeclaration extends SignatureDeclaration { + _functionLikeDeclarationBrand: any; + asteriskToken?: Node; + questionToken?: Node; + body?: Block | Expression; + } + interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { + name?: Identifier; + body?: Block; + } + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { + body?: Block; + } + interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { + body?: Block; + } + interface SemicolonClassElement extends ClassElement { + _semicolonClassElementBrand: any; + } + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { + _accessorDeclarationBrand: any; + body: Block; + } + interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { + _indexSignatureDeclarationBrand: any; + } + interface TypeNode extends Node { + _typeNodeBrand: any; + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { + _functionOrConstructorTypeNodeBrand: any; + } + interface TypeReferenceNode extends TypeNode { + typeName: EntityName; + typeArguments?: NodeArray; + } + interface TypePredicateNode extends TypeNode { + parameterName: Identifier; + type: TypeNode; + } + interface TypeQueryNode extends TypeNode { + exprName: EntityName; + } + interface TypeLiteralNode extends TypeNode, Declaration { + members: NodeArray; + } + interface ArrayTypeNode extends TypeNode { + elementType: TypeNode; + } + interface TupleTypeNode extends TypeNode { + elementTypes: NodeArray; + } + interface UnionOrIntersectionTypeNode extends TypeNode { + types: NodeArray; + } + interface UnionTypeNode extends UnionOrIntersectionTypeNode { + } + interface IntersectionTypeNode extends UnionOrIntersectionTypeNode { + } + interface ParenthesizedTypeNode extends TypeNode { + type: TypeNode; + } + interface StringLiteral extends LiteralExpression, TypeNode { + _stringLiteralBrand: any; + } + interface Expression extends Node { + _expressionBrand: any; + contextualType?: Type; + } + interface UnaryExpression extends Expression { + _unaryExpressionBrand: any; + } + interface PrefixUnaryExpression extends UnaryExpression { + operator: SyntaxKind; + operand: UnaryExpression; + } + interface PostfixUnaryExpression extends PostfixExpression { + operand: LeftHandSideExpression; + operator: SyntaxKind; + } + interface PostfixExpression extends UnaryExpression { + _postfixExpressionBrand: any; + } + interface LeftHandSideExpression extends PostfixExpression { + _leftHandSideExpressionBrand: any; + } + interface MemberExpression extends LeftHandSideExpression { + _memberExpressionBrand: any; + } + interface PrimaryExpression extends MemberExpression { + _primaryExpressionBrand: any; + } + interface DeleteExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface TypeOfExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface VoidExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface AwaitExpression extends UnaryExpression { + expression: UnaryExpression; + } + interface YieldExpression extends Expression { + asteriskToken?: Node; + expression?: Expression; + } + interface BinaryExpression extends Expression { + left: Expression; + operatorToken: Node; + right: Expression; + } + interface ConditionalExpression extends Expression { + condition: Expression; + questionToken: Node; + whenTrue: Expression; + colonToken: Node; + whenFalse: Expression; + } + interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { + name?: Identifier; + body: Block | Expression; + } + interface ArrowFunction extends Expression, FunctionLikeDeclaration { + equalsGreaterThanToken: Node; + } + interface LiteralExpression extends PrimaryExpression { + text: string; + isUnterminated?: boolean; + hasExtendedUnicodeEscape?: boolean; + } + interface TemplateExpression extends PrimaryExpression { + head: LiteralExpression; + templateSpans: NodeArray; + } + interface TemplateSpan extends Node { + expression: Expression; + literal: LiteralExpression; + } + interface ParenthesizedExpression extends PrimaryExpression { + expression: Expression; + } + interface ArrayLiteralExpression extends PrimaryExpression { + elements: NodeArray; + } + interface SpreadElementExpression extends Expression { + expression: Expression; + } + interface ObjectLiteralExpression extends PrimaryExpression, Declaration { + properties: NodeArray; + } + interface PropertyAccessExpression extends MemberExpression { + expression: LeftHandSideExpression; + dotToken: Node; + name: Identifier; + } + interface ElementAccessExpression extends MemberExpression { + expression: LeftHandSideExpression; + argumentExpression?: Expression; + } + interface CallExpression extends LeftHandSideExpression { + expression: LeftHandSideExpression; + typeArguments?: NodeArray; + arguments: NodeArray; + } + interface ExpressionWithTypeArguments extends TypeNode { + expression: LeftHandSideExpression; + typeArguments?: NodeArray; + } + interface NewExpression extends CallExpression, PrimaryExpression { + } + interface TaggedTemplateExpression extends MemberExpression { + tag: LeftHandSideExpression; + template: LiteralExpression | TemplateExpression; + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator; + interface AsExpression extends Expression { + expression: Expression; + type: TypeNode; + } + interface TypeAssertion extends UnaryExpression { + type: TypeNode; + expression: UnaryExpression; + } + type AssertionExpression = TypeAssertion | AsExpression; + interface JsxElement extends PrimaryExpression { + openingElement: JsxOpeningElement; + children: NodeArray; + closingElement: JsxClosingElement; + } + interface JsxOpeningElement extends Expression { + _openingElementBrand?: any; + tagName: EntityName; + attributes: NodeArray; + } + interface JsxSelfClosingElement extends PrimaryExpression, JsxOpeningElement { + _selfClosingElementBrand?: any; + } + type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement; + interface JsxAttribute extends Node { + name: Identifier; + initializer?: Expression; + } + interface JsxSpreadAttribute extends Node { + expression: Expression; + } + interface JsxClosingElement extends Node { + tagName: EntityName; + } + interface JsxExpression extends Expression { + expression?: Expression; + } + interface JsxText extends Node { + _jsxTextExpressionBrand: any; + } + type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement; + interface Statement extends Node { + _statementBrand: any; + } + interface Block extends Statement { + statements: NodeArray; + } + interface VariableStatement extends Statement { + declarationList: VariableDeclarationList; + } + interface ExpressionStatement extends Statement { + expression: Expression; + } + interface IfStatement extends Statement { + expression: Expression; + thenStatement: Statement; + elseStatement?: Statement; + } + interface IterationStatement extends Statement { + statement: Statement; + } + interface DoStatement extends IterationStatement { + expression: Expression; + } + interface WhileStatement extends IterationStatement { + expression: Expression; + } + interface ForStatement extends IterationStatement { + initializer?: VariableDeclarationList | Expression; + condition?: Expression; + incrementor?: Expression; + } + interface ForInStatement extends IterationStatement { + initializer: VariableDeclarationList | Expression; + expression: Expression; + } + interface ForOfStatement extends IterationStatement { + initializer: VariableDeclarationList | Expression; + expression: Expression; + } + interface BreakOrContinueStatement extends Statement { + label?: Identifier; + } + interface ReturnStatement extends Statement { + expression?: Expression; + } + interface WithStatement extends Statement { + expression: Expression; + statement: Statement; + } + interface SwitchStatement extends Statement { + expression: Expression; + caseBlock: CaseBlock; + } + interface CaseBlock extends Node { + clauses: NodeArray; + } + interface CaseClause extends Node { + expression?: Expression; + statements: NodeArray; + } + interface DefaultClause extends Node { + statements: NodeArray; + } + type CaseOrDefaultClause = CaseClause | DefaultClause; + interface LabeledStatement extends Statement { + label: Identifier; + statement: Statement; + } + interface ThrowStatement extends Statement { + expression: Expression; + } + interface TryStatement extends Statement { + tryBlock: Block; + catchClause?: CatchClause; + finallyBlock?: Block; + } + interface CatchClause extends Node { + variableDeclaration: VariableDeclaration; + block: Block; + } + interface ClassLikeDeclaration extends Declaration { + name?: Identifier; + typeParameters?: NodeArray; + heritageClauses?: NodeArray; + members: NodeArray; + } + interface ClassDeclaration extends ClassLikeDeclaration, Statement { + } + interface ClassExpression extends ClassLikeDeclaration, PrimaryExpression { + } + interface ClassElement extends Declaration { + _classElementBrand: any; + } + interface InterfaceDeclaration extends Declaration, Statement { + name: Identifier; + typeParameters?: NodeArray; + heritageClauses?: NodeArray; + members: NodeArray; + } + interface HeritageClause extends Node { + token: SyntaxKind; + types?: NodeArray; + } + interface TypeAliasDeclaration extends Declaration, Statement { + name: Identifier; + typeParameters?: NodeArray; + type: TypeNode; + } + interface EnumMember extends Declaration { + name: DeclarationName; + initializer?: Expression; + } + interface EnumDeclaration extends Declaration, Statement { + name: Identifier; + members: NodeArray; + } + interface ModuleDeclaration extends Declaration, Statement { + name: Identifier | LiteralExpression; + body: ModuleBlock | ModuleDeclaration; + } + interface ModuleBlock extends Node, Statement { + statements: NodeArray; + } + interface ImportEqualsDeclaration extends Declaration, Statement { + name: Identifier; + moduleReference: EntityName | ExternalModuleReference; + } + interface ExternalModuleReference extends Node { + expression?: Expression; + } + interface ImportDeclaration extends Statement { + importClause?: ImportClause; + moduleSpecifier: Expression; + } + interface ImportClause extends Declaration { + name?: Identifier; + namedBindings?: NamespaceImport | NamedImports; + } + interface NamespaceImport extends Declaration { + name: Identifier; + } + interface ExportDeclaration extends Declaration, Statement { + exportClause?: NamedExports; + moduleSpecifier?: Expression; + } + interface NamedImportsOrExports extends Node { + elements: NodeArray; + } + type NamedImports = NamedImportsOrExports; + type NamedExports = NamedImportsOrExports; + interface ImportOrExportSpecifier extends Declaration { + propertyName?: Identifier; + name: Identifier; + } + type ImportSpecifier = ImportOrExportSpecifier; + type ExportSpecifier = ImportOrExportSpecifier; + interface ExportAssignment extends Declaration, Statement { + isExportEquals?: boolean; + expression: Expression; + } + interface FileReference extends TextRange { + fileName: string; + } + interface CommentRange extends TextRange { + hasTrailingNewLine?: boolean; + kind: SyntaxKind; + } + interface JSDocTypeExpression extends Node { + type: JSDocType; + } + interface JSDocType extends TypeNode { + _jsDocTypeBrand: any; + } + interface JSDocAllType extends JSDocType { + _JSDocAllTypeBrand: any; + } + interface JSDocUnknownType extends JSDocType { + _JSDocUnknownTypeBrand: any; + } + interface JSDocArrayType extends JSDocType { + elementType: JSDocType; + } + interface JSDocUnionType extends JSDocType { + types: NodeArray; + } + interface JSDocTupleType extends JSDocType { + types: NodeArray; + } + interface JSDocNonNullableType extends JSDocType { + type: JSDocType; + } + interface JSDocNullableType extends JSDocType { + type: JSDocType; + } + interface JSDocRecordType extends JSDocType, TypeLiteralNode { + members: NodeArray; + } + interface JSDocTypeReference extends JSDocType { + name: EntityName; + typeArguments: NodeArray; + } + interface JSDocOptionalType extends JSDocType { + type: JSDocType; + } + interface JSDocFunctionType extends JSDocType, SignatureDeclaration { + parameters: NodeArray; + type: JSDocType; + } + interface JSDocVariadicType extends JSDocType { + type: JSDocType; + } + interface JSDocConstructorType extends JSDocType { + type: JSDocType; + } + interface JSDocThisType extends JSDocType { + type: JSDocType; + } + interface JSDocRecordMember extends PropertyDeclaration { + name: Identifier | LiteralExpression; + type?: JSDocType; + } + interface JSDocComment extends Node { + tags: NodeArray; + } + interface JSDocTag extends Node { + atToken: Node; + tagName: Identifier; + } + interface JSDocTemplateTag extends JSDocTag { + typeParameters: NodeArray; + } + interface JSDocReturnTag extends JSDocTag { + typeExpression: JSDocTypeExpression; + } + interface JSDocTypeTag extends JSDocTag { + typeExpression: JSDocTypeExpression; + } + interface JSDocParameterTag extends JSDocTag { + preParameterName?: Identifier; + typeExpression?: JSDocTypeExpression; + postParameterName?: Identifier; + isBracketed: boolean; + } + interface SourceFile extends Declaration { + statements: NodeArray; + endOfFileToken: Node; + fileName: string; + text: string; + amdDependencies: { + path: string; + name: string; + }[]; + moduleName: string; + referencedFiles: FileReference[]; + languageVariant: LanguageVariant; + /** + * lib.d.ts should have a reference comment like + * + * /// + * + * If any other file has this comment, it signals not to include lib.d.ts + * because this containing file is intended to act as a default library. + */ + hasNoDefaultLib: boolean; + languageVersion: ScriptTarget; + } + interface ScriptReferenceHost { + getCompilerOptions(): CompilerOptions; + getSourceFile(fileName: string): SourceFile; + getCurrentDirectory(): string; + } + interface ParseConfigHost extends ModuleResolutionHost { + readDirectory(rootDir: string, extension: string, exclude: string[]): string[]; + } + interface WriteFileCallback { + (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; + } + class OperationCanceledException { + } + interface CancellationToken { + isCancellationRequested(): boolean; + /** @throws OperationCanceledException if isCancellationRequested is true */ + throwIfCancellationRequested(): void; + } + interface Program extends ScriptReferenceHost { + /** + * Get a list of root file names that were passed to a 'createProgram' + */ + getRootFileNames(): string[]; + /** + * Get a list of files in the program + */ + getSourceFiles(): SourceFile[]; + /** + * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then + * the JavaScript and declaration files will be produced for all the files in this program. + * If targetSourceFile is specified, then only the JavaScript and declaration for that + * specific file will be generated. + * + * If writeFile is not specified then the writeFile callback from the compiler host will be + * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter + * will be invoked when writing the JavaScript and declaration files. + */ + emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken): EmitResult; + getOptionsDiagnostics(cancellationToken?: CancellationToken): Diagnostic[]; + getGlobalDiagnostics(cancellationToken?: CancellationToken): Diagnostic[]; + getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[]; + getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[]; + getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[]; + /** + * Gets a type checker that can be used to semantically analyze source fils in the program. + */ + getTypeChecker(): TypeChecker; + } + interface SourceMapSpan { + /** Line number in the .js file. */ + emittedLine: number; + /** Column number in the .js file. */ + emittedColumn: number; + /** Line number in the .ts file. */ + sourceLine: number; + /** Column number in the .ts file. */ + sourceColumn: number; + /** Optional name (index into names array) associated with this span. */ + nameIndex?: number; + /** .ts file (index into sources array) associated with this span */ + sourceIndex: number; + } + interface SourceMapData { + sourceMapFilePath: string; + jsSourceMappingURL: string; + sourceMapFile: string; + sourceMapSourceRoot: string; + sourceMapSources: string[]; + sourceMapSourcesContent?: string[]; + inputSourceFileNames: string[]; + sourceMapNames?: string[]; + sourceMapMappings: string; + sourceMapDecodedMappings: SourceMapSpan[]; + } + /** Return code used by getEmitOutput function to indicate status of the function */ + enum ExitStatus { + Success = 0, + DiagnosticsPresent_OutputsSkipped = 1, + DiagnosticsPresent_OutputsGenerated = 2, + } + interface EmitResult { + emitSkipped: boolean; + diagnostics: Diagnostic[]; + } + interface TypeChecker { + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; + getDeclaredTypeOfSymbol(symbol: Symbol): Type; + getPropertiesOfType(type: Type): Symbol[]; + getPropertyOfType(type: Type, propertyName: string): Symbol; + getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; + getIndexTypeOfType(type: Type, kind: IndexKind): Type; + getBaseTypes(type: InterfaceType): ObjectType[]; + getReturnTypeOfSignature(signature: Signature): Type; + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; + getSymbolAtLocation(node: Node): Symbol; + getShorthandAssignmentValueSymbol(location: Node): Symbol; + getTypeAtLocation(node: Node): Type; + typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; + symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; + getSymbolDisplayBuilder(): SymbolDisplayBuilder; + getFullyQualifiedName(symbol: Symbol): string; + getAugmentedPropertiesOfType(type: Type): Symbol[]; + getRootSymbols(symbol: Symbol): Symbol[]; + getContextualType(node: Expression): Type; + getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; + getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; + isUndefinedSymbol(symbol: Symbol): boolean; + isArgumentsSymbol(symbol: Symbol): boolean; + getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; + isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; + getAliasedSymbol(symbol: Symbol): Symbol; + getExportsOfModule(moduleSymbol: Symbol): Symbol[]; + getJsxElementAttributesType(elementNode: JsxOpeningLikeElement): Type; + getJsxIntrinsicTagNames(): Symbol[]; + isOptionalParameter(node: ParameterDeclaration): boolean; + } + interface SymbolDisplayBuilder { + buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; + buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; + buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; + } + interface SymbolWriter { + writeKeyword(text: string): void; + writeOperator(text: string): void; + writePunctuation(text: string): void; + writeSpace(text: string): void; + writeStringLiteral(text: string): void; + writeParameter(text: string): void; + writeSymbol(text: string, symbol: Symbol): void; + writeLine(): void; + increaseIndent(): void; + decreaseIndent(): void; + clear(): void; + trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; + } + const enum TypeFormatFlags { + None = 0, + WriteArrayAsGenericType = 1, + UseTypeOfFunction = 2, + NoTruncation = 4, + WriteArrowStyleSignature = 8, + WriteOwnNameForAnyLike = 16, + WriteTypeArgumentsOfSignature = 32, + InElementType = 64, + UseFullyQualifiedType = 128, + } + const enum SymbolFormatFlags { + None = 0, + WriteTypeParametersOrArguments = 1, + UseOnlyExternalAliasing = 2, + } + interface TypePredicate { + parameterName: string; + parameterIndex: number; + type: Type; + } + const enum SymbolFlags { + None = 0, + FunctionScopedVariable = 1, + BlockScopedVariable = 2, + Property = 4, + EnumMember = 8, + Function = 16, + Class = 32, + Interface = 64, + ConstEnum = 128, + RegularEnum = 256, + ValueModule = 512, + NamespaceModule = 1024, + TypeLiteral = 2048, + ObjectLiteral = 4096, + Method = 8192, + Constructor = 16384, + GetAccessor = 32768, + SetAccessor = 65536, + Signature = 131072, + TypeParameter = 262144, + TypeAlias = 524288, + ExportValue = 1048576, + ExportType = 2097152, + ExportNamespace = 4194304, + Alias = 8388608, + Instantiated = 16777216, + Merged = 33554432, + Transient = 67108864, + Prototype = 134217728, + SyntheticProperty = 268435456, + Optional = 536870912, + ExportStar = 1073741824, + Enum = 384, + Variable = 3, + Value = 107455, + Type = 793056, + Namespace = 1536, + Module = 1536, + Accessor = 98304, + FunctionScopedVariableExcludes = 107454, + BlockScopedVariableExcludes = 107455, + ParameterExcludes = 107455, + PropertyExcludes = 107455, + EnumMemberExcludes = 107455, + FunctionExcludes = 106927, + ClassExcludes = 899519, + InterfaceExcludes = 792960, + RegularEnumExcludes = 899327, + ConstEnumExcludes = 899967, + ValueModuleExcludes = 106639, + NamespaceModuleExcludes = 0, + MethodExcludes = 99263, + GetAccessorExcludes = 41919, + SetAccessorExcludes = 74687, + TypeParameterExcludes = 530912, + TypeAliasExcludes = 793056, + AliasExcludes = 8388608, + ModuleMember = 8914931, + ExportHasLocal = 944, + HasExports = 1952, + HasMembers = 6240, + BlockScoped = 418, + PropertyOrAccessor = 98308, + Export = 7340032, + } + interface Symbol { + flags: SymbolFlags; + name: string; + declarations?: Declaration[]; + valueDeclaration?: Declaration; + members?: SymbolTable; + exports?: SymbolTable; + } + interface SymbolTable { + [index: string]: Symbol; + } + const enum TypeFlags { + Any = 1, + String = 2, + Number = 4, + Boolean = 8, + Void = 16, + Undefined = 32, + Null = 64, + Enum = 128, + StringLiteral = 256, + TypeParameter = 512, + Class = 1024, + Interface = 2048, + Reference = 4096, + Tuple = 8192, + Union = 16384, + Intersection = 32768, + Anonymous = 65536, + Instantiated = 131072, + ObjectLiteral = 524288, + ESSymbol = 16777216, + StringLike = 258, + NumberLike = 132, + ObjectType = 80896, + UnionOrIntersection = 49152, + StructuredType = 130048, + } + interface Type { + flags: TypeFlags; + symbol?: Symbol; + } + interface StringLiteralType extends Type { + text: string; + } + interface ObjectType extends Type { + } + interface InterfaceType extends ObjectType { + typeParameters: TypeParameter[]; + outerTypeParameters: TypeParameter[]; + localTypeParameters: TypeParameter[]; + } + interface InterfaceTypeWithDeclaredMembers extends InterfaceType { + declaredProperties: Symbol[]; + declaredCallSignatures: Signature[]; + declaredConstructSignatures: Signature[]; + declaredStringIndexType: Type; + declaredNumberIndexType: Type; + } + interface TypeReference extends ObjectType { + target: GenericType; + typeArguments: Type[]; + } + interface GenericType extends InterfaceType, TypeReference { + } + interface TupleType extends ObjectType { + elementTypes: Type[]; + baseArrayType: TypeReference; + } + interface UnionOrIntersectionType extends Type { + types: Type[]; + } + interface UnionType extends UnionOrIntersectionType { + } + interface IntersectionType extends UnionOrIntersectionType { + } + interface TypeParameter extends Type { + constraint: Type; + } + const enum SignatureKind { + Call = 0, + Construct = 1, + } + interface Signature { + declaration: SignatureDeclaration; + typeParameters: TypeParameter[]; + parameters: Symbol[]; + typePredicate?: TypePredicate; + } + const enum IndexKind { + String = 0, + Number = 1, + } + interface DiagnosticMessage { + key: string; + category: DiagnosticCategory; + code: number; + } + /** + * A linked list of formatted diagnostic messages to be used as part of a multiline message. + * It is built from the bottom up, leaving the head to be the "main" diagnostic. + * While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage, + * the difference is that messages are all preformatted in DMC. + */ + interface DiagnosticMessageChain { + messageText: string; + category: DiagnosticCategory; + code: number; + next?: DiagnosticMessageChain; + } + interface Diagnostic { + file: SourceFile; + start: number; + length: number; + messageText: string | DiagnosticMessageChain; + category: DiagnosticCategory; + code: number; + } + enum DiagnosticCategory { + Warning = 0, + Error = 1, + Message = 2, + } + const enum ModuleResolutionKind { + Classic = 1, + NodeJs = 2, + } + interface CompilerOptions { + allowNonTsExtensions?: boolean; + charset?: string; + declaration?: boolean; + diagnostics?: boolean; + emitBOM?: boolean; + help?: boolean; + init?: boolean; + inlineSourceMap?: boolean; + inlineSources?: boolean; + jsx?: JsxEmit; + listFiles?: boolean; + locale?: string; + mapRoot?: string; + module?: ModuleKind; + newLine?: NewLineKind; + noEmit?: boolean; + noEmitHelpers?: boolean; + noEmitOnError?: boolean; + noErrorTruncation?: boolean; + noImplicitAny?: boolean; + noLib?: boolean; + noResolve?: boolean; + out?: string; + outFile?: string; + outDir?: string; + preserveConstEnums?: boolean; + project?: string; + removeComments?: boolean; + rootDir?: string; + sourceMap?: boolean; + sourceRoot?: string; + suppressExcessPropertyErrors?: boolean; + suppressImplicitAnyIndexErrors?: boolean; + target?: ScriptTarget; + version?: boolean; + watch?: boolean; + isolatedModules?: boolean; + experimentalDecorators?: boolean; + experimentalAsyncFunctions?: boolean; + emitDecoratorMetadata?: boolean; + moduleResolution?: ModuleResolutionKind; + [option: string]: string | number | boolean; + } + const enum ModuleKind { + None = 0, + CommonJS = 1, + AMD = 2, + UMD = 3, + System = 4, + } + const enum JsxEmit { + None = 0, + Preserve = 1, + React = 2, + } + const enum NewLineKind { + CarriageReturnLineFeed = 0, + LineFeed = 1, + } + interface LineAndCharacter { + line: number; + character: number; + } + const enum ScriptTarget { + ES3 = 0, + ES5 = 1, + ES6 = 2, + Latest = 2, + } + const enum LanguageVariant { + Standard = 0, + JSX = 1, + } + interface ParsedCommandLine { + options: CompilerOptions; + fileNames: string[]; + errors: Diagnostic[]; + } + interface ModuleResolutionHost { + fileExists(fileName: string): boolean; + readFile(fileName: string): string; + } + interface ResolvedModule { + resolvedFileName: string; + isExternalLibraryImport?: boolean; + } + interface ResolvedModuleWithFailedLookupLocations { + resolvedModule: ResolvedModule; + failedLookupLocations: string[]; + } + interface CompilerHost extends ModuleResolutionHost { + getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; + getCancellationToken?(): CancellationToken; + getDefaultLibFileName(options: CompilerOptions): string; + writeFile: WriteFileCallback; + getCurrentDirectory(): string; + getCanonicalFileName(fileName: string): string; + useCaseSensitiveFileNames(): boolean; + getNewLine(): string; + resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[]; + } + interface TextSpan { + start: number; + length: number; + } + interface TextChangeRange { + span: TextSpan; + newLength: number; + } +} +declare namespace ts { + interface System { + args: string[]; + newLine: string; + useCaseSensitiveFileNames: boolean; + write(s: string): void; + readFile(path: string, encoding?: string): string; + writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; + watchFile?(path: string, callback: (path: string) => void): FileWatcher; + resolvePath(path: string): string; + fileExists(path: string): boolean; + directoryExists(path: string): boolean; + createDirectory(path: string): void; + getExecutingFilePath(): string; + getCurrentDirectory(): string; + readDirectory(path: string, extension?: string, exclude?: string[]): string[]; + getMemoryUsage?(): number; + exit(exitCode?: number): void; + } + interface FileWatcher { + close(): void; + } + var sys: System; +} +declare namespace ts { + interface ErrorCallback { + (message: DiagnosticMessage, length: number): void; + } + interface Scanner { + getStartPos(): number; + getToken(): SyntaxKind; + getTextPos(): number; + getTokenPos(): number; + getTokenText(): string; + getTokenValue(): string; + hasExtendedUnicodeEscape(): boolean; + hasPrecedingLineBreak(): boolean; + isIdentifier(): boolean; + isReservedWord(): boolean; + isUnterminated(): boolean; + reScanGreaterToken(): SyntaxKind; + reScanSlashToken(): SyntaxKind; + reScanTemplateToken(): SyntaxKind; + scanJsxIdentifier(): SyntaxKind; + reScanJsxToken(): SyntaxKind; + scanJsxToken(): SyntaxKind; + scan(): SyntaxKind; + setText(text: string, start?: number, length?: number): void; + setOnError(onError: ErrorCallback): void; + setScriptTarget(scriptTarget: ScriptTarget): void; + setLanguageVariant(variant: LanguageVariant): void; + setTextPos(textPos: number): void; + lookAhead(callback: () => T): T; + tryScan(callback: () => T): T; + } + function tokenToString(t: SyntaxKind): string; + function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number; + function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter; + function isWhiteSpace(ch: number): boolean; + function isLineBreak(ch: number): boolean; + function couldStartTrivia(text: string, pos: number): boolean; + function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; + function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; + /** Optionally, get the shebang */ + function getShebang(text: string): string; + function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; + function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, text?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner; +} +declare namespace ts { + function getDefaultLibFileName(options: CompilerOptions): string; + function textSpanEnd(span: TextSpan): number; + function textSpanIsEmpty(span: TextSpan): boolean; + function textSpanContainsPosition(span: TextSpan, position: number): boolean; + function textSpanContainsTextSpan(span: TextSpan, other: TextSpan): boolean; + function textSpanOverlapsWith(span: TextSpan, other: TextSpan): boolean; + function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan; + function textSpanIntersectsWithTextSpan(span: TextSpan, other: TextSpan): boolean; + function textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean; + function decodedTextSpanIntersectsWith(start1: number, length1: number, start2: number, length2: number): boolean; + function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean; + function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan; + function createTextSpan(start: number, length: number): TextSpan; + function createTextSpanFromBounds(start: number, end: number): TextSpan; + function textChangeRangeNewSpan(range: TextChangeRange): TextSpan; + function textChangeRangeIsUnchanged(range: TextChangeRange): boolean; + function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange; + let unchangedTextChangeRange: TextChangeRange; + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; + function getTypeParameterOwner(d: Declaration): Declaration; +} +declare namespace ts { + function getNodeConstructor(kind: SyntaxKind): new () => Node; + function createNode(kind: SyntaxKind): Node; + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T; + function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; + function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; +} +declare namespace ts { + const version: string; + function findConfigFile(searchPath: string): string; + function resolveTripleslashReference(moduleName: string, containingFile: string): string; + function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations; + function nodeModuleNameResolver(moduleName: string, containingFile: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations; + function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations; + function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; + function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[]; + function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; + function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program): Program; +} +declare namespace ts { + function parseCommandLine(commandLine: string[], readFile?: (path: string) => string): ParsedCommandLine; + /** + * Read tsconfig.json file + * @param fileName The path to the config file + */ + function readConfigFile(fileName: string): { + config?: any; + error?: Diagnostic; + }; + /** + * Parse the text of the tsconfig.json file + * @param fileName The path to the config file + * @param jsonText The text of the config file + */ + function parseConfigFileText(fileName: string, jsonText: string): { + config?: any; + error?: Diagnostic; + }; + /** + * Parse the contents of a config file (tsconfig.json). + * @param json The contents of the config file to parse + * @param basePath A root directory to resolve relative path entries in the config + * file to. e.g. outDir + */ + function parseConfigFile(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine; +} +declare namespace ts { + /** The version of the language service API */ + let servicesVersion: string; + interface Node { + getSourceFile(): SourceFile; + getChildCount(sourceFile?: SourceFile): number; + getChildAt(index: number, sourceFile?: SourceFile): Node; + getChildren(sourceFile?: SourceFile): Node[]; + getStart(sourceFile?: SourceFile): number; + getFullStart(): number; + getEnd(): number; + getWidth(sourceFile?: SourceFile): number; + getFullWidth(): number; + getLeadingTriviaWidth(sourceFile?: SourceFile): number; + getFullText(sourceFile?: SourceFile): string; + getText(sourceFile?: SourceFile): string; + getFirstToken(sourceFile?: SourceFile): Node; + getLastToken(sourceFile?: SourceFile): Node; + } + interface Symbol { + getFlags(): SymbolFlags; + getName(): string; + getDeclarations(): Declaration[]; + getDocumentationComment(): SymbolDisplayPart[]; + } + interface Type { + getFlags(): TypeFlags; + getSymbol(): Symbol; + getProperties(): Symbol[]; + getProperty(propertyName: string): Symbol; + getApparentProperties(): Symbol[]; + getCallSignatures(): Signature[]; + getConstructSignatures(): Signature[]; + getStringIndexType(): Type; + getNumberIndexType(): Type; + getBaseTypes(): ObjectType[]; + } + interface Signature { + getDeclaration(): SignatureDeclaration; + getTypeParameters(): Type[]; + getParameters(): Symbol[]; + getReturnType(): Type; + getDocumentationComment(): SymbolDisplayPart[]; + } + interface SourceFile { + getLineAndCharacterOfPosition(pos: number): LineAndCharacter; + getLineStarts(): number[]; + getPositionOfLineAndCharacter(line: number, character: number): number; + update(newText: string, textChangeRange: TextChangeRange): SourceFile; + } + /** + * Represents an immutable snapshot of a script at a specified time.Once acquired, the + * snapshot is observably immutable. i.e. the same calls with the same parameters will return + * the same values. + */ + interface IScriptSnapshot { + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; + /** Gets the length of this script snapshot. */ + getLength(): number; + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; + /** Releases all resources held by this script snapshot */ + dispose?(): void; + } + module ScriptSnapshot { + function fromString(text: string): IScriptSnapshot; + } + interface PreProcessedFileInfo { + referencedFiles: FileReference[]; + importedFiles: FileReference[]; + ambientExternalModules: string[]; + isLibFile: boolean; + } + interface HostCancellationToken { + isCancellationRequested(): boolean; + } + interface LanguageServiceHost { + getCompilationSettings(): CompilerOptions; + getNewLine?(): string; + getProjectVersion?(): string; + getScriptFileNames(): string[]; + getScriptVersion(fileName: string): string; + getScriptSnapshot(fileName: string): IScriptSnapshot; + getLocalizedDiagnosticMessages?(): any; + getCancellationToken?(): HostCancellationToken; + getCurrentDirectory(): string; + getDefaultLibFileName(options: CompilerOptions): string; + log?(s: string): void; + trace?(s: string): void; + error?(s: string): void; + useCaseSensitiveFileNames?(): boolean; + resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[]; + } + interface LanguageService { + cleanupSemanticCache(): void; + getSyntacticDiagnostics(fileName: string): Diagnostic[]; + getSemanticDiagnostics(fileName: string): Diagnostic[]; + getCompilerOptionsDiagnostics(): Diagnostic[]; + /** + * @deprecated Use getEncodedSyntacticClassifications instead. + */ + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + /** + * @deprecated Use getEncodedSemanticClassifications instead. + */ + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications; + getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications; + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; + getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; + getRenameInfo(fileName: string, position: number): RenameInfo; + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; + getTypeDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + findReferences(fileName: string, position: number): ReferencedSymbol[]; + getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[]; + /** @deprecated */ + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + getNavigateToItems(searchValue: string, maxResultCount?: number): NavigateToItem[]; + getNavigationBarItems(fileName: string): NavigationBarItem[]; + getOutliningSpans(fileName: string): OutliningSpan[]; + getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; + getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; + getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; + getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion; + getEmitOutput(fileName: string): EmitOutput; + getProgram(): Program; + getSourceFile(fileName: string): SourceFile; + dispose(): void; + } + interface Classifications { + spans: number[]; + endOfLineState: EndOfLineState; + } + interface ClassifiedSpan { + textSpan: TextSpan; + classificationType: string; + } + interface NavigationBarItem { + text: string; + kind: string; + kindModifiers: string; + spans: TextSpan[]; + childItems: NavigationBarItem[]; + indent: number; + bolded: boolean; + grayed: boolean; + } + interface TodoCommentDescriptor { + text: string; + priority: number; + } + interface TodoComment { + descriptor: TodoCommentDescriptor; + message: string; + position: number; + } + class TextChange { + span: TextSpan; + newText: string; + } + interface TextInsertion { + newText: string; + /** The position in newText the caret should point to after the insertion. */ + caretOffset: number; + } + interface RenameLocation { + textSpan: TextSpan; + fileName: string; + } + interface ReferenceEntry { + textSpan: TextSpan; + fileName: string; + isWriteAccess: boolean; + } + interface DocumentHighlights { + fileName: string; + highlightSpans: HighlightSpan[]; + } + module HighlightSpanKind { + const none: string; + const definition: string; + const reference: string; + const writtenReference: string; + } + interface HighlightSpan { + fileName?: string; + textSpan: TextSpan; + kind: string; + } + interface NavigateToItem { + name: string; + kind: string; + kindModifiers: string; + matchKind: string; + isCaseSensitive: boolean; + fileName: string; + textSpan: TextSpan; + containerName: string; + containerKind: string; + } + interface EditorOptions { + IndentSize: number; + TabSize: number; + NewLineCharacter: string; + ConvertTabsToSpaces: boolean; + } + interface FormatCodeOptions extends EditorOptions { + InsertSpaceAfterCommaDelimiter: boolean; + InsertSpaceAfterSemicolonInForStatements: boolean; + InsertSpaceBeforeAndAfterBinaryOperators: boolean; + InsertSpaceAfterKeywordsInControlFlowStatements: boolean; + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; + InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean; + PlaceOpenBraceOnNewLineForFunctions: boolean; + PlaceOpenBraceOnNewLineForControlBlocks: boolean; + [s: string]: boolean | number | string; + } + interface DefinitionInfo { + fileName: string; + textSpan: TextSpan; + kind: string; + name: string; + containerKind: string; + containerName: string; + } + interface ReferencedSymbol { + definition: DefinitionInfo; + references: ReferenceEntry[]; + } + enum SymbolDisplayPartKind { + aliasName = 0, + className = 1, + enumName = 2, + fieldName = 3, + interfaceName = 4, + keyword = 5, + lineBreak = 6, + numericLiteral = 7, + stringLiteral = 8, + localName = 9, + methodName = 10, + moduleName = 11, + operator = 12, + parameterName = 13, + propertyName = 14, + punctuation = 15, + space = 16, + text = 17, + typeParameterName = 18, + enumMemberName = 19, + functionName = 20, + regularExpressionLiteral = 21, + } + interface SymbolDisplayPart { + text: string; + kind: string; + } + interface QuickInfo { + kind: string; + kindModifiers: string; + textSpan: TextSpan; + displayParts: SymbolDisplayPart[]; + documentation: SymbolDisplayPart[]; + } + interface RenameInfo { + canRename: boolean; + localizedErrorMessage: string; + displayName: string; + fullDisplayName: string; + kind: string; + kindModifiers: string; + triggerSpan: TextSpan; + } + interface SignatureHelpParameter { + name: string; + documentation: SymbolDisplayPart[]; + displayParts: SymbolDisplayPart[]; + isOptional: boolean; + } + /** + * Represents a single signature to show in signature help. + * The id is used for subsequent calls into the language service to ask questions about the + * signature help item in the context of any documents that have been updated. i.e. after + * an edit has happened, while signature help is still active, the host can ask important + * questions like 'what parameter is the user currently contained within?'. + */ + interface SignatureHelpItem { + isVariadic: boolean; + prefixDisplayParts: SymbolDisplayPart[]; + suffixDisplayParts: SymbolDisplayPart[]; + separatorDisplayParts: SymbolDisplayPart[]; + parameters: SignatureHelpParameter[]; + documentation: SymbolDisplayPart[]; + } + /** + * Represents a set of signature help items, and the preferred item that should be selected. + */ + interface SignatureHelpItems { + items: SignatureHelpItem[]; + applicableSpan: TextSpan; + selectedItemIndex: number; + argumentIndex: number; + argumentCount: number; + } + interface CompletionInfo { + isMemberCompletion: boolean; + isNewIdentifierLocation: boolean; + entries: CompletionEntry[]; + } + interface CompletionEntry { + name: string; + kind: string; + kindModifiers: string; + sortText: string; + } + interface CompletionEntryDetails { + name: string; + kind: string; + kindModifiers: string; + displayParts: SymbolDisplayPart[]; + documentation: SymbolDisplayPart[]; + } + interface OutliningSpan { + /** The span of the document to actually collapse. */ + textSpan: TextSpan; + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; + /** The text to display in the editor for the collapsed region. */ + bannerText: string; + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; + } + interface EmitOutput { + outputFiles: OutputFile[]; + emitSkipped: boolean; + } + const enum OutputFileType { + JavaScript = 0, + SourceMap = 1, + Declaration = 2, + } + interface OutputFile { + name: string; + writeByteOrderMark: boolean; + text: string; + } + const enum EndOfLineState { + None = 0, + InMultiLineCommentTrivia = 1, + InSingleQuoteStringLiteral = 2, + InDoubleQuoteStringLiteral = 3, + InTemplateHeadOrNoSubstitutionTemplate = 4, + InTemplateMiddleOrTail = 5, + InTemplateSubstitutionPosition = 6, + } + enum TokenClass { + Punctuation = 0, + Keyword = 1, + Operator = 2, + Comment = 3, + Whitespace = 4, + Identifier = 5, + NumberLiteral = 6, + StringLiteral = 7, + RegExpLiteral = 8, + } + interface ClassificationResult { + finalLexState: EndOfLineState; + entries: ClassificationInfo[]; + } + interface ClassificationInfo { + length: number; + classification: TokenClass; + } + interface Classifier { + /** + * Gives lexical classifications of tokens on a line without any syntactic context. + * For instance, a token consisting of the text 'string' can be either an identifier + * named 'string' or the keyword 'string', however, because this classifier is not aware, + * it relies on certain heuristics to give acceptable results. For classifications where + * speed trumps accuracy, this function is preferable; however, for true accuracy, the + * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the + * lexical, syntactic, and semantic classifiers may issue the best user experience. + * + * @param text The text of a line to classify. + * @param lexState The state of the lexical classifier at the end of the previous line. + * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier. + * If there is no syntactic classifier (syntacticClassifierAbsent=true), + * certain heuristics may be used in its place; however, if there is a + * syntactic classifier (syntacticClassifierAbsent=false), certain + * classifications which may be incorrectly categorized will be given + * back as Identifiers in order to allow the syntactic classifier to + * subsume the classification. + * @deprecated Use getLexicalClassifications instead. + */ + getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult; + getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications; + } + /** + * The document registry represents a store of SourceFile objects that can be shared between + * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST) + * of files in the context. + * SourceFile objects account for most of the memory usage by the language service. Sharing + * the same DocumentRegistry instance between different instances of LanguageService allow + * for more efficient memory utilization since all projects will share at least the library + * file (lib.d.ts). + * + * A more advanced use of the document registry is to serialize sourceFile objects to disk + * and re-hydrate them when needed. + * + * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it + * to all subsequent createLanguageService calls. + */ + interface DocumentRegistry { + /** + * Request a stored SourceFile with a given fileName and compilationSettings. + * The first call to acquire will call createLanguageServiceSourceFile to generate + * the SourceFile if was not found in the registry. + * + * @param fileName The name of the file requested + * @param compilationSettings Some compilation settings like target affects the + * shape of a the resulting SourceFile. This allows the DocumentRegistry to store + * multiple copies of the same file for different compilation settings. + * @parm scriptSnapshot Text of the file. Only used if the file was not found + * in the registry and a new one was created. + * @parm version Current version of the file. Only used if the file was not found + * in the registry and a new one was created. + */ + acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; + /** + * Request an updated version of an already existing SourceFile with a given fileName + * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile + * to get an updated SourceFile. + * + * @param fileName The name of the file requested + * @param compilationSettings Some compilation settings like target affects the + * shape of a the resulting SourceFile. This allows the DocumentRegistry to store + * multiple copies of the same file for different compilation settings. + * @param scriptSnapshot Text of the file. + * @param version Current version of the file. + */ + updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; + /** + * Informs the DocumentRegistry that a file is not needed any longer. + * + * Note: It is not allowed to call release on a SourceFile that was not acquired from + * this registry originally. + * + * @param fileName The name of the file to be released + * @param compilationSettings The compilation settings used to acquire the file + */ + releaseDocument(fileName: string, compilationSettings: CompilerOptions): void; + reportStats(): string; + } + module ScriptElementKind { + const unknown: string; + const warning: string; + const keyword: string; + const scriptElement: string; + const moduleElement: string; + const classElement: string; + const localClassElement: string; + const interfaceElement: string; + const typeElement: string; + const enumElement: string; + const variableElement: string; + const localVariableElement: string; + const functionElement: string; + const localFunctionElement: string; + const memberFunctionElement: string; + const memberGetAccessorElement: string; + const memberSetAccessorElement: string; + const memberVariableElement: string; + const constructorImplementationElement: string; + const callSignatureElement: string; + const indexSignatureElement: string; + const constructSignatureElement: string; + const parameterElement: string; + const typeParameterElement: string; + const primitiveType: string; + const label: string; + const alias: string; + const constElement: string; + const letElement: string; + } + module ScriptElementKindModifier { + const none: string; + const publicMemberModifier: string; + const privateMemberModifier: string; + const protectedMemberModifier: string; + const exportedModifier: string; + const ambientModifier: string; + const staticModifier: string; + const abstractModifier: string; + } + class ClassificationTypeNames { + static comment: string; + static identifier: string; + static keyword: string; + static numericLiteral: string; + static operator: string; + static stringLiteral: string; + static whiteSpace: string; + static text: string; + static punctuation: string; + static className: string; + static enumName: string; + static interfaceName: string; + static moduleName: string; + static typeParameterName: string; + static typeAliasName: string; + static parameterName: string; + static docCommentTagName: string; + } + const enum ClassificationType { + comment = 1, + identifier = 2, + keyword = 3, + numericLiteral = 4, + operator = 5, + stringLiteral = 6, + regularExpressionLiteral = 7, + whiteSpace = 8, + text = 9, + punctuation = 10, + className = 11, + enumName = 12, + interfaceName = 13, + moduleName = 14, + typeParameterName = 15, + typeAliasName = 16, + parameterName = 17, + docCommentTagName = 18, + } + interface DisplayPartsSymbolWriter extends SymbolWriter { + displayParts(): SymbolDisplayPart[]; + } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; + function getDefaultCompilerOptions(): CompilerOptions; + interface TranspileOptions { + compilerOptions?: CompilerOptions; + fileName?: string; + reportDiagnostics?: boolean; + moduleName?: string; + renamedDependencies?: Map; + } + interface TranspileOutput { + outputText: string; + diagnostics?: Diagnostic[]; + sourceMapText?: string; + } + function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput; + function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string; + function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; + let disableIncrementalParsing: boolean; + function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; + function createGetCanonicalFileName(useCaseSensitivefileNames: boolean): (fileName: string) => string; + function createDocumentRegistry(useCaseSensitiveFileNames?: boolean): DocumentRegistry; + function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; + function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; + function createClassifier(): Classifier; + /** + * Get the path of the default library files (lib.d.ts) as distributed with the typescript + * node package. + * The functionality is not supported if the ts module is consumed outside of a node module. + */ + function getDefaultLibFilePath(options: CompilerOptions): string; +} diff --git a/typescript/typescript.d.ts b/typescript/typescript.d.ts index 1139c4648..8078c6de2 100644 --- a/typescript/typescript.d.ts +++ b/typescript/typescript.d.ts @@ -22,6 +22,14 @@ declare module "typescript" { interface Map { [index: string]: T; } + interface FileMap { + get(fileName: string): T; + set(fileName: string, value: T): void; + contains(fileName: string): boolean; + remove(fileName: string): void; + forEachValue(f: (v: T) => void): void; + clear(): void; + } interface TextRange { pos: number; end: number; @@ -33,230 +41,294 @@ declare module "typescript" { MultiLineCommentTrivia = 3, NewLineTrivia = 4, WhitespaceTrivia = 5, - NumericLiteral = 6, - StringLiteral = 7, - RegularExpressionLiteral = 8, - NoSubstitutionTemplateLiteral = 9, - TemplateHead = 10, - TemplateMiddle = 11, - TemplateTail = 12, - OpenBraceToken = 13, - CloseBraceToken = 14, - OpenParenToken = 15, - CloseParenToken = 16, - OpenBracketToken = 17, - CloseBracketToken = 18, - DotToken = 19, - DotDotDotToken = 20, - SemicolonToken = 21, - CommaToken = 22, - LessThanToken = 23, - GreaterThanToken = 24, - LessThanEqualsToken = 25, - GreaterThanEqualsToken = 26, - EqualsEqualsToken = 27, - ExclamationEqualsToken = 28, - EqualsEqualsEqualsToken = 29, - ExclamationEqualsEqualsToken = 30, - EqualsGreaterThanToken = 31, - PlusToken = 32, - MinusToken = 33, - AsteriskToken = 34, - SlashToken = 35, - PercentToken = 36, - PlusPlusToken = 37, - MinusMinusToken = 38, - LessThanLessThanToken = 39, - GreaterThanGreaterThanToken = 40, - GreaterThanGreaterThanGreaterThanToken = 41, - AmpersandToken = 42, - BarToken = 43, - CaretToken = 44, - ExclamationToken = 45, - TildeToken = 46, - AmpersandAmpersandToken = 47, - BarBarToken = 48, - QuestionToken = 49, - ColonToken = 50, - EqualsToken = 51, - PlusEqualsToken = 52, - MinusEqualsToken = 53, - AsteriskEqualsToken = 54, - SlashEqualsToken = 55, - PercentEqualsToken = 56, - LessThanLessThanEqualsToken = 57, - GreaterThanGreaterThanEqualsToken = 58, - GreaterThanGreaterThanGreaterThanEqualsToken = 59, - AmpersandEqualsToken = 60, - BarEqualsToken = 61, - CaretEqualsToken = 62, - Identifier = 63, - BreakKeyword = 64, - CaseKeyword = 65, - CatchKeyword = 66, - ClassKeyword = 67, - ConstKeyword = 68, - ContinueKeyword = 69, - DebuggerKeyword = 70, - DefaultKeyword = 71, - DeleteKeyword = 72, - DoKeyword = 73, - ElseKeyword = 74, - EnumKeyword = 75, - ExportKeyword = 76, - ExtendsKeyword = 77, - FalseKeyword = 78, - FinallyKeyword = 79, - ForKeyword = 80, - FunctionKeyword = 81, - IfKeyword = 82, - ImportKeyword = 83, - InKeyword = 84, - InstanceOfKeyword = 85, - NewKeyword = 86, - NullKeyword = 87, - ReturnKeyword = 88, - SuperKeyword = 89, - SwitchKeyword = 90, - ThisKeyword = 91, - ThrowKeyword = 92, - TrueKeyword = 93, - TryKeyword = 94, - TypeOfKeyword = 95, - VarKeyword = 96, - VoidKeyword = 97, - WhileKeyword = 98, - WithKeyword = 99, - ImplementsKeyword = 100, - InterfaceKeyword = 101, - LetKeyword = 102, - PackageKeyword = 103, - PrivateKeyword = 104, - ProtectedKeyword = 105, - PublicKeyword = 106, - StaticKeyword = 107, - YieldKeyword = 108, - AnyKeyword = 109, - BooleanKeyword = 110, - ConstructorKeyword = 111, - DeclareKeyword = 112, - GetKeyword = 113, - ModuleKeyword = 114, - RequireKeyword = 115, - NumberKeyword = 116, - SetKeyword = 117, - StringKeyword = 118, - TypeKeyword = 119, - QualifiedName = 120, - ComputedPropertyName = 121, - TypeParameter = 122, - Parameter = 123, - Property = 124, - Method = 125, - Constructor = 126, - GetAccessor = 127, - SetAccessor = 128, - CallSignature = 129, - ConstructSignature = 130, - IndexSignature = 131, - TypeReference = 132, - FunctionType = 133, - ConstructorType = 134, - TypeQuery = 135, - TypeLiteral = 136, - ArrayType = 137, - TupleType = 138, - UnionType = 139, - ParenthesizedType = 140, - ArrayLiteralExpression = 141, - ObjectLiteralExpression = 142, - PropertyAccessExpression = 143, - ElementAccessExpression = 144, - CallExpression = 145, - NewExpression = 146, - TaggedTemplateExpression = 147, - TypeAssertionExpression = 148, - ParenthesizedExpression = 149, - FunctionExpression = 150, - ArrowFunction = 151, - DeleteExpression = 152, - TypeOfExpression = 153, - VoidExpression = 154, - PrefixUnaryExpression = 155, - PostfixUnaryExpression = 156, - BinaryExpression = 157, - ConditionalExpression = 158, - TemplateExpression = 159, - YieldExpression = 160, - OmittedExpression = 161, - TemplateSpan = 162, - Block = 163, - VariableStatement = 164, - EmptyStatement = 165, - ExpressionStatement = 166, - IfStatement = 167, - DoStatement = 168, - WhileStatement = 169, - ForStatement = 170, - ForInStatement = 171, - ContinueStatement = 172, - BreakStatement = 173, - ReturnStatement = 174, - WithStatement = 175, - SwitchStatement = 176, - LabeledStatement = 177, - ThrowStatement = 178, - TryStatement = 179, - TryBlock = 180, - FinallyBlock = 181, - DebuggerStatement = 182, - VariableDeclaration = 183, - FunctionDeclaration = 184, - ClassDeclaration = 185, - InterfaceDeclaration = 186, - TypeAliasDeclaration = 187, - EnumDeclaration = 188, - ModuleDeclaration = 189, - ModuleBlock = 190, - ImportDeclaration = 191, - ExportAssignment = 192, - ExternalModuleReference = 193, - CaseClause = 194, - DefaultClause = 195, - HeritageClause = 196, - CatchClause = 197, - PropertyAssignment = 198, - ShorthandPropertyAssignment = 199, - EnumMember = 200, - SourceFile = 201, - Program = 202, - SyntaxList = 203, - Count = 204, - FirstAssignment = 51, - LastAssignment = 62, - FirstReservedWord = 64, - LastReservedWord = 99, - FirstKeyword = 64, - LastKeyword = 119, - FirstFutureReservedWord = 100, - LastFutureReservedWord = 108, - FirstTypeNode = 132, - LastTypeNode = 140, - FirstPunctuation = 13, - LastPunctuation = 62, + ShebangTrivia = 6, + ConflictMarkerTrivia = 7, + NumericLiteral = 8, + StringLiteral = 9, + RegularExpressionLiteral = 10, + NoSubstitutionTemplateLiteral = 11, + TemplateHead = 12, + TemplateMiddle = 13, + TemplateTail = 14, + OpenBraceToken = 15, + CloseBraceToken = 16, + OpenParenToken = 17, + CloseParenToken = 18, + OpenBracketToken = 19, + CloseBracketToken = 20, + DotToken = 21, + DotDotDotToken = 22, + SemicolonToken = 23, + CommaToken = 24, + LessThanToken = 25, + LessThanSlashToken = 26, + GreaterThanToken = 27, + LessThanEqualsToken = 28, + GreaterThanEqualsToken = 29, + EqualsEqualsToken = 30, + ExclamationEqualsToken = 31, + EqualsEqualsEqualsToken = 32, + ExclamationEqualsEqualsToken = 33, + EqualsGreaterThanToken = 34, + PlusToken = 35, + MinusToken = 36, + AsteriskToken = 37, + SlashToken = 38, + PercentToken = 39, + PlusPlusToken = 40, + MinusMinusToken = 41, + LessThanLessThanToken = 42, + GreaterThanGreaterThanToken = 43, + GreaterThanGreaterThanGreaterThanToken = 44, + AmpersandToken = 45, + BarToken = 46, + CaretToken = 47, + ExclamationToken = 48, + TildeToken = 49, + AmpersandAmpersandToken = 50, + BarBarToken = 51, + QuestionToken = 52, + ColonToken = 53, + AtToken = 54, + EqualsToken = 55, + PlusEqualsToken = 56, + MinusEqualsToken = 57, + AsteriskEqualsToken = 58, + SlashEqualsToken = 59, + PercentEqualsToken = 60, + LessThanLessThanEqualsToken = 61, + GreaterThanGreaterThanEqualsToken = 62, + GreaterThanGreaterThanGreaterThanEqualsToken = 63, + AmpersandEqualsToken = 64, + BarEqualsToken = 65, + CaretEqualsToken = 66, + Identifier = 67, + BreakKeyword = 68, + CaseKeyword = 69, + CatchKeyword = 70, + ClassKeyword = 71, + ConstKeyword = 72, + ContinueKeyword = 73, + DebuggerKeyword = 74, + DefaultKeyword = 75, + DeleteKeyword = 76, + DoKeyword = 77, + ElseKeyword = 78, + EnumKeyword = 79, + ExportKeyword = 80, + ExtendsKeyword = 81, + FalseKeyword = 82, + FinallyKeyword = 83, + ForKeyword = 84, + FunctionKeyword = 85, + IfKeyword = 86, + ImportKeyword = 87, + InKeyword = 88, + InstanceOfKeyword = 89, + NewKeyword = 90, + NullKeyword = 91, + ReturnKeyword = 92, + SuperKeyword = 93, + SwitchKeyword = 94, + ThisKeyword = 95, + ThrowKeyword = 96, + TrueKeyword = 97, + TryKeyword = 98, + TypeOfKeyword = 99, + VarKeyword = 100, + VoidKeyword = 101, + WhileKeyword = 102, + WithKeyword = 103, + ImplementsKeyword = 104, + InterfaceKeyword = 105, + LetKeyword = 106, + PackageKeyword = 107, + PrivateKeyword = 108, + ProtectedKeyword = 109, + PublicKeyword = 110, + StaticKeyword = 111, + YieldKeyword = 112, + AbstractKeyword = 113, + AsKeyword = 114, + AnyKeyword = 115, + AsyncKeyword = 116, + AwaitKeyword = 117, + BooleanKeyword = 118, + ConstructorKeyword = 119, + DeclareKeyword = 120, + GetKeyword = 121, + IsKeyword = 122, + ModuleKeyword = 123, + NamespaceKeyword = 124, + RequireKeyword = 125, + NumberKeyword = 126, + SetKeyword = 127, + StringKeyword = 128, + SymbolKeyword = 129, + TypeKeyword = 130, + FromKeyword = 131, + OfKeyword = 132, + QualifiedName = 133, + ComputedPropertyName = 134, + TypeParameter = 135, + Parameter = 136, + Decorator = 137, + PropertySignature = 138, + PropertyDeclaration = 139, + MethodSignature = 140, + MethodDeclaration = 141, + Constructor = 142, + GetAccessor = 143, + SetAccessor = 144, + CallSignature = 145, + ConstructSignature = 146, + IndexSignature = 147, + TypePredicate = 148, + TypeReference = 149, + FunctionType = 150, + ConstructorType = 151, + TypeQuery = 152, + TypeLiteral = 153, + ArrayType = 154, + TupleType = 155, + UnionType = 156, + IntersectionType = 157, + ParenthesizedType = 158, + ObjectBindingPattern = 159, + ArrayBindingPattern = 160, + BindingElement = 161, + ArrayLiteralExpression = 162, + ObjectLiteralExpression = 163, + PropertyAccessExpression = 164, + ElementAccessExpression = 165, + CallExpression = 166, + NewExpression = 167, + TaggedTemplateExpression = 168, + TypeAssertionExpression = 169, + ParenthesizedExpression = 170, + FunctionExpression = 171, + ArrowFunction = 172, + DeleteExpression = 173, + TypeOfExpression = 174, + VoidExpression = 175, + AwaitExpression = 176, + PrefixUnaryExpression = 177, + PostfixUnaryExpression = 178, + BinaryExpression = 179, + ConditionalExpression = 180, + TemplateExpression = 181, + YieldExpression = 182, + SpreadElementExpression = 183, + ClassExpression = 184, + OmittedExpression = 185, + ExpressionWithTypeArguments = 186, + AsExpression = 187, + TemplateSpan = 188, + SemicolonClassElement = 189, + Block = 190, + VariableStatement = 191, + EmptyStatement = 192, + ExpressionStatement = 193, + IfStatement = 194, + DoStatement = 195, + WhileStatement = 196, + ForStatement = 197, + ForInStatement = 198, + ForOfStatement = 199, + ContinueStatement = 200, + BreakStatement = 201, + ReturnStatement = 202, + WithStatement = 203, + SwitchStatement = 204, + LabeledStatement = 205, + ThrowStatement = 206, + TryStatement = 207, + DebuggerStatement = 208, + VariableDeclaration = 209, + VariableDeclarationList = 210, + FunctionDeclaration = 211, + ClassDeclaration = 212, + InterfaceDeclaration = 213, + TypeAliasDeclaration = 214, + EnumDeclaration = 215, + ModuleDeclaration = 216, + ModuleBlock = 217, + CaseBlock = 218, + ImportEqualsDeclaration = 219, + ImportDeclaration = 220, + ImportClause = 221, + NamespaceImport = 222, + NamedImports = 223, + ImportSpecifier = 224, + ExportAssignment = 225, + ExportDeclaration = 226, + NamedExports = 227, + ExportSpecifier = 228, + MissingDeclaration = 229, + ExternalModuleReference = 230, + JsxElement = 231, + JsxSelfClosingElement = 232, + JsxOpeningElement = 233, + JsxText = 234, + JsxClosingElement = 235, + JsxAttribute = 236, + JsxSpreadAttribute = 237, + JsxExpression = 238, + CaseClause = 239, + DefaultClause = 240, + HeritageClause = 241, + CatchClause = 242, + PropertyAssignment = 243, + ShorthandPropertyAssignment = 244, + EnumMember = 245, + SourceFile = 246, + JSDocTypeExpression = 247, + JSDocAllType = 248, + JSDocUnknownType = 249, + JSDocArrayType = 250, + JSDocUnionType = 251, + JSDocTupleType = 252, + JSDocNullableType = 253, + JSDocNonNullableType = 254, + JSDocRecordType = 255, + JSDocRecordMember = 256, + JSDocTypeReference = 257, + JSDocOptionalType = 258, + JSDocFunctionType = 259, + JSDocVariadicType = 260, + JSDocConstructorType = 261, + JSDocThisType = 262, + JSDocComment = 263, + JSDocTag = 264, + JSDocParameterTag = 265, + JSDocReturnTag = 266, + JSDocTypeTag = 267, + JSDocTemplateTag = 268, + SyntaxList = 269, + Count = 270, + FirstAssignment = 55, + LastAssignment = 66, + FirstReservedWord = 68, + LastReservedWord = 103, + FirstKeyword = 68, + LastKeyword = 132, + FirstFutureReservedWord = 104, + LastFutureReservedWord = 112, + FirstTypeNode = 149, + LastTypeNode = 158, + FirstPunctuation = 15, + LastPunctuation = 66, FirstToken = 0, - LastToken = 119, + LastToken = 132, FirstTriviaToken = 2, - LastTriviaToken = 5, - FirstLiteralToken = 6, - LastLiteralToken = 9, - FirstTemplateToken = 9, - LastTemplateToken = 12, - FirstOperator = 21, - LastOperator = 62, - FirstBinaryOperator = 23, - LastBinaryOperator = 62, - FirstNode = 120, + LastTriviaToken = 7, + FirstLiteralToken = 8, + LastLiteralToken = 11, + FirstTemplateToken = 11, + LastTemplateToken = 14, + FirstBinaryOperator = 25, + LastBinaryOperator = 66, + FirstNode = 133, } const enum NodeFlags { Export = 1, @@ -265,35 +337,35 @@ declare module "typescript" { Private = 32, Protected = 64, Static = 128, - MultiLine = 256, - Synthetic = 512, - DeclarationFile = 1024, - Let = 2048, - Const = 4096, - OctalLiteral = 8192, - Modifier = 243, + Abstract = 256, + Async = 512, + Default = 1024, + MultiLine = 2048, + Synthetic = 4096, + DeclarationFile = 8192, + Let = 16384, + Const = 32768, + OctalLiteral = 65536, + Namespace = 131072, + ExportContext = 262144, + Modifier = 2035, AccessibilityModifier = 112, - BlockScoped = 6144, + BlockScoped = 49152, } - const enum ParserContextFlags { - StrictMode = 1, - DisallowIn = 2, - Yield = 4, - GeneratorParameter = 8, - ContainsError = 16, - HasPropagatedChildContainsErrorFlag = 32, + const enum JsxFlags { + None = 0, + IntrinsicNamedElement = 1, + IntrinsicIndexedElement = 2, + ClassElement = 4, + UnknownElement = 8, + IntrinsicElement = 3, } interface Node extends TextRange { kind: SyntaxKind; flags: NodeFlags; - parserContextFlags?: ParserContextFlags; - id?: number; - parent?: Node; - symbol?: Symbol; - locals?: SymbolTable; - nextContainer?: Node; - localSymbol?: Symbol; + decorators?: NodeArray; modifiers?: ModifiersArray; + parent?: Node; } interface NodeArray extends Array, TextRange { hasTrailingComma?: boolean; @@ -303,13 +375,14 @@ declare module "typescript" { } interface Identifier extends PrimaryExpression { text: string; + originalKeywordKind?: SyntaxKind; } interface QualifiedName extends Node { left: EntityName; right: Identifier; } type EntityName = Identifier | QualifiedName; - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName; + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern; interface Declaration extends Node { _declarationBrand: any; name?: DeclarationName; @@ -317,6 +390,9 @@ declare module "typescript" { interface ComputedPropertyName extends Node { expression: Expression; } + interface Decorator extends Node { + expression: LeftHandSideExpression; + } interface TypeParameterDeclaration extends Declaration { name: Identifier; constraint?: TypeNode; @@ -328,45 +404,64 @@ declare module "typescript" { type?: TypeNode; } interface VariableDeclaration extends Declaration { - name: Identifier; + parent?: VariableDeclarationList; + name: Identifier | BindingPattern; type?: TypeNode; initializer?: Expression; } + interface VariableDeclarationList extends Node { + declarations: NodeArray; + } interface ParameterDeclaration extends Declaration { dotDotDotToken?: Node; - name: Identifier; + name: Identifier | BindingPattern; questionToken?: Node; - type?: TypeNode | StringLiteralExpression; + type?: TypeNode; initializer?: Expression; } + interface BindingElement extends Declaration { + propertyName?: Identifier; + dotDotDotToken?: Node; + name: Identifier | BindingPattern; + initializer?: Expression; + } interface PropertyDeclaration extends Declaration, ClassElement { - _propertyDeclarationBrand: any; + name: DeclarationName; questionToken?: Node; type?: TypeNode; initializer?: Expression; } - type VariableOrParameterDeclaration = VariableDeclaration | ParameterDeclaration; - type VariableOrParameterOrPropertyDeclaration = VariableOrParameterDeclaration | PropertyDeclaration; interface ObjectLiteralElement extends Declaration { _objectLiteralBrandBrand: any; } - interface ShorthandPropertyAssignment extends ObjectLiteralElement { - name: Identifier; - questionToken?: Node; - } interface PropertyAssignment extends ObjectLiteralElement { _propertyAssignmentBrand: any; name: DeclarationName; questionToken?: Node; initializer: Expression; } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { + name: Identifier; + questionToken?: Node; + } + interface VariableLikeDeclaration extends Declaration { + propertyName?: Identifier; + dotDotDotToken?: Node; + name: DeclarationName; + questionToken?: Node; + type?: TypeNode; + initializer?: Expression; + } + interface BindingPattern extends Node { + elements: NodeArray; + } /** * Several node kinds share function-like features such as a signature, * a name, and a body. These nodes should extend FunctionLikeDeclaration. * Examples: - * FunctionDeclaration - * MethodDeclaration - * AccessorDeclaration + * - FunctionDeclaration + * - MethodDeclaration + * - AccessorDeclaration */ interface FunctionLikeDeclaration extends SignatureDeclaration { _functionLikeDeclarationBrand: any; @@ -375,7 +470,7 @@ declare module "typescript" { body?: Block | Expression; } interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { - name: Identifier; + name?: Identifier; body?: Block; } interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { @@ -384,6 +479,9 @@ declare module "typescript" { interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { body?: Block; } + interface SemicolonClassElement extends ClassElement { + _semicolonClassElementBrand: any; + } interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { _accessorDeclarationBrand: any; body: Block; @@ -401,6 +499,10 @@ declare module "typescript" { typeName: EntityName; typeArguments?: NodeArray; } + interface TypePredicateNode extends TypeNode { + parameterName: Identifier; + type: TypeNode; + } interface TypeQueryNode extends TypeNode { exprName: EntityName; } @@ -413,12 +515,19 @@ declare module "typescript" { interface TupleTypeNode extends TypeNode { elementTypes: NodeArray; } - interface UnionTypeNode extends TypeNode { + interface UnionOrIntersectionTypeNode extends TypeNode { types: NodeArray; } + interface UnionTypeNode extends UnionOrIntersectionTypeNode { + } + interface IntersectionTypeNode extends UnionOrIntersectionTypeNode { + } interface ParenthesizedTypeNode extends TypeNode { type: TypeNode; } + interface StringLiteral extends LiteralExpression, TypeNode { + _stringLiteralBrand: any; + } interface Expression extends Node { _expressionBrand: any; contextualType?: Type; @@ -455,30 +564,36 @@ declare module "typescript" { interface VoidExpression extends UnaryExpression { expression: UnaryExpression; } + interface AwaitExpression extends UnaryExpression { + expression: UnaryExpression; + } interface YieldExpression extends Expression { asteriskToken?: Node; - expression: Expression; + expression?: Expression; } interface BinaryExpression extends Expression { left: Expression; - operator: SyntaxKind; + operatorToken: Node; right: Expression; } interface ConditionalExpression extends Expression { condition: Expression; + questionToken: Node; whenTrue: Expression; + colonToken: Node; whenFalse: Expression; } interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { name?: Identifier; body: Block | Expression; } + interface ArrowFunction extends Expression, FunctionLikeDeclaration { + equalsGreaterThanToken: Node; + } interface LiteralExpression extends PrimaryExpression { text: string; isUnterminated?: boolean; - } - interface StringLiteralExpression extends LiteralExpression { - _stringLiteralExpressionBrand: any; + hasExtendedUnicodeEscape?: boolean; } interface TemplateExpression extends PrimaryExpression { head: LiteralExpression; @@ -494,11 +609,15 @@ declare module "typescript" { interface ArrayLiteralExpression extends PrimaryExpression { elements: NodeArray; } + interface SpreadElementExpression extends Expression { + expression: Expression; + } interface ObjectLiteralExpression extends PrimaryExpression, Declaration { properties: NodeArray; } interface PropertyAccessExpression extends MemberExpression { expression: LeftHandSideExpression; + dotToken: Node; name: Identifier; } interface ElementAccessExpression extends MemberExpression { @@ -510,25 +629,65 @@ declare module "typescript" { typeArguments?: NodeArray; arguments: NodeArray; } + interface ExpressionWithTypeArguments extends TypeNode { + expression: LeftHandSideExpression; + typeArguments?: NodeArray; + } interface NewExpression extends CallExpression, PrimaryExpression { } interface TaggedTemplateExpression extends MemberExpression { tag: LeftHandSideExpression; template: LiteralExpression | TemplateExpression; } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator; + interface AsExpression extends Expression { + expression: Expression; + type: TypeNode; + } interface TypeAssertion extends UnaryExpression { type: TypeNode; expression: UnaryExpression; } - interface Statement extends Node, ModuleElement { + type AssertionExpression = TypeAssertion | AsExpression; + interface JsxElement extends PrimaryExpression { + openingElement: JsxOpeningElement; + children: NodeArray; + closingElement: JsxClosingElement; + } + interface JsxOpeningElement extends Expression { + _openingElementBrand?: any; + tagName: EntityName; + attributes: NodeArray; + } + interface JsxSelfClosingElement extends PrimaryExpression, JsxOpeningElement { + _selfClosingElementBrand?: any; + } + type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement; + interface JsxAttribute extends Node { + name: Identifier; + initializer?: Expression; + } + interface JsxSpreadAttribute extends Node { + expression: Expression; + } + interface JsxClosingElement extends Node { + tagName: EntityName; + } + interface JsxExpression extends Expression { + expression?: Expression; + } + interface JsxText extends Node { + _jsxTextExpressionBrand: any; + } + type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement; + interface Statement extends Node { _statementBrand: any; } interface Block extends Statement { statements: NodeArray; } interface VariableStatement extends Statement { - declarations: NodeArray; + declarationList: VariableDeclarationList; } interface ExpressionStatement extends Statement { expression: Expression; @@ -548,14 +707,16 @@ declare module "typescript" { expression: Expression; } interface ForStatement extends IterationStatement { - declarations?: NodeArray; - initializer?: Expression; + initializer?: VariableDeclarationList | Expression; condition?: Expression; - iterator?: Expression; + incrementor?: Expression; } interface ForInStatement extends IterationStatement { - declarations?: NodeArray; - variable?: Expression; + initializer: VariableDeclarationList | Expression; + expression: Expression; + } + interface ForOfStatement extends IterationStatement { + initializer: VariableDeclarationList | Expression; expression: Expression; } interface BreakOrContinueStatement extends Statement { @@ -570,6 +731,9 @@ declare module "typescript" { } interface SwitchStatement extends Statement { expression: Expression; + caseBlock: CaseBlock; + } + interface CaseBlock extends Node { clauses: NodeArray; } interface CaseClause extends Node { @@ -592,24 +756,24 @@ declare module "typescript" { catchClause?: CatchClause; finallyBlock?: Block; } - interface CatchClause extends Declaration { - name: Identifier; - type?: TypeNode; + interface CatchClause extends Node { + variableDeclaration: VariableDeclaration; block: Block; } - interface ModuleElement extends Node { - _moduleElementBrand: any; - } - interface ClassDeclaration extends Declaration, ModuleElement { - name: Identifier; + interface ClassLikeDeclaration extends Declaration { + name?: Identifier; typeParameters?: NodeArray; heritageClauses?: NodeArray; members: NodeArray; } + interface ClassDeclaration extends ClassLikeDeclaration, Statement { + } + interface ClassExpression extends ClassLikeDeclaration, PrimaryExpression { + } interface ClassElement extends Declaration { _classElementBrand: any; } - interface InterfaceDeclaration extends Declaration, ModuleElement { + interface InterfaceDeclaration extends Declaration, Statement { name: Identifier; typeParameters?: NodeArray; heritageClauses?: NodeArray; @@ -617,85 +781,231 @@ declare module "typescript" { } interface HeritageClause extends Node { token: SyntaxKind; - types?: NodeArray; + types?: NodeArray; } - interface TypeAliasDeclaration extends Declaration, ModuleElement { + interface TypeAliasDeclaration extends Declaration, Statement { name: Identifier; + typeParameters?: NodeArray; type: TypeNode; } interface EnumMember extends Declaration { name: DeclarationName; initializer?: Expression; } - interface EnumDeclaration extends Declaration, ModuleElement { + interface EnumDeclaration extends Declaration, Statement { name: Identifier; members: NodeArray; } - interface ModuleDeclaration extends Declaration, ModuleElement { + interface ModuleDeclaration extends Declaration, Statement { name: Identifier | LiteralExpression; body: ModuleBlock | ModuleDeclaration; } - interface ModuleBlock extends Node, ModuleElement { - statements: NodeArray; + interface ModuleBlock extends Node, Statement { + statements: NodeArray; } - interface ImportDeclaration extends Declaration, ModuleElement { + interface ImportEqualsDeclaration extends Declaration, Statement { name: Identifier; moduleReference: EntityName | ExternalModuleReference; } interface ExternalModuleReference extends Node { expression?: Expression; } - interface ExportAssignment extends Statement, ModuleElement { - exportName: Identifier; + interface ImportDeclaration extends Statement { + importClause?: ImportClause; + moduleSpecifier: Expression; + } + interface ImportClause extends Declaration { + name?: Identifier; + namedBindings?: NamespaceImport | NamedImports; + } + interface NamespaceImport extends Declaration { + name: Identifier; + } + interface ExportDeclaration extends Declaration, Statement { + exportClause?: NamedExports; + moduleSpecifier?: Expression; + } + interface NamedImportsOrExports extends Node { + elements: NodeArray; + } + type NamedImports = NamedImportsOrExports; + type NamedExports = NamedImportsOrExports; + interface ImportOrExportSpecifier extends Declaration { + propertyName?: Identifier; + name: Identifier; + } + type ImportSpecifier = ImportOrExportSpecifier; + type ExportSpecifier = ImportOrExportSpecifier; + interface ExportAssignment extends Declaration, Statement { + isExportEquals?: boolean; + expression: Expression; } interface FileReference extends TextRange { - filename: string; + fileName: string; } interface CommentRange extends TextRange { hasTrailingNewLine?: boolean; + kind: SyntaxKind; + } + interface JSDocTypeExpression extends Node { + type: JSDocType; + } + interface JSDocType extends TypeNode { + _jsDocTypeBrand: any; + } + interface JSDocAllType extends JSDocType { + _JSDocAllTypeBrand: any; + } + interface JSDocUnknownType extends JSDocType { + _JSDocUnknownTypeBrand: any; + } + interface JSDocArrayType extends JSDocType { + elementType: JSDocType; + } + interface JSDocUnionType extends JSDocType { + types: NodeArray; + } + interface JSDocTupleType extends JSDocType { + types: NodeArray; + } + interface JSDocNonNullableType extends JSDocType { + type: JSDocType; + } + interface JSDocNullableType extends JSDocType { + type: JSDocType; + } + interface JSDocRecordType extends JSDocType, TypeLiteralNode { + members: NodeArray; + } + interface JSDocTypeReference extends JSDocType { + name: EntityName; + typeArguments: NodeArray; + } + interface JSDocOptionalType extends JSDocType { + type: JSDocType; + } + interface JSDocFunctionType extends JSDocType, SignatureDeclaration { + parameters: NodeArray; + type: JSDocType; + } + interface JSDocVariadicType extends JSDocType { + type: JSDocType; + } + interface JSDocConstructorType extends JSDocType { + type: JSDocType; + } + interface JSDocThisType extends JSDocType { + type: JSDocType; + } + interface JSDocRecordMember extends PropertyDeclaration { + name: Identifier | LiteralExpression; + type?: JSDocType; + } + interface JSDocComment extends Node { + tags: NodeArray; + } + interface JSDocTag extends Node { + atToken: Node; + tagName: Identifier; + } + interface JSDocTemplateTag extends JSDocTag { + typeParameters: NodeArray; + } + interface JSDocReturnTag extends JSDocTag { + typeExpression: JSDocTypeExpression; + } + interface JSDocTypeTag extends JSDocTag { + typeExpression: JSDocTypeExpression; + } + interface JSDocParameterTag extends JSDocTag { + preParameterName?: Identifier; + typeExpression?: JSDocTypeExpression; + postParameterName?: Identifier; + isBracketed: boolean; } interface SourceFile extends Declaration { - statements: NodeArray; + statements: NodeArray; endOfFileToken: Node; - filename: string; + fileName: string; text: string; - getLineAndCharacterFromPosition(position: number): LineAndCharacter; - getPositionFromLineAndCharacter(line: number, character: number): number; - getLineStarts(): number[]; - amdDependencies: string[]; - amdModuleName: string; + amdDependencies: { + path: string; + name: string; + }[]; + moduleName: string; referencedFiles: FileReference[]; - referenceDiagnostics: Diagnostic[]; - parseDiagnostics: Diagnostic[]; - grammarDiagnostics: Diagnostic[]; - getSyntacticDiagnostics(): Diagnostic[]; - semanticDiagnostics: Diagnostic[]; + languageVariant: LanguageVariant; + /** + * lib.d.ts should have a reference comment like + * + * /// + * + * If any other file has this comment, it signals not to include lib.d.ts + * because this containing file is intended to act as a default library. + */ hasNoDefaultLib: boolean; - externalModuleIndicator: Node; - nodeCount: number; - identifierCount: number; - symbolCount: number; - isOpen: boolean; - version: string; languageVersion: ScriptTarget; - identifiers: Map; } - interface Program { - getSourceFile(filename: string): SourceFile; - getSourceFiles(): SourceFile[]; + interface ScriptReferenceHost { getCompilerOptions(): CompilerOptions; - getCompilerHost(): CompilerHost; - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - getGlobalDiagnostics(): Diagnostic[]; - getTypeChecker(fullTypeCheckMode: boolean): TypeChecker; - getCommonSourceDirectory(): string; + getSourceFile(fileName: string): SourceFile; + getCurrentDirectory(): string; + } + interface ParseConfigHost extends ModuleResolutionHost { + readDirectory(rootDir: string, extension: string, exclude: string[]): string[]; + } + interface WriteFileCallback { + (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; + } + class OperationCanceledException { + } + interface CancellationToken { + isCancellationRequested(): boolean; + /** @throws OperationCanceledException if isCancellationRequested is true */ + throwIfCancellationRequested(): void; + } + interface Program extends ScriptReferenceHost { + /** + * Get a list of root file names that were passed to a 'createProgram' + */ + getRootFileNames(): string[]; + /** + * Get a list of files in the program + */ + getSourceFiles(): SourceFile[]; + /** + * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then + * the JavaScript and declaration files will be produced for all the files in this program. + * If targetSourceFile is specified, then only the JavaScript and declaration for that + * specific file will be generated. + * + * If writeFile is not specified then the writeFile callback from the compiler host will be + * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter + * will be invoked when writing the JavaScript and declaration files. + */ + emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken): EmitResult; + getOptionsDiagnostics(cancellationToken?: CancellationToken): Diagnostic[]; + getGlobalDiagnostics(cancellationToken?: CancellationToken): Diagnostic[]; + getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[]; + getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[]; + getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[]; + /** + * Gets a type checker that can be used to semantically analyze source fils in the program. + */ + getTypeChecker(): TypeChecker; } interface SourceMapSpan { + /** Line number in the .js file. */ emittedLine: number; + /** Column number in the .js file. */ emittedColumn: number; + /** Line number in the .ts file. */ sourceLine: number; + /** Column number in the .ts file. */ sourceColumn: number; + /** Optional name (index into names array) associated with this span. */ nameIndex?: number; + /** .ts file (index into sources array) associated with this span */ sourceIndex: number; } interface SourceMapData { @@ -704,40 +1014,30 @@ declare module "typescript" { sourceMapFile: string; sourceMapSourceRoot: string; sourceMapSources: string[]; + sourceMapSourcesContent?: string[]; inputSourceFileNames: string[]; sourceMapNames?: string[]; sourceMapMappings: string; sourceMapDecodedMappings: SourceMapSpan[]; } - enum EmitReturnStatus { - Succeeded = 0, - AllOutputGenerationSkipped = 1, - JSGeneratedWithSemanticErrors = 2, - DeclarationGenerationSkipped = 3, - EmitErrorsEncountered = 4, - CompilerOptionsErrors = 5, + /** Return code used by getEmitOutput function to indicate status of the function */ + enum ExitStatus { + Success = 0, + DiagnosticsPresent_OutputsSkipped = 1, + DiagnosticsPresent_OutputsGenerated = 2, } interface EmitResult { - emitResultStatus: EmitReturnStatus; + emitSkipped: boolean; diagnostics: Diagnostic[]; - sourceMaps: SourceMapData[]; } interface TypeChecker { - getProgram(): Program; - getDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - getDeclarationDiagnostics(sourceFile: SourceFile): Diagnostic[]; - getGlobalDiagnostics(): Diagnostic[]; - getNodeCount(): number; - getIdentifierCount(): number; - getSymbolCount(): number; - getTypeCount(): number; - emitFiles(targetSourceFile?: SourceFile): EmitResult; getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; getDeclaredTypeOfSymbol(symbol: Symbol): Type; getPropertiesOfType(type: Type): Symbol[]; getPropertyOfType(type: Type, propertyName: string): Symbol; getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; getIndexTypeOfType(type: Type, kind: IndexKind): Type; + getBaseTypes(type: InterfaceType): ObjectType[]; getReturnTypeOfSignature(signature: Signature): Type; getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; getSymbolAtLocation(node: Node): Symbol; @@ -755,10 +1055,13 @@ declare module "typescript" { isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; isUndefinedSymbol(symbol: Symbol): boolean; isArgumentsSymbol(symbol: Symbol): boolean; - isEmitBlocked(sourceFile?: SourceFile): boolean; - getEnumMemberValue(node: EnumMember): number; + getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; getAliasedSymbol(symbol: Symbol): Symbol; + getExportsOfModule(moduleSymbol: Symbol): Symbol[]; + getJsxElementAttributesType(elementNode: JsxOpeningLikeElement): Type; + getJsxIntrinsicTagNames(): Symbol[]; + isOptionalParameter(node: ParameterDeclaration): boolean; } interface SymbolDisplayBuilder { buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; @@ -794,46 +1097,20 @@ declare module "typescript" { WriteOwnNameForAnyLike = 16, WriteTypeArgumentsOfSignature = 32, InElementType = 64, + UseFullyQualifiedType = 128, } const enum SymbolFormatFlags { None = 0, WriteTypeParametersOrArguments = 1, UseOnlyExternalAliasing = 2, } - const enum SymbolAccessibility { - Accessible = 0, - NotAccessible = 1, - CannotBeNamed = 2, - } - interface SymbolVisibilityResult { - accessibility: SymbolAccessibility; - aliasesToMakeVisible?: ImportDeclaration[]; - errorSymbolName?: string; - errorNode?: Node; - } - interface SymbolAccessiblityResult extends SymbolVisibilityResult { - errorModuleName?: string; - } - interface EmitResolver { - getProgram(): Program; - getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string; - getExpressionNamePrefix(node: Identifier): string; - getExportAssignmentName(node: SourceFile): string; - isReferencedImportDeclaration(node: ImportDeclaration): boolean; - isTopLevelValueImportWithEntityName(node: ImportDeclaration): boolean; - getNodeCheckFlags(node: Node): NodeCheckFlags; - getEnumMemberValue(node: EnumMember): number; - hasSemanticErrors(sourceFile?: SourceFile): boolean; - isDeclarationVisible(node: Declaration): boolean; - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableOrParameterDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; - writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; - isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; - isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult; - getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): number; - isEmitBlocked(sourceFile?: SourceFile): boolean; + interface TypePredicate { + parameterName: string; + parameterIndex: number; + type: Type; } const enum SymbolFlags { + None = 0, FunctionScopedVariable = 1, BlockScopedVariable = 2, Property = 4, @@ -851,103 +1128,64 @@ declare module "typescript" { Constructor = 16384, GetAccessor = 32768, SetAccessor = 65536, - CallSignature = 131072, - ConstructSignature = 262144, - IndexSignature = 524288, - TypeParameter = 1048576, - TypeAlias = 2097152, - ExportValue = 4194304, - ExportType = 8388608, - ExportNamespace = 16777216, - Import = 33554432, - Instantiated = 67108864, - Merged = 134217728, - Transient = 268435456, - Prototype = 536870912, - UnionProperty = 1073741824, + Signature = 131072, + TypeParameter = 262144, + TypeAlias = 524288, + ExportValue = 1048576, + ExportType = 2097152, + ExportNamespace = 4194304, + Alias = 8388608, + Instantiated = 16777216, + Merged = 33554432, + Transient = 67108864, + Prototype = 134217728, + SyntheticProperty = 268435456, + Optional = 536870912, + ExportStar = 1073741824, Enum = 384, Variable = 3, Value = 107455, - Type = 3152352, + Type = 793056, Namespace = 1536, Module = 1536, Accessor = 98304, - Signature = 917504, FunctionScopedVariableExcludes = 107454, BlockScopedVariableExcludes = 107455, ParameterExcludes = 107455, PropertyExcludes = 107455, EnumMemberExcludes = 107455, FunctionExcludes = 106927, - ClassExcludes = 3258879, - InterfaceExcludes = 3152288, - RegularEnumExcludes = 3258623, - ConstEnumExcludes = 3259263, + ClassExcludes = 899519, + InterfaceExcludes = 792960, + RegularEnumExcludes = 899327, + ConstEnumExcludes = 899967, ValueModuleExcludes = 106639, NamespaceModuleExcludes = 0, MethodExcludes = 99263, GetAccessorExcludes = 41919, SetAccessorExcludes = 74687, - TypeParameterExcludes = 2103776, - TypeAliasExcludes = 3152352, - ImportExcludes = 33554432, - ModuleMember = 35653619, + TypeParameterExcludes = 530912, + TypeAliasExcludes = 793056, + AliasExcludes = 8388608, + ModuleMember = 8914931, ExportHasLocal = 944, - HasLocals = 1041936, HasExports = 1952, HasMembers = 6240, - IsContainer = 1048560, + BlockScoped = 418, PropertyOrAccessor = 98308, - Export = 29360128, + Export = 7340032, } interface Symbol { flags: SymbolFlags; name: string; - id?: number; - mergeId?: number; declarations?: Declaration[]; - parent?: Symbol; + valueDeclaration?: Declaration; members?: SymbolTable; exports?: SymbolTable; - exportSymbol?: Symbol; - valueDeclaration?: Declaration; - constEnumOnlyModule?: boolean; - } - interface SymbolLinks { - target?: Symbol; - type?: Type; - declaredType?: Type; - mapper?: TypeMapper; - referenced?: boolean; - exportAssignSymbol?: Symbol; - unionType?: UnionType; - } - interface TransientSymbol extends Symbol, SymbolLinks { } interface SymbolTable { [index: string]: Symbol; } - const enum NodeCheckFlags { - TypeChecked = 1, - LexicalThis = 2, - CaptureThis = 4, - EmitExtends = 8, - SuperInstance = 16, - SuperStatic = 32, - ContextChecked = 64, - EnumValuesComputed = 128, - } - interface NodeLinks { - resolvedType?: Type; - resolvedSignature?: Signature; - resolvedSymbol?: Symbol; - flags?: NodeCheckFlags; - enumMemberValue?: number; - isIllegalTypeReferenceInConstraint?: boolean; - isVisible?: boolean; - localModuleName?: string; - assignmentChecks?: Map; - } const enum TypeFlags { Any = 1, String = 2, @@ -964,21 +1202,21 @@ declare module "typescript" { Reference = 4096, Tuple = 8192, Union = 16384, - Anonymous = 32768, - FromSignature = 65536, - Intrinsic = 127, + Intersection = 32768, + Anonymous = 65536, + Instantiated = 131072, + ObjectLiteral = 524288, + ESSymbol = 16777216, StringLike = 258, NumberLike = 132, - ObjectType = 48128, + ObjectType = 80896, + UnionOrIntersection = 49152, + StructuredType = 130048, } interface Type { flags: TypeFlags; - id: number; symbol?: Symbol; } - interface IntrinsicType extends Type { - intrinsicName: string; - } interface StringLiteralType extends Type { text: string; } @@ -986,7 +1224,10 @@ declare module "typescript" { } interface InterfaceType extends ObjectType { typeParameters: TypeParameter[]; - baseTypes: ObjectType[]; + outerTypeParameters: TypeParameter[]; + localTypeParameters: TypeParameter[]; + } + interface InterfaceTypeWithDeclaredMembers extends InterfaceType { declaredProperties: Symbol[]; declaredCallSignatures: Signature[]; declaredConstructSignatures: Signature[]; @@ -998,30 +1239,20 @@ declare module "typescript" { typeArguments: Type[]; } interface GenericType extends InterfaceType, TypeReference { - instantiations: Map; - openReferenceTargets: GenericType[]; - openReferenceChecks: Map; } interface TupleType extends ObjectType { elementTypes: Type[]; baseArrayType: TypeReference; } - interface UnionType extends Type { + interface UnionOrIntersectionType extends Type { types: Type[]; - resolvedProperties: SymbolTable; } - interface ResolvedType extends ObjectType, UnionType { - members: SymbolTable; - properties: Symbol[]; - callSignatures: Signature[]; - constructSignatures: Signature[]; - stringIndexType: Type; - numberIndexType: Type; + interface UnionType extends UnionOrIntersectionType { + } + interface IntersectionType extends UnionOrIntersectionType { } interface TypeParameter extends Type { constraint: Type; - target?: TypeParameter; - mapper?: TypeMapper; } const enum SignatureKind { Call = 0, @@ -1031,40 +1262,23 @@ declare module "typescript" { declaration: SignatureDeclaration; typeParameters: TypeParameter[]; parameters: Symbol[]; - resolvedReturnType: Type; - minArgumentCount: number; - hasRestParameter: boolean; - hasStringLiterals: boolean; - target?: Signature; - mapper?: TypeMapper; - unionSignatures?: Signature[]; - erasedSignatureCache?: Signature; - isolatedSignatureType?: ObjectType; + typePredicate?: TypePredicate; } const enum IndexKind { String = 0, Number = 1, } - interface TypeMapper { - (t: Type): Type; - } - interface TypeInferences { - primary: Type[]; - secondary: Type[]; - } - interface InferenceContext { - typeParameters: TypeParameter[]; - inferUnionTypes: boolean; - inferences: TypeInferences[]; - inferredTypes: Type[]; - failedTypeParameterIndex?: number; - } interface DiagnosticMessage { key: string; category: DiagnosticCategory; code: number; - isEarly?: boolean; } + /** + * A linked list of formatted diagnostic messages to be used as part of a multiline message. + * It is built from the bottom up, leaving the head to be the "main" diagnostic. + * While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage, + * the difference is that messages are all preformatted in DMC. + */ interface DiagnosticMessageChain { messageText: string; category: DiagnosticCategory; @@ -1075,52 +1289,78 @@ declare module "typescript" { file: SourceFile; start: number; length: number; - messageText: string; + messageText: string | DiagnosticMessageChain; category: DiagnosticCategory; code: number; - /** - * Early error - any error (can be produced at parsing\binding\typechecking step) that blocks emit - */ - isEarly?: boolean; } enum DiagnosticCategory { Warning = 0, Error = 1, Message = 2, } + const enum ModuleResolutionKind { + Classic = 1, + NodeJs = 2, + } interface CompilerOptions { allowNonTsExtensions?: boolean; charset?: string; - codepage?: number; declaration?: boolean; diagnostics?: boolean; emitBOM?: boolean; help?: boolean; + init?: boolean; + inlineSourceMap?: boolean; + inlineSources?: boolean; + jsx?: JsxEmit; + listFiles?: boolean; locale?: string; mapRoot?: string; module?: ModuleKind; + newLine?: NewLineKind; + noEmit?: boolean; + noEmitHelpers?: boolean; noEmitOnError?: boolean; noErrorTruncation?: boolean; noImplicitAny?: boolean; noLib?: boolean; - noLibCheck?: boolean; noResolve?: boolean; out?: string; + outFile?: string; outDir?: string; preserveConstEnums?: boolean; + project?: string; removeComments?: boolean; + rootDir?: string; sourceMap?: boolean; sourceRoot?: string; + suppressExcessPropertyErrors?: boolean; suppressImplicitAnyIndexErrors?: boolean; target?: ScriptTarget; version?: boolean; watch?: boolean; + isolatedModules?: boolean; + experimentalDecorators?: boolean; + experimentalAsyncFunctions?: boolean; + emitDecoratorMetadata?: boolean; + moduleResolution?: ModuleResolutionKind; [option: string]: string | number | boolean; } const enum ModuleKind { None = 0, CommonJS = 1, AMD = 2, + UMD = 3, + System = 4, + } + const enum JsxEmit { + None = 0, + Preserve = 1, + React = 2, + } + const enum NewLineKind { + CarriageReturnLineFeed = 0, + LineFeed = 1, } interface LineAndCharacter { line: number; @@ -1132,164 +1372,74 @@ declare module "typescript" { ES6 = 2, Latest = 2, } + const enum LanguageVariant { + Standard = 0, + JSX = 1, + } interface ParsedCommandLine { options: CompilerOptions; - filenames: string[]; + fileNames: string[]; errors: Diagnostic[]; } - interface CommandLineOption { - name: string; - type: string | Map; - shortName?: string; - description?: DiagnosticMessage; - paramType?: DiagnosticMessage; - error?: DiagnosticMessage; + interface ModuleResolutionHost { + fileExists(fileName: string): boolean; + readFile(fileName: string): string; } - const enum CharacterCodes { - nullCharacter = 0, - maxAsciiCharacter = 127, - lineFeed = 10, - carriageReturn = 13, - lineSeparator = 8232, - paragraphSeparator = 8233, - nextLine = 133, - space = 32, - nonBreakingSpace = 160, - enQuad = 8192, - emQuad = 8193, - enSpace = 8194, - emSpace = 8195, - threePerEmSpace = 8196, - fourPerEmSpace = 8197, - sixPerEmSpace = 8198, - figureSpace = 8199, - punctuationSpace = 8200, - thinSpace = 8201, - hairSpace = 8202, - zeroWidthSpace = 8203, - narrowNoBreakSpace = 8239, - ideographicSpace = 12288, - mathematicalSpace = 8287, - ogham = 5760, - _ = 95, - $ = 36, - _0 = 48, - _1 = 49, - _2 = 50, - _3 = 51, - _4 = 52, - _5 = 53, - _6 = 54, - _7 = 55, - _8 = 56, - _9 = 57, - a = 97, - b = 98, - c = 99, - d = 100, - e = 101, - f = 102, - g = 103, - h = 104, - i = 105, - j = 106, - k = 107, - l = 108, - m = 109, - n = 110, - o = 111, - p = 112, - q = 113, - r = 114, - s = 115, - t = 116, - u = 117, - v = 118, - w = 119, - x = 120, - y = 121, - z = 122, - A = 65, - B = 66, - C = 67, - D = 68, - E = 69, - F = 70, - G = 71, - H = 72, - I = 73, - J = 74, - K = 75, - L = 76, - M = 77, - N = 78, - O = 79, - P = 80, - Q = 81, - R = 82, - S = 83, - T = 84, - U = 85, - V = 86, - W = 87, - X = 88, - Y = 89, - Z = 90, - ampersand = 38, - asterisk = 42, - at = 64, - backslash = 92, - backtick = 96, - bar = 124, - caret = 94, - closeBrace = 125, - closeBracket = 93, - closeParen = 41, - colon = 58, - comma = 44, - dot = 46, - doubleQuote = 34, - equals = 61, - exclamation = 33, - greaterThan = 62, - lessThan = 60, - minus = 45, - openBrace = 123, - openBracket = 91, - openParen = 40, - percent = 37, - plus = 43, - question = 63, - semicolon = 59, - singleQuote = 39, - slash = 47, - tilde = 126, - backspace = 8, - formFeed = 12, - byteOrderMark = 65279, - tab = 9, - verticalTab = 11, + interface ResolvedModule { + resolvedFileName: string; + isExternalLibraryImport?: boolean; } - interface CancellationToken { - isCancellationRequested(): boolean; + interface ResolvedModuleWithFailedLookupLocations { + resolvedModule: ResolvedModule; + failedLookupLocations: string[]; } - interface CompilerHost { - getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; - getDefaultLibFilename(options: CompilerOptions): string; + interface CompilerHost extends ModuleResolutionHost { + getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; getCancellationToken?(): CancellationToken; - writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; + getDefaultLibFileName(options: CompilerOptions): string; + writeFile: WriteFileCallback; getCurrentDirectory(): string; getCanonicalFileName(fileName: string): string; useCaseSensitiveFileNames(): boolean; getNewLine(): string; + resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[]; + } + interface TextSpan { + start: number; + length: number; + } + interface TextChangeRange { + span: TextSpan; + newLength: number; } } declare module "typescript" { - interface ErrorCallback { - (message: DiagnosticMessage): void; + interface System { + args: string[]; + newLine: string; + useCaseSensitiveFileNames: boolean; + write(s: string): void; + readFile(path: string, encoding?: string): string; + writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; + watchFile?(path: string, callback: (path: string) => void): FileWatcher; + resolvePath(path: string): string; + fileExists(path: string): boolean; + directoryExists(path: string): boolean; + createDirectory(path: string): void; + getExecutingFilePath(): string; + getCurrentDirectory(): string; + readDirectory(path: string, extension?: string, exclude?: string[]): string[]; + getMemoryUsage?(): number; + exit(exitCode?: number): void; } - interface CommentCallback { - (pos: number, end: number): void; + interface FileWatcher { + close(): void; + } + var sys: System; +} +declare module "typescript" { + interface ErrorCallback { + (message: DiagnosticMessage, length: number): void; } interface Scanner { getStartPos(): number; @@ -1298,6 +1448,7 @@ declare module "typescript" { getTokenPos(): number; getTokenText(): string; getTokenValue(): string; + hasExtendedUnicodeEscape(): boolean; hasPrecedingLineBreak(): boolean; isIdentifier(): boolean; isReservedWord(): boolean; @@ -1305,45 +1456,111 @@ declare module "typescript" { reScanGreaterToken(): SyntaxKind; reScanSlashToken(): SyntaxKind; reScanTemplateToken(): SyntaxKind; + scanJsxIdentifier(): SyntaxKind; + reScanJsxToken(): SyntaxKind; + scanJsxToken(): SyntaxKind; scan(): SyntaxKind; - setText(text: string): void; + setText(text: string, start?: number, length?: number): void; + setOnError(onError: ErrorCallback): void; + setScriptTarget(scriptTarget: ScriptTarget): void; + setLanguageVariant(variant: LanguageVariant): void; setTextPos(textPos: number): void; lookAhead(callback: () => T): T; tryScan(callback: () => T): T; } function tokenToString(t: SyntaxKind): string; - function computeLineStarts(text: string): number[]; - function getPositionFromLineAndCharacter(lineStarts: number[], line: number, character: number): number; - function getLineAndCharacterOfPosition(lineStarts: number[], position: number): { - line: number; - character: number; - }; - function positionToLineAndCharacter(text: string, pos: number): { - line: number; - character: number; - }; + function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number; + function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter; function isWhiteSpace(ch: number): boolean; function isLineBreak(ch: number): boolean; - function isOctalDigit(ch: number): boolean; - function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; + function couldStartTrivia(text: string, pos: number): boolean; function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; + /** Optionally, get the shebang */ + function getShebang(text: string): string; function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, text?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner; +} +declare module "typescript" { + function getDefaultLibFileName(options: CompilerOptions): string; + function textSpanEnd(span: TextSpan): number; + function textSpanIsEmpty(span: TextSpan): boolean; + function textSpanContainsPosition(span: TextSpan, position: number): boolean; + function textSpanContainsTextSpan(span: TextSpan, other: TextSpan): boolean; + function textSpanOverlapsWith(span: TextSpan, other: TextSpan): boolean; + function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan; + function textSpanIntersectsWithTextSpan(span: TextSpan, other: TextSpan): boolean; + function textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean; + function decodedTextSpanIntersectsWith(start1: number, length1: number, start2: number, length2: number): boolean; + function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean; + function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan; + function createTextSpan(start: number, length: number): TextSpan; + function createTextSpanFromBounds(start: number, end: number): TextSpan; + function textChangeRangeNewSpan(range: TextChangeRange): TextSpan; + function textChangeRangeIsUnchanged(range: TextChangeRange): boolean; + function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange; + let unchangedTextChangeRange: TextChangeRange; + /** + * Called to merge all the changes that occurred across several versions of a script snapshot + * into a single change. i.e. if a user keeps making successive edits to a script we will + * have a text change from V1 to V2, V2 to V3, ..., Vn. + * + * This function will then merge those changes into a single change range valid between V1 and + * Vn. + */ + function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; + function getTypeParameterOwner(d: Declaration): Declaration; } declare module "typescript" { function getNodeConstructor(kind: SyntaxKind): new () => Node; - function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodes?: (nodes: Node[]) => T): T; - function createCompilerHost(options: CompilerOptions): CompilerHost; - function createSourceFile(filename: string, sourceText: string, languageVersion: ScriptTarget, version: string, isOpen?: boolean): SourceFile; - function createProgram(rootNames: string[], options: CompilerOptions, host: CompilerHost): Program; + function createNode(kind: SyntaxKind): Node; + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T; + function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; + function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; } declare module "typescript" { - function createTypeChecker(program: Program, fullTypeCheck: boolean): TypeChecker; + const version: string; + function findConfigFile(searchPath: string): string; + function resolveTripleslashReference(moduleName: string, containingFile: string): string; + function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations; + function nodeModuleNameResolver(moduleName: string, containingFile: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations; + function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations; + function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; + function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[]; + function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; + function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program): Program; } declare module "typescript" { - var servicesVersion: string; + function parseCommandLine(commandLine: string[], readFile?: (path: string) => string): ParsedCommandLine; + /** + * Read tsconfig.json file + * @param fileName The path to the config file + */ + function readConfigFile(fileName: string): { + config?: any; + error?: Diagnostic; + }; + /** + * Parse the text of the tsconfig.json file + * @param fileName The path to the config file + * @param jsonText The text of the config file + */ + function parseConfigFileText(fileName: string, jsonText: string): { + config?: any; + error?: Diagnostic; + }; + /** + * Parse the contents of a config file (tsconfig.json). + * @param json The contents of the config file to parse + * @param basePath A root directory to resolve relative path entries in the config + * file to. e.g. outDir + */ + function parseConfigFile(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine; +} +declare module "typescript" { + /** The version of the language service API */ + let servicesVersion: string; interface Node { getSourceFile(): SourceFile; getChildCount(sourceFile?: SourceFile): number; @@ -1376,6 +1593,7 @@ declare module "typescript" { getConstructSignatures(): Signature[]; getStringIndexType(): Type; getNumberIndexType(): Type; + getBaseTypes(): ObjectType[]; } interface Signature { getDeclaration(): SignatureDeclaration; @@ -1385,9 +1603,10 @@ declare module "typescript" { getDocumentationComment(): SymbolDisplayPart[]; } interface SourceFile { - getScriptSnapshot(): IScriptSnapshot; - getNamedDeclarations(): Declaration[]; - update(scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; + getLineAndCharacterOfPosition(pos: number): LineAndCharacter; + getLineStarts(): number[]; + getPositionOfLineAndCharacter(line: number, character: number): number; + update(newText: string, textChangeRange: TextChangeRange): SourceFile; } /** * Represents an immutable snapshot of a script at a specified time.Once acquired, the @@ -1399,12 +1618,6 @@ declare module "typescript" { getText(start: number, end: number): string; /** Gets the length of this script snapshot. */ getLength(): number; - /** - * This call returns the array containing the start position of every line. - * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could - * always determine this (albeit in a more expensive manner). - */ - getLineStartPositions(): number[]; /** * Gets the TextChangeRange that describe how the text changed between this text and * an older version. This information is used by the incremental parser to determine @@ -1413,6 +1626,8 @@ declare module "typescript" { * not happen and the entire document will be re - parsed. */ getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; + /** Releases all resources held by this script snapshot */ + dispose?(): void; } module ScriptSnapshot { function fromString(text: string): IScriptSnapshot; @@ -1420,29 +1635,44 @@ declare module "typescript" { interface PreProcessedFileInfo { referencedFiles: FileReference[]; importedFiles: FileReference[]; + ambientExternalModules: string[]; isLibFile: boolean; } - interface Logger { - log(s: string): void; + interface HostCancellationToken { + isCancellationRequested(): boolean; } - interface LanguageServiceHost extends Logger { + interface LanguageServiceHost { getCompilationSettings(): CompilerOptions; + getNewLine?(): string; + getProjectVersion?(): string; getScriptFileNames(): string[]; getScriptVersion(fileName: string): string; - getScriptIsOpen(fileName: string): boolean; getScriptSnapshot(fileName: string): IScriptSnapshot; getLocalizedDiagnosticMessages?(): any; - getCancellationToken?(): CancellationToken; + getCancellationToken?(): HostCancellationToken; getCurrentDirectory(): string; - getDefaultLibFilename(options: CompilerOptions): string; + getDefaultLibFileName(options: CompilerOptions): string; + log?(s: string): void; + trace?(s: string): void; + error?(s: string): void; + useCaseSensitiveFileNames?(): boolean; + resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[]; } interface LanguageService { cleanupSemanticCache(): void; getSyntacticDiagnostics(fileName: string): Diagnostic[]; getSemanticDiagnostics(fileName: string): Diagnostic[]; getCompilerOptionsDiagnostics(): Diagnostic[]; + /** + * @deprecated Use getEncodedSyntacticClassifications instead. + */ getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + /** + * @deprecated Use getEncodedSemanticClassifications instead. + */ getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications; + getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications; getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; @@ -1452,9 +1682,13 @@ declare module "typescript" { getRenameInfo(fileName: string, position: number): RenameInfo; findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; + getTypeDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; + findReferences(fileName: string, position: number): ReferencedSymbol[]; + getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[]; + /** @deprecated */ getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - getNavigateToItems(searchValue: string): NavigateToItem[]; + getNavigateToItems(searchValue: string, maxResultCount?: number): NavigateToItem[]; getNavigationBarItems(fileName: string): NavigationBarItem[]; getOutliningSpans(fileName: string): OutliningSpan[]; getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; @@ -1463,99 +1697,15 @@ declare module "typescript" { getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; + getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion; getEmitOutput(fileName: string): EmitOutput; - getSourceFile(filename: string): SourceFile; + getProgram(): Program; + getSourceFile(fileName: string): SourceFile; dispose(): void; } - class TextSpan { - private _start; - private _length; - /** - * Creates a TextSpan instance beginning with the position Start and having the Length - * specified with length. - */ - constructor(start: number, length: number); - toJSON(key: any): any; - start(): number; - length(): number; - end(): number; - isEmpty(): boolean; - /** - * Determines whether the position lies within the span. Returns true if the position is greater than or equal to Start and strictly less - * than End, otherwise false. - * @param position The position to check. - */ - containsPosition(position: number): boolean; - /** - * Determines whether span falls completely within this span. Returns true if the specified span falls completely within this span, otherwise false. - * @param span The span to check. - */ - containsTextSpan(span: TextSpan): boolean; - /** - * Determines whether the given span overlaps this span. Two spans are considered to overlap - * if they have positions in common and neither is empty. Empty spans do not overlap with any - * other span. Returns true if the spans overlap, false otherwise. - * @param span The span to check. - */ - overlapsWith(span: TextSpan): boolean; - /** - * Returns the overlap with the given span, or undefined if there is no overlap. - * @param span The span to check. - */ - overlap(span: TextSpan): TextSpan; - /** - * Determines whether span intersects this span. Two spans are considered to - * intersect if they have positions in common or the end of one span - * coincides with the start of the other span. Returns true if the spans intersect, false otherwise. - * @param The span to check. - */ - intersectsWithTextSpan(span: TextSpan): boolean; - intersectsWith(start: number, length: number): boolean; - /** - * Determines whether the given position intersects this span. - * A position is considered to intersect if it is between the start and - * end positions (inclusive) of this span. Returns true if the position intersects, false otherwise. - * @param position The position to check. - */ - intersectsWithPosition(position: number): boolean; - /** - * Returns the intersection with the given span, or undefined if there is no intersection. - * @param span The span to check. - */ - intersection(span: TextSpan): TextSpan; - /** - * Creates a new TextSpan from the given start and end positions - * as opposed to a position and length. - */ - static fromBounds(start: number, end: number): TextSpan; - } - class TextChangeRange { - static unchanged: TextChangeRange; - private _span; - private _newLength; - /** - * Initializes a new instance of TextChangeRange. - */ - constructor(span: TextSpan, newLength: number); - /** - * The span of text before the edit which is being changed - */ - span(): TextSpan; - /** - * Width of the span after the edit. A 0 here would represent a delete - */ - newLength(): number; - newSpan(): TextSpan; - isUnchanged(): boolean; - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - static collapseChangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; + interface Classifications { + spans: number[]; + endOfLineState: EndOfLineState; } interface ClassifiedSpan { textSpan: TextSpan; @@ -1584,6 +1734,11 @@ declare module "typescript" { span: TextSpan; newText: string; } + interface TextInsertion { + newText: string; + /** The position in newText the caret should point to after the insertion. */ + caretOffset: number; + } interface RenameLocation { textSpan: TextSpan; fileName: string; @@ -1593,11 +1748,27 @@ declare module "typescript" { fileName: string; isWriteAccess: boolean; } + interface DocumentHighlights { + fileName: string; + highlightSpans: HighlightSpan[]; + } + module HighlightSpanKind { + const none: string; + const definition: string; + const reference: string; + const writtenReference: string; + } + interface HighlightSpan { + fileName?: string; + textSpan: TextSpan; + kind: string; + } interface NavigateToItem { name: string; kind: string; kindModifiers: string; matchKind: string; + isCaseSensitive: boolean; fileName: string; textSpan: TextSpan; containerName: string; @@ -1616,8 +1787,10 @@ declare module "typescript" { InsertSpaceAfterKeywordsInControlFlowStatements: boolean; InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; + InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean; PlaceOpenBraceOnNewLineForFunctions: boolean; PlaceOpenBraceOnNewLineForControlBlocks: boolean; + [s: string]: boolean | number | string; } interface DefinitionInfo { fileName: string; @@ -1627,6 +1800,10 @@ declare module "typescript" { containerKind: string; containerName: string; } + interface ReferencedSymbol { + definition: DefinitionInfo; + references: ReferenceEntry[]; + } enum SymbolDisplayPartKind { aliasName = 0, className = 1, @@ -1704,12 +1881,14 @@ declare module "typescript" { } interface CompletionInfo { isMemberCompletion: boolean; + isNewIdentifierLocation: boolean; entries: CompletionEntry[]; } interface CompletionEntry { name: string; kind: string; kindModifiers: string; + sortText: string; } interface CompletionEntryDetails { name: string; @@ -1733,7 +1912,7 @@ declare module "typescript" { } interface EmitOutput { outputFiles: OutputFile[]; - emitOutputStatus: EmitReturnStatus; + emitSkipped: boolean; } const enum OutputFileType { JavaScript = 0, @@ -1746,10 +1925,13 @@ declare module "typescript" { text: string; } const enum EndOfLineState { - Start = 0, + None = 0, InMultiLineCommentTrivia = 1, InSingleQuoteStringLiteral = 2, InDoubleQuoteStringLiteral = 3, + InTemplateHeadOrNoSubstitutionTemplate = 4, + InTemplateMiddleOrTail = 5, + InTemplateSubstitutionPosition = 6, } enum TokenClass { Punctuation = 0, @@ -1771,50 +1953,125 @@ declare module "typescript" { classification: TokenClass; } interface Classifier { - getClassificationsForLine(text: string, lexState: EndOfLineState, classifyKeywordsInGenerics?: boolean): ClassificationResult; + /** + * Gives lexical classifications of tokens on a line without any syntactic context. + * For instance, a token consisting of the text 'string' can be either an identifier + * named 'string' or the keyword 'string', however, because this classifier is not aware, + * it relies on certain heuristics to give acceptable results. For classifications where + * speed trumps accuracy, this function is preferable; however, for true accuracy, the + * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the + * lexical, syntactic, and semantic classifiers may issue the best user experience. + * + * @param text The text of a line to classify. + * @param lexState The state of the lexical classifier at the end of the previous line. + * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier. + * If there is no syntactic classifier (syntacticClassifierAbsent=true), + * certain heuristics may be used in its place; however, if there is a + * syntactic classifier (syntacticClassifierAbsent=false), certain + * classifications which may be incorrectly categorized will be given + * back as Identifiers in order to allow the syntactic classifier to + * subsume the classification. + * @deprecated Use getLexicalClassifications instead. + */ + getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult; + getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications; } + /** + * The document registry represents a store of SourceFile objects that can be shared between + * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST) + * of files in the context. + * SourceFile objects account for most of the memory usage by the language service. Sharing + * the same DocumentRegistry instance between different instances of LanguageService allow + * for more efficient memory utilization since all projects will share at least the library + * file (lib.d.ts). + * + * A more advanced use of the document registry is to serialize sourceFile objects to disk + * and re-hydrate them when needed. + * + * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it + * to all subsequent createLanguageService calls. + */ interface DocumentRegistry { - acquireDocument(filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean): SourceFile; - updateDocument(sourceFile: SourceFile, filename: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, isOpen: boolean, textChangeRange: TextChangeRange): SourceFile; - releaseDocument(filename: string, compilationSettings: CompilerOptions): void; + /** + * Request a stored SourceFile with a given fileName and compilationSettings. + * The first call to acquire will call createLanguageServiceSourceFile to generate + * the SourceFile if was not found in the registry. + * + * @param fileName The name of the file requested + * @param compilationSettings Some compilation settings like target affects the + * shape of a the resulting SourceFile. This allows the DocumentRegistry to store + * multiple copies of the same file for different compilation settings. + * @parm scriptSnapshot Text of the file. Only used if the file was not found + * in the registry and a new one was created. + * @parm version Current version of the file. Only used if the file was not found + * in the registry and a new one was created. + */ + acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; + /** + * Request an updated version of an already existing SourceFile with a given fileName + * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile + * to get an updated SourceFile. + * + * @param fileName The name of the file requested + * @param compilationSettings Some compilation settings like target affects the + * shape of a the resulting SourceFile. This allows the DocumentRegistry to store + * multiple copies of the same file for different compilation settings. + * @param scriptSnapshot Text of the file. + * @param version Current version of the file. + */ + updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; + /** + * Informs the DocumentRegistry that a file is not needed any longer. + * + * Note: It is not allowed to call release on a SourceFile that was not acquired from + * this registry originally. + * + * @param fileName The name of the file to be released + * @param compilationSettings The compilation settings used to acquire the file + */ + releaseDocument(fileName: string, compilationSettings: CompilerOptions): void; + reportStats(): string; } - class ScriptElementKind { - static unknown: string; - static keyword: string; - static scriptElement: string; - static moduleElement: string; - static classElement: string; - static interfaceElement: string; - static typeElement: string; - static enumElement: string; - static variableElement: string; - static localVariableElement: string; - static functionElement: string; - static localFunctionElement: string; - static memberFunctionElement: string; - static memberGetAccessorElement: string; - static memberSetAccessorElement: string; - static memberVariableElement: string; - static constructorImplementationElement: string; - static callSignatureElement: string; - static indexSignatureElement: string; - static constructSignatureElement: string; - static parameterElement: string; - static typeParameterElement: string; - static primitiveType: string; - static label: string; - static alias: string; - static constElement: string; - static letElement: string; + module ScriptElementKind { + const unknown: string; + const warning: string; + const keyword: string; + const scriptElement: string; + const moduleElement: string; + const classElement: string; + const localClassElement: string; + const interfaceElement: string; + const typeElement: string; + const enumElement: string; + const variableElement: string; + const localVariableElement: string; + const functionElement: string; + const localFunctionElement: string; + const memberFunctionElement: string; + const memberGetAccessorElement: string; + const memberSetAccessorElement: string; + const memberVariableElement: string; + const constructorImplementationElement: string; + const callSignatureElement: string; + const indexSignatureElement: string; + const constructSignatureElement: string; + const parameterElement: string; + const typeParameterElement: string; + const primitiveType: string; + const label: string; + const alias: string; + const constElement: string; + const letElement: string; } - class ScriptElementKindModifier { - static none: string; - static publicMemberModifier: string; - static privateMemberModifier: string; - static protectedMemberModifier: string; - static exportedModifier: string; - static ambientModifier: string; - static staticModifier: string; + module ScriptElementKindModifier { + const none: string; + const publicMemberModifier: string; + const privateMemberModifier: string; + const protectedMemberModifier: string; + const exportedModifier: string; + const ambientModifier: string; + const staticModifier: string; + const abstractModifier: string; } class ClassificationTypeNames { static comment: string; @@ -1831,24 +2088,61 @@ declare module "typescript" { static interfaceName: string; static moduleName: string; static typeParameterName: string; - static typeAlias: string; + static typeAliasName: string; + static parameterName: string; + static docCommentTagName: string; + } + const enum ClassificationType { + comment = 1, + identifier = 2, + keyword = 3, + numericLiteral = 4, + operator = 5, + stringLiteral = 6, + regularExpressionLiteral = 7, + whiteSpace = 8, + text = 9, + punctuation = 10, + className = 11, + enumName = 12, + interfaceName = 13, + moduleName = 14, + typeParameterName = 15, + typeAliasName = 16, + parameterName = 17, + docCommentTagName = 18, } interface DisplayPartsSymbolWriter extends SymbolWriter { displayParts(): SymbolDisplayPart[]; } function displayPartsToString(displayParts: SymbolDisplayPart[]): string; function getDefaultCompilerOptions(): CompilerOptions; - class OperationCanceledException { + interface TranspileOptions { + compilerOptions?: CompilerOptions; + fileName?: string; + reportDiagnostics?: boolean; + moduleName?: string; + renamedDependencies?: Map; } - class CancellationTokenObject { - private cancellationToken; - static None: CancellationTokenObject; - constructor(cancellationToken: CancellationToken); - isCancellationRequested(): boolean; - throwIfCancellationRequested(): void; + interface TranspileOutput { + outputText: string; + diagnostics?: Diagnostic[]; + sourceMapText?: string; } - function createDocumentRegistry(): DocumentRegistry; + function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput; + function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string; + function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; + let disableIncrementalParsing: boolean; + function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; + function createGetCanonicalFileName(useCaseSensitivefileNames: boolean): (fileName: string) => string; + function createDocumentRegistry(useCaseSensitiveFileNames?: boolean): DocumentRegistry; function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; - function createLanguageService(host: LanguageServiceHost, documentRegistry: DocumentRegistry): LanguageService; - function createClassifier(host: Logger): Classifier; + function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; + function createClassifier(): Classifier; + /** + * Get the path of the default library files (lib.d.ts) as distributed with the typescript + * node package. + * The functionality is not supported if the ts module is consumed outside of a node module. + */ + function getDefaultLibFilePath(options: CompilerOptions): string; } From 0d39cb0d41ef072b73692e39053e11930734dc7c Mon Sep 17 00:00:00 2001 From: Lionel Besson Date: Thu, 8 Oct 2015 17:15:47 +0200 Subject: [PATCH 26/30] Add bundles configuration item bundles option was added in 2.1.10 https://github.com/jrburke/requirejs/commit/c3d5f33a6a0adc43175dd66f12be901816f65566 --- requirejs/require.d.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/requirejs/require.d.ts b/requirejs/require.d.ts index 5ca4b476a..39c4c3419 100644 --- a/requirejs/require.d.ts +++ b/requirejs/require.d.ts @@ -115,6 +115,19 @@ interface RequireConfig { }; }; + /** + * Allows pointing multiple module IDs to a module ID that contains a bundle of modules. + * + * @example + * requirejs.config({ + * bundles: { + * 'primary': ['main', 'util', 'text', 'text!template.html'], + * 'secondary': ['text!secondary.html'] + * } + * }); + **/ + bundles?: { [key: string]: string[]; }; + /** * AMD configurations, use module.config() to access in * define() functions From f621f547b889ff6fc2c12cb7d4708686ede3a83c Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Fri, 9 Oct 2015 08:19:39 +0500 Subject: [PATCH 27/30] lodash: changed signatures of the method _.flattenDeep --- lodash/lodash-tests.ts | 32 +++++++++++++++++++++++++++--- lodash/lodash.d.ts | 44 +++++++++++++++++++++++++++++++----------- 2 files changed, 62 insertions(+), 14 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index db15ebc4a..3020c2b41 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -388,14 +388,40 @@ result = >_.flatten([1, [2], [[3]]], true); result = >_.flatten([1, [2], [3, [[4]]]], true); result = >_.flatten([1, [2], [3, [[false]]]], true); -result = >_.flattenDeep([[[[1]]]]); - result = <_.LoDashArrayWrapper>_([[1, 2], [3, 4], 5, 6]).flatten(); result = <_.LoDashArrayWrapper>>>_([1, [2], [3, [[4]]]]).flatten(); result = <_.LoDashArrayWrapper>_([1, [2], [3, [[4]]]]).flatten(true); -result = <_.LoDashArrayWrapper>_([1, [2], [3, [[4]]]]).flattenDeep(); +// _.flattenDeep +module TestFlattenDeep { + interface RecursiveArray extends Array> {} + interface ListOfRecursiveArraysOrValues extends _.List> {} + interface RecursiveList extends _.List> { } + + let recursiveArray: RecursiveArray; + let listOfMaybeRecursiveArraysOrValues: ListOfRecursiveArraysOrValues; + let recursiveList: RecursiveList; + + { + let result: TResult[]; + + result = _.flattenDeep(recursiveArray); + result = _.flattenDeep(listOfMaybeRecursiveArraysOrValues); + + result = _(recursiveArray).flattenDeep().value(); + + result = _(listOfMaybeRecursiveArraysOrValues).flattenDeep().value(); + } + + { + let result: any; + + result = _.flattenDeep(recursiveList); + + result = _(recursiveList).flattenDeep().value(); + } +} // _.head module TestHead { diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 5a3e0df9e..da0145581 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -766,6 +766,8 @@ declare module _ { } interface MaybeNestedList extends List> { } + interface RecursiveArray extends Array> { } + interface ListOfRecursiveArraysOrValues extends List> { } interface RecursiveList extends List> { } //_.flatten @@ -792,16 +794,6 @@ declare module _ { * @return `array` flattened. **/ flatten(array: RecursiveList, isDeep: boolean): List | RecursiveList; - - /** - * Recursively flattens a nested array. - * - * _.flattenDeep(x) is equivalent to _.flatten(x, true); - * - * @param array The array to flatten - * @return `array` recursively flattened - */ - flattenDeep(array: RecursiveList): List } interface LoDashArrayWrapper { @@ -814,11 +806,41 @@ declare module _ { * @see _.flatten **/ flatten(isShallow: boolean): LoDashArrayWrapper; + } + + //_.flattenDeep + interface LoDashStatic { + /** + * Recursively flattens a nested array. + * + * @param array The array to recursively flatten. + * @return Returns the new flattened array. + */ + flattenDeep(array: RecursiveArray): T[]; /** * @see _.flattenDeep */ - flattenDeep(): LoDashArrayWrapper; + flattenDeep(array: ListOfRecursiveArraysOrValues): T[]; + + /** + * @see _.flattenDeep + */ + flattenDeep(array: RecursiveList): any[]; + } + + interface LoDashArrayWrapper { + /** + * @see _.flattenDeep + */ + flattenDeep(): LoDashArrayWrapper; + } + + interface LoDashObjectWrapper { + /** + * @see _.flattenDeep + */ + flattenDeep(): LoDashArrayWrapper; } //_.head From 03c147ba8315a27d92a7045a3e9571fb460b4d8d Mon Sep 17 00:00:00 2001 From: Niall Crosby Date: Fri, 9 Oct 2015 14:35:16 +0100 Subject: [PATCH 28/30] added tests --- ag-grid/ag-grid-tests.ts | 137 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 ag-grid/ag-grid-tests.ts diff --git a/ag-grid/ag-grid-tests.ts b/ag-grid/ag-grid-tests.ts new file mode 100644 index 000000000..caac59240 --- /dev/null +++ b/ag-grid/ag-grid-tests.ts @@ -0,0 +1,137 @@ +/// + +checkGridOptions({}); +checkColDef({}); + +function checkGridOptions(gridOptions: ag.grid.GridOptions): void { + + gridOptions.virtualPaging = true; + gridOptions.toolPanelSuppressPivot = true; + gridOptions.toolPanelSuppressValues = true; + gridOptions.rowsAlreadyGrouped = true; + gridOptions.suppressRowClickSelection = true; + gridOptions.suppressCellSelection = true; + gridOptions.sortingOrder = ['asc','desc']; + gridOptions.suppressMultiSort = true; + gridOptions.suppressHorizontalScroll = true; + gridOptions.unSortIcon = true; + gridOptions.rowHeight = 0; + gridOptions.rowBuffer = 0; + gridOptions.enableColResize = true; + gridOptions.enableCellExpressions = true; + gridOptions.enableSorting = true; + gridOptions.enableServerSideSorting = true; + gridOptions.enableFilter = true; + gridOptions.enableServerSideFilter = true; + gridOptions.colWidth = 0; + gridOptions.suppressMenuHide = true; + gridOptions.singleClickEdit = true; + gridOptions.debug = true; + gridOptions.icons = {}; + gridOptions.angularCompileRows = true; + gridOptions.angularCompileFilters = true; + gridOptions.angularCompileHeaders = true; + gridOptions.localeText = {}; + gridOptions.localeTextFunc = function() {} + gridOptions.suppressScrollLag = true; + gridOptions.groupSuppressAutoColumn = true; + gridOptions.groupSelectsChildren = true; + gridOptions.groupHidePivotColumns = true; + gridOptions.groupIncludeFooter = true; + gridOptions.groupUseEntireRow = true; + gridOptions.groupSuppressRow = true; + gridOptions.groupSuppressBlankHeader = true; + gridOptions.forPrint = true; + gridOptions.groupColumnDef = {}; + gridOptions.context = {}; + gridOptions.rowStyle = {color: 'red'}; + gridOptions.rowClass = 'green'; + gridOptions.groupDefaultExpanded = false; + gridOptions.slaveGrids = []; + gridOptions.rowSelection = 'single'; + gridOptions.rowDeselection = true; + gridOptions.rowData = []; + gridOptions.floatingTopRowData = []; + gridOptions.floatingBottomRowData = []; + gridOptions.showToolPanel = true; + gridOptions.groupKeys = ['a','b'] + gridOptions.groupAggFields = ['a','b'] + gridOptions.columnDefs = []; + gridOptions.datasource = {}; + gridOptions.pinnedColumnCount = 0; + gridOptions.groupHeaders = true; + gridOptions.headerHeight = 0; + gridOptions.groupRowInnerRenderer = function(params) {}; + gridOptions.groupRowRenderer = {}; + gridOptions.isScrollLag = function() {return true;} + gridOptions.isExternalFilterPresent = function() { return true; }; + gridOptions.doesExternalFilterPass = function(node: ag.grid.RowNode) { return false; }; + gridOptions.getRowStyle = function() {}; + gridOptions.getRowClass = function() {}; + gridOptions.headerCellRenderer = function() {}; + gridOptions.groupAggFunction = function(nodes: any[]) {}; + gridOptions.onReady = function(api: any) {}; + gridOptions.onModelUpdated = function() {}; + gridOptions.onCellClicked = function(params) {}; + gridOptions.onCellDoubleClicked = function(params) {}; + gridOptions.onCellContextMenu = function(params) {}; + gridOptions.onCellValueChanged = function(params) {}; + gridOptions.onCellFocused = function(params) {}; + gridOptions.onRowSelected = function(params) {}; + gridOptions.onSelectionChanged = function() {}; + gridOptions.onBeforeFilterChanged = function() {}; + gridOptions.onAfterFilterChanged = function() {}; + gridOptions.onFilterModified = function() {}; + gridOptions.onBeforeSortChanged = function() {}; + gridOptions.onAfterSortChanged = function() {}; + gridOptions.onVirtualRowRemoved = function(params) {}; + gridOptions.onRowClicked = function(params) {}; + gridOptions.api = null; + gridOptions.columnApi = null; + +} + +function checkColDef(colDef: ag.grid.ColDef): void { + + colDef.sort = 'test'; + colDef.sortedAt = 0; + colDef.sortingOrder ['asc','desc']; + colDef.headerName = 'test'; + colDef.field = 'test'; + colDef.headerValueGetter = 'test'; + colDef.colId = 'test'; + colDef.hide = true; + colDef.headerTooltip = 'test'; + colDef.valueGetter = 'test'; + colDef.headerCellRenderer = {}; + colDef.headerClass = 'test'; + colDef.width = 0; + colDef.minWidth = 0; + colDef.maxWidth = 0; + colDef.cellClass = 'test'; + colDef.cellStyle = {color: 'test'}; + colDef.cellRenderer = function() {}; + colDef.floatingCellRenderer = function() {}; + colDef.aggFunc = 'test'; + colDef.comparator = function() {}; + colDef.checkboxSelection = true; + colDef.suppressMenu = true; + colDef.suppressSorting = true; + colDef.unSortIcon = true; + colDef.suppressSizeToFit = true; + colDef.suppressResize = true; + colDef.headerGroup = 'test'; + colDef.headerGroupShow = 'test'; + colDef.editable = true; + colDef.newValueHandler = function() {}; + colDef.volatile = true; + colDef.template = 'test'; + colDef.templateUrl = 'test'; + colDef.filter = 'test'; + colDef.filterParams = {} + colDef.onCellValueChanged = function() {}; + colDef.onCellClicked = function() {}; + colDef.onCellDoubleClicked = function() {}; + colDef.onCellContextMenu = function() {}; + colDef.cellClassRules = {}; +} From e5e158c56b6ec7aa75169d4721e732d4bc716fd0 Mon Sep 17 00:00:00 2001 From: Niall Crosby Date: Fri, 9 Oct 2015 14:39:03 +0100 Subject: [PATCH 29/30] typos in last commit --- ag-grid/ag-grid-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ag-grid/ag-grid-tests.ts b/ag-grid/ag-grid-tests.ts index caac59240..67b98f9f3 100644 --- a/ag-grid/ag-grid-tests.ts +++ b/ag-grid/ag-grid-tests.ts @@ -95,7 +95,7 @@ function checkColDef(colDef: ag.grid.ColDef): void { colDef.sort = 'test'; colDef.sortedAt = 0; - colDef.sortingOrder ['asc','desc']; + colDef.sortingOrder = ['asc','desc']; colDef.headerName = 'test'; colDef.field = 'test'; colDef.headerValueGetter = 'test'; @@ -128,7 +128,7 @@ function checkColDef(colDef: ag.grid.ColDef): void { colDef.template = 'test'; colDef.templateUrl = 'test'; colDef.filter = 'test'; - colDef.filterParams = {} + colDef.filterParams = {}; colDef.onCellValueChanged = function() {}; colDef.onCellClicked = function() {}; colDef.onCellDoubleClicked = function() {}; From 6560904177e945368fc91b986c1498d3d7d82f00 Mon Sep 17 00:00:00 2001 From: vvakame Date: Tue, 13 Oct 2015 00:16:22 +0900 Subject: [PATCH 30/30] move backbone.d.ts to backbone-global.d.ts --- backbone/backbone-global.d.ts | 375 +++++++++++++++++++++++++ backbone/backbone-with-lodash-tests.ts | 314 +++++++++++++++++++++ backbone/backbone.d.ts | 372 +----------------------- 3 files changed, 691 insertions(+), 370 deletions(-) create mode 100644 backbone/backbone-global.d.ts create mode 100644 backbone/backbone-with-lodash-tests.ts diff --git a/backbone/backbone-global.d.ts b/backbone/backbone-global.d.ts new file mode 100644 index 000000000..4e40687a8 --- /dev/null +++ b/backbone/backbone-global.d.ts @@ -0,0 +1,375 @@ +// Type definitions for Backbone 1.0.0 +// Project: http://backbonejs.org/ +// Definitions by: Boris Yankov , Natan Vivo +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module Backbone { + + interface AddOptions extends Silenceable { + at?: number; + } + + interface HistoryOptions extends Silenceable { + pushState?: boolean; + root?: string; + } + + interface NavigateOptions { + trigger?: boolean; + replace?: boolean; + } + + interface RouterOptions { + routes: any; + } + + interface Silenceable { + silent?: boolean; + } + + interface Validable { + validate?: boolean; + } + + interface Waitable { + wait?: boolean; + } + + interface Parseable { + parse?: any; + } + + interface PersistenceOptions { + url?: string; + beforeSend?: (jqxhr: JQueryXHR) => void; + success?: (modelOrCollection?: any, response?: any, options?: any) => void; + error?: (modelOrCollection?: any, jqxhr?: JQueryXHR, options?: any) => void; + } + + interface ModelSetOptions extends Silenceable, Validable { + } + + interface ModelFetchOptions extends PersistenceOptions, ModelSetOptions, Parseable { + } + + interface ModelSaveOptions extends Silenceable, Waitable, Validable, Parseable, PersistenceOptions { + patch?: boolean; + } + + interface ModelDestroyOptions extends Waitable, PersistenceOptions { + } + + interface CollectionFetchOptions extends PersistenceOptions, Parseable { + reset?: boolean; + } + + class Events { + on(eventName: string, callback?: Function, context?: any): any; + off(eventName?: string, callback?: Function, context?: any): any; + trigger(eventName: string, ...args: any[]): any; + bind(eventName: string, callback: Function, context?: any): any; + unbind(eventName?: string, callback?: Function, context?: any): any; + + once(events: string, callback: Function, context?: any): any; + listenTo(object: any, events: string, callback: Function): any; + listenToOnce(object: any, events: string, callback: Function): any; + stopListening(object?: any, events?: string, callback?: Function): any; + } + + class ModelBase extends Events { + url: any; + parse(response: any, options?: any): any; + toJSON(options?: any): any; + sync(...arg: any[]): JQueryXHR; + } + + class Model extends ModelBase { + + /** + * Do not use, prefer TypeScript's extend functionality. + **/ + private static extend(properties: any, classProperties?: any): any; + + attributes: any; + changed: any[]; + cid: string; + collection: Collection; + + /** + * Default attributes for the model. It can be an object hash or a method returning an object hash. + * For assigning an object hash, do it like this: this.defaults = { attribute: value, ... }; + * That works only if you set it in the constructor or the initialize method. + **/ + defaults(): any; + id: any; + idAttribute: string; + validationError: any; + urlRoot: any; + + constructor(attributes?: any, options?: any); + initialize(attributes?: any, options?: any): void; + + fetch(options?: ModelFetchOptions): JQueryXHR; + + /** + * For strongly-typed access to attributes, use the `get` method only privately in public getter properties. + * @example + * get name(): string { + * return super.get("name"); + * } + **/ + /*private*/ get(attributeName: string): any; + + /** + * For strongly-typed assignment of attributes, use the `set` method only privately in public setter properties. + * @example + * set name(value: string) { + * super.set("name", value); + * } + **/ + /*private*/ set(attributeName: string, value: any, options?: ModelSetOptions): Model; + set(obj: any, options?: ModelSetOptions): Model; + + change(): any; + changedAttributes(attributes?: any): any[]; + clear(options?: Silenceable): any; + clone(): Model; + destroy(options?: ModelDestroyOptions): any; + escape(attribute: string): string; + has(attribute: string): boolean; + hasChanged(attribute?: string): boolean; + isNew(): boolean; + isValid(options?:any): boolean; + previous(attribute: string): any; + previousAttributes(): any[]; + save(attributes?: any, options?: ModelSaveOptions): any; + unset(attribute: string, options?: Silenceable): Model; + validate(attributes: any, options?: any): any; + + private _validate(attributes: any, options: any): boolean; + + // mixins from underscore + + keys(): string[]; + values(): any[]; + pairs(): any[]; + invert(): any; + pick(keys: string[]): any; + pick(...keys: string[]): any; + omit(keys: string[]): any; + omit(...keys: string[]): any; + } + + class Collection extends ModelBase { + + /** + * Do not use, prefer TypeScript's extend functionality. + **/ + private static extend(properties: any, classProperties?: any): any; + + model: new (...args:any[]) => TModel; + models: TModel[]; + length: number; + + constructor(models?: TModel[] | Object[], options?: any); + initialize(models?: TModel[] | Object[], options?: any): void; + + fetch(options?: CollectionFetchOptions): JQueryXHR; + + comparator(element: TModel): number; + comparator(compare: TModel, to?: TModel): number; + + add(model: {}|TModel, options?: AddOptions): TModel; + add(models: ({}|TModel)[], options?: AddOptions): TModel[]; + at(index: number): TModel; + /** + * Get a model from a collection, specified by an id, a cid, or by passing in a model. + **/ + get(id: number|string|Model): TModel; + create(attributes: any, options?: ModelSaveOptions): TModel; + pluck(attribute: string): any[]; + push(model: TModel, options?: AddOptions): TModel; + pop(options?: Silenceable): TModel; + remove(model: TModel, options?: Silenceable): TModel; + remove(models: TModel[], options?: Silenceable): TModel[]; + reset(models?: TModel[], options?: Silenceable): TModel[]; + set(models?: TModel[], options?: Silenceable): TModel[]; + shift(options?: Silenceable): TModel; + sort(options?: Silenceable): Collection; + unshift(model: TModel, options?: AddOptions): TModel; + where(properties: any): TModel[]; + findWhere(properties: any): TModel; + + private _prepareModel(attributes?: any, options?: any): any; + private _removeReference(model: TModel): void; + private _onModelEvent(event: string, model: TModel, collection: Collection, options: any): void; + + // mixins from underscore + + all(iterator: (element: TModel, index: number) => boolean, context?: any): boolean; + any(iterator: (element: TModel, index: number) => boolean, context?: any): boolean; + collect(iterator: (element: TModel, index: number, context?: any) => any[], context?: any): any[]; + chain(): any; + contains(value: any): boolean; + countBy(iterator: (element: TModel, index: number) => any): _.Dictionary; + countBy(attribute: string): _.Dictionary; + detect(iterator: (item: any) => boolean, context?: any): any; // ??? + drop(): TModel; + drop(n: number): TModel[]; + each(iterator: (element: TModel, index: number, list?: any) => void, context?: any): any; + every(iterator: (element: TModel, index: number) => boolean, context?: any): boolean; + filter(iterator: (element: TModel, index: number) => boolean, context?: any): TModel[]; + find(iterator: (element: TModel, index: number) => boolean, context?: any): TModel; + first(): TModel; + first(n: number): TModel[]; + foldl(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any; + forEach(iterator: (element: TModel, index: number, list?: any) => void, context?: any): any; + groupBy(iterator: (element: TModel, index: number) => string, context?: any): _.Dictionary; + groupBy(attribute: string, context?: any): _.Dictionary; + include(value: any): boolean; + indexOf(element: TModel, isSorted?: boolean): number; + initial(): TModel; + initial(n: number): TModel[]; + inject(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any; + isEmpty(object: any): boolean; + invoke(methodName: string, args?: any[]): any; + last(): TModel; + last(n: number): TModel[]; + lastIndexOf(element: TModel, fromIndex?: number): number; + map(iterator: (element: TModel, index: number, context?: any) => any, context?: any): any[]; + max(iterator?: (element: TModel, index: number) => any, context?: any): TModel; + min(iterator?: (element: TModel, index: number) => any, context?: any): TModel; + reduce(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any; + select(iterator: any, context?: any): any[]; + size(): number; + shuffle(): any[]; + slice(min: number, max?: number): TModel[]; + some(iterator: (element: TModel, index: number) => boolean, context?: any): boolean; + sortBy(iterator: (element: TModel, index: number) => number, context?: any): TModel[]; + sortBy(attribute: string, context?: any): TModel[]; + sortedIndex(element: TModel, iterator?: (element: TModel, index: number) => number): number; + reduceRight(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any[]; + reject(iterator: (element: TModel, index: number) => boolean, context?: any): TModel[]; + rest(): TModel; + rest(n: number): TModel[]; + tail(): TModel; + tail(n: number): TModel[]; + toArray(): any[]; + without(...values: any[]): TModel[]; + } + + class Router extends Events { + + /** + * Do not use, prefer TypeScript's extend functionality. + **/ + private static extend(properties: any, classProperties?: any): any; + + /** + * Routes hash or a method returning the routes hash that maps URLs with parameters to methods on your Router. + * For assigning routes as object hash, do it like this: this.routes = { "route": callback, ... }; + * That works only if you set it in the constructor or the initialize method. + **/ + routes: any; + + constructor(options?: RouterOptions); + initialize(options?: RouterOptions): void; + route(route: string|RegExp, name: string, callback?: Function): Router; + navigate(fragment: string, options?: NavigateOptions): Router; + navigate(fragment: string, trigger?: boolean): Router; + + private _bindRoutes(): void; + private _routeToRegExp(route: string): RegExp; + private _extractParameters(route: RegExp, fragment: string): string[]; + } + + var history: History; + + class History extends Events { + + handlers: any[]; + interval: number; + + start(options?: HistoryOptions): boolean; + + getHash(window?: Window): string; + getFragment(fragment?: string, forcePushState?: boolean): string; + stop(): void; + route(route: string, callback: Function): number; + checkUrl(e?: any): void; + loadUrl(fragmentOverride: string): boolean; + navigate(fragment: string, options?: any): boolean; + started: boolean; + options: any; + + private _updateHash(location: Location, fragment: string, replace: boolean): void; + } + + interface ViewOptions { + model?: TModel; + // TODO: quickfix, this can't be fixed easy. The collection does not need to have the same model as the parent view. + collection?: Backbone.Collection; + el?: any; + id?: string; + className?: string; + tagName?: string; + attributes?: {[id: string]: any}; + } + + class View extends Events { + + /** + * Do not use, prefer TypeScript's extend functionality. + **/ + private static extend(properties: any, classProperties?: any): any; + + constructor(options?: ViewOptions); + initialize(options?: ViewOptions): void; + + /** + * Events hash or a method returning the events hash that maps events/selectors to methods on your View. + * For assigning events as object hash, do it like this: this.events = { "event:selector": callback, ... }; + * That works only if you set it in the constructor or the initialize method. + **/ + events(): any; + + $(selector: string): JQuery; + model: TModel; + collection: Collection; + //template: (json, options?) => string; + setElement(element: HTMLElement|JQuery, delegate?: boolean): View; + id: string; + cid: string; + className: string; + tagName: string; + + el: any; + $el: JQuery; + setElement(element: any): View; + attributes: any; + $(selector: any): JQuery; + render(): View; + remove(): View; + make(tagName: any, attributes?: any, content?: any): any; + delegateEvents(events?: any): any; + undelegateEvents(): any; + + _ensureElement(): void; + } + + // SYNC + function sync(method: string, model: Model, options?: JQueryAjaxSettings): any; + function ajax(options?: JQueryAjaxSettings): JQueryXHR; + var emulateHTTP: boolean; + var emulateJSON: boolean; + + // Utility + function noConflict(): typeof Backbone; + var $: JQueryStatic; +} + +declare module "backbone" { + export = Backbone; +} diff --git a/backbone/backbone-with-lodash-tests.ts b/backbone/backbone-with-lodash-tests.ts new file mode 100644 index 000000000..c4f5fdf4d --- /dev/null +++ b/backbone/backbone-with-lodash-tests.ts @@ -0,0 +1,314 @@ +/// +/// +/// + +function test_events() { + + var object = new Backbone.Events(); + object.on("alert", (eventName: string) => alert("Triggered " + eventName)); + + object.trigger("alert", "an event"); + + var onChange = () => alert('whatever'); + var context: any; + + object.off("change", onChange); + object.off("change"); + object.off(null, onChange); + object.off(null, null, context); + object.off(); +} + +class SettingDefaults extends Backbone.Model { + + // 'defaults' could be set in one of the following ways: + + defaults() { + return { + name: "Joe" + } + } + + constructor(attributes?: any, options?: any) { + this.defaults = { + name: "Joe" + } + // super has to come last + super(attributes, options); + } + + // or set it like this + initialize() { + this.defaults = { + name: "Joe" + } + + } + + // same patterns could be used for setting 'Router.routes' and 'View.events' +} + +class Sidebar extends Backbone.Model { + + promptColor() { + var cssColor = prompt("Please enter a CSS color:"); + this.set({ color: cssColor }); + } +} + +class Note extends Backbone.Model { + initialize() { } + author() { } + coordinates() { } + allowedToEdit(account: any) { + return true; + } +} + +class PrivateNote extends Note { + allowedToEdit(account: any) { + return account.owns(this); + } + + set(attributes: any, options?: any): Backbone.Model { + return Backbone.Model.prototype.set.call(this, attributes, options); + } +} + +function test_models() { + + var sidebar = new Sidebar(); + sidebar.on('change:color', (model: {}, color: string) => $('#sidebar').css({ background: color })); + sidebar.set({ color: 'white' }); + sidebar.promptColor(); + + ////////// + + var note = new PrivateNote(); + + note.get("title"); + + note.set({ title: "March 20", content: "In his eyes she eclipses..." }); + + note.set("title", "A Scandal in Bohemia"); +} + +class Employee extends Backbone.Model { + reports: EmployeeCollection; + + constructor(attributes?: any, options?: any) { + super(options); + this.reports = new EmployeeCollection(); + this.reports.url = '../api/employees/' + this.id + '/reports'; + } + + more() { + this.reports.reset(); + } +} + +class EmployeeCollection extends Backbone.Collection { + findByName(key: any) { } +} + +class Book extends Backbone.Model { + title: string; + author: string; + published: boolean; +} + +class Library extends Backbone.Collection { + // This model definition is here only to test type compatibility of the model, but it + // is not necessary in working code as it is automatically inferred through generics. + model: typeof Book; +} + +class Books extends Backbone.Collection { } + +function test_collection() { + + var books = new Books(); + + var book1: Book = new Book({ title: "Title 1", author: "Mike" }); + books.add(book1); + + // Objects can be added to collection by casting to model type. + // Compiler will check if object properties are valid for the cast. + // This gives better type checking than declaring an `any` overload. + books.add({ title: "Title 2", author: "Mikey" }); + + var model: Book = book1.collection.first(); + if (model !== book1) { + throw new Error("Error"); + } + + books.each(book => + book.get("title")); + + var titles = books.map(book => + book.get("title")); + + var publishedBooks = books.filter(book => + book.get("published") === true); + + var alphabetical = books.sortBy((book: Book): number => null); +} + +////////// + +Backbone.history.start(); + +module v1Changes { + module events { + function test_once() { + var model = new Employee; + model.once('invalid', () => { }, this); + model.once('invalid', () => { }); + } + + function test_listenTo() { + var model = new Employee; + var view = new Backbone.View(); + view.listenTo(model, 'invalid', () => { }); + } + + function test_listenToOnce() { + var model = new Employee; + var view = new Backbone.View(); + view.listenToOnce(model, 'invalid', () => { }); + } + + function test_stopListening() { + var model = new Employee; + var view = new Backbone.View(); + view.stopListening(model, 'invalid', () => { }); + view.stopListening(model, 'invalid'); + view.stopListening(model); + } + } + + module ModelAndCollection { + function test_url() { + Employee.prototype.url = () => '/employees'; + EmployeeCollection.prototype.url = () => '/employees'; + } + + function test_parse() { + var model = new Employee(); + model.parse('{}', {}); + var collection = new EmployeeCollection; + collection.parse('{}', {}); + } + + function test_toJSON() { + var model = new Employee(); + model.toJSON({}); + var collection = new EmployeeCollection; + collection.toJSON({}); + } + + function test_sync() { + var model = new Employee(); + model.sync(); + var collection = new EmployeeCollection; + collection.sync(); + } + } + + module Model { + function test_validationError() { + var model = new Employee; + if (model.validationError) { + console.log('has validation errors'); + } + } + + function test_fetch() { + var model = new Employee({ id: 1 }); + model.fetch({ + success: () => { }, + error: () => { } + }); + } + + function test_set() { + var model = new Employee; + model.set({ name: 'JoeDoe', age: 21 }, { validate: false }); + model.set('name', 'JoeDoes', { validate: false }); + } + + function test_destroy() { + var model = new Employee; + model.destroy({ + wait: true, + success: (m?, response?, options?) => { }, + error: (m?, jqxhr?, options?) => { } + }); + + model.destroy({ + success: (m?, response?, options?) => { }, + error: (m?, jqxhr?) => { } + }); + + model.destroy({ + success: () => { }, + error: (m?, jqxhr?) => { } + }); + } + + function test_save() { + var model = new Employee; + + model.save({ + name: 'Joe Doe', + age: 21 + }, + { + wait: true, + validate: false, + success: (m?, response?, options?) => { }, + error: (m?, jqxhr?, options?) => { } + }); + + model.save({ + name: 'Joe Doe', + age: 21 + }, + { + success: () => { }, + error: (m?, jqxhr?) => { } + }); + } + + function test_validate() { + var model = new Employee; + + model.validate({ name: 'JoeDoe', age: 21 }, { validateAge: false }) + } + } + + module Collection { + function test_fetch() { + var collection = new EmployeeCollection; + collection.fetch({ reset: true }); + } + + function test_create() { + var collection = new EmployeeCollection; + var model = new Employee; + + collection.create(model, { + validate: false + }); + } + } + + module Router { + function test_navigate() { + var router = new Backbone.Router; + + router.navigate('/employees', { trigger: true }); + router.navigate('/employees', true); + } + } +} diff --git a/backbone/backbone.d.ts b/backbone/backbone.d.ts index 4e40687a8..3b777e581 100644 --- a/backbone/backbone.d.ts +++ b/backbone/backbone.d.ts @@ -3,373 +3,5 @@ // Definitions by: Boris Yankov , Natan Vivo // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// - -declare module Backbone { - - interface AddOptions extends Silenceable { - at?: number; - } - - interface HistoryOptions extends Silenceable { - pushState?: boolean; - root?: string; - } - - interface NavigateOptions { - trigger?: boolean; - replace?: boolean; - } - - interface RouterOptions { - routes: any; - } - - interface Silenceable { - silent?: boolean; - } - - interface Validable { - validate?: boolean; - } - - interface Waitable { - wait?: boolean; - } - - interface Parseable { - parse?: any; - } - - interface PersistenceOptions { - url?: string; - beforeSend?: (jqxhr: JQueryXHR) => void; - success?: (modelOrCollection?: any, response?: any, options?: any) => void; - error?: (modelOrCollection?: any, jqxhr?: JQueryXHR, options?: any) => void; - } - - interface ModelSetOptions extends Silenceable, Validable { - } - - interface ModelFetchOptions extends PersistenceOptions, ModelSetOptions, Parseable { - } - - interface ModelSaveOptions extends Silenceable, Waitable, Validable, Parseable, PersistenceOptions { - patch?: boolean; - } - - interface ModelDestroyOptions extends Waitable, PersistenceOptions { - } - - interface CollectionFetchOptions extends PersistenceOptions, Parseable { - reset?: boolean; - } - - class Events { - on(eventName: string, callback?: Function, context?: any): any; - off(eventName?: string, callback?: Function, context?: any): any; - trigger(eventName: string, ...args: any[]): any; - bind(eventName: string, callback: Function, context?: any): any; - unbind(eventName?: string, callback?: Function, context?: any): any; - - once(events: string, callback: Function, context?: any): any; - listenTo(object: any, events: string, callback: Function): any; - listenToOnce(object: any, events: string, callback: Function): any; - stopListening(object?: any, events?: string, callback?: Function): any; - } - - class ModelBase extends Events { - url: any; - parse(response: any, options?: any): any; - toJSON(options?: any): any; - sync(...arg: any[]): JQueryXHR; - } - - class Model extends ModelBase { - - /** - * Do not use, prefer TypeScript's extend functionality. - **/ - private static extend(properties: any, classProperties?: any): any; - - attributes: any; - changed: any[]; - cid: string; - collection: Collection; - - /** - * Default attributes for the model. It can be an object hash or a method returning an object hash. - * For assigning an object hash, do it like this: this.defaults = { attribute: value, ... }; - * That works only if you set it in the constructor or the initialize method. - **/ - defaults(): any; - id: any; - idAttribute: string; - validationError: any; - urlRoot: any; - - constructor(attributes?: any, options?: any); - initialize(attributes?: any, options?: any): void; - - fetch(options?: ModelFetchOptions): JQueryXHR; - - /** - * For strongly-typed access to attributes, use the `get` method only privately in public getter properties. - * @example - * get name(): string { - * return super.get("name"); - * } - **/ - /*private*/ get(attributeName: string): any; - - /** - * For strongly-typed assignment of attributes, use the `set` method only privately in public setter properties. - * @example - * set name(value: string) { - * super.set("name", value); - * } - **/ - /*private*/ set(attributeName: string, value: any, options?: ModelSetOptions): Model; - set(obj: any, options?: ModelSetOptions): Model; - - change(): any; - changedAttributes(attributes?: any): any[]; - clear(options?: Silenceable): any; - clone(): Model; - destroy(options?: ModelDestroyOptions): any; - escape(attribute: string): string; - has(attribute: string): boolean; - hasChanged(attribute?: string): boolean; - isNew(): boolean; - isValid(options?:any): boolean; - previous(attribute: string): any; - previousAttributes(): any[]; - save(attributes?: any, options?: ModelSaveOptions): any; - unset(attribute: string, options?: Silenceable): Model; - validate(attributes: any, options?: any): any; - - private _validate(attributes: any, options: any): boolean; - - // mixins from underscore - - keys(): string[]; - values(): any[]; - pairs(): any[]; - invert(): any; - pick(keys: string[]): any; - pick(...keys: string[]): any; - omit(keys: string[]): any; - omit(...keys: string[]): any; - } - - class Collection extends ModelBase { - - /** - * Do not use, prefer TypeScript's extend functionality. - **/ - private static extend(properties: any, classProperties?: any): any; - - model: new (...args:any[]) => TModel; - models: TModel[]; - length: number; - - constructor(models?: TModel[] | Object[], options?: any); - initialize(models?: TModel[] | Object[], options?: any): void; - - fetch(options?: CollectionFetchOptions): JQueryXHR; - - comparator(element: TModel): number; - comparator(compare: TModel, to?: TModel): number; - - add(model: {}|TModel, options?: AddOptions): TModel; - add(models: ({}|TModel)[], options?: AddOptions): TModel[]; - at(index: number): TModel; - /** - * Get a model from a collection, specified by an id, a cid, or by passing in a model. - **/ - get(id: number|string|Model): TModel; - create(attributes: any, options?: ModelSaveOptions): TModel; - pluck(attribute: string): any[]; - push(model: TModel, options?: AddOptions): TModel; - pop(options?: Silenceable): TModel; - remove(model: TModel, options?: Silenceable): TModel; - remove(models: TModel[], options?: Silenceable): TModel[]; - reset(models?: TModel[], options?: Silenceable): TModel[]; - set(models?: TModel[], options?: Silenceable): TModel[]; - shift(options?: Silenceable): TModel; - sort(options?: Silenceable): Collection; - unshift(model: TModel, options?: AddOptions): TModel; - where(properties: any): TModel[]; - findWhere(properties: any): TModel; - - private _prepareModel(attributes?: any, options?: any): any; - private _removeReference(model: TModel): void; - private _onModelEvent(event: string, model: TModel, collection: Collection, options: any): void; - - // mixins from underscore - - all(iterator: (element: TModel, index: number) => boolean, context?: any): boolean; - any(iterator: (element: TModel, index: number) => boolean, context?: any): boolean; - collect(iterator: (element: TModel, index: number, context?: any) => any[], context?: any): any[]; - chain(): any; - contains(value: any): boolean; - countBy(iterator: (element: TModel, index: number) => any): _.Dictionary; - countBy(attribute: string): _.Dictionary; - detect(iterator: (item: any) => boolean, context?: any): any; // ??? - drop(): TModel; - drop(n: number): TModel[]; - each(iterator: (element: TModel, index: number, list?: any) => void, context?: any): any; - every(iterator: (element: TModel, index: number) => boolean, context?: any): boolean; - filter(iterator: (element: TModel, index: number) => boolean, context?: any): TModel[]; - find(iterator: (element: TModel, index: number) => boolean, context?: any): TModel; - first(): TModel; - first(n: number): TModel[]; - foldl(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any; - forEach(iterator: (element: TModel, index: number, list?: any) => void, context?: any): any; - groupBy(iterator: (element: TModel, index: number) => string, context?: any): _.Dictionary; - groupBy(attribute: string, context?: any): _.Dictionary; - include(value: any): boolean; - indexOf(element: TModel, isSorted?: boolean): number; - initial(): TModel; - initial(n: number): TModel[]; - inject(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any; - isEmpty(object: any): boolean; - invoke(methodName: string, args?: any[]): any; - last(): TModel; - last(n: number): TModel[]; - lastIndexOf(element: TModel, fromIndex?: number): number; - map(iterator: (element: TModel, index: number, context?: any) => any, context?: any): any[]; - max(iterator?: (element: TModel, index: number) => any, context?: any): TModel; - min(iterator?: (element: TModel, index: number) => any, context?: any): TModel; - reduce(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any; - select(iterator: any, context?: any): any[]; - size(): number; - shuffle(): any[]; - slice(min: number, max?: number): TModel[]; - some(iterator: (element: TModel, index: number) => boolean, context?: any): boolean; - sortBy(iterator: (element: TModel, index: number) => number, context?: any): TModel[]; - sortBy(attribute: string, context?: any): TModel[]; - sortedIndex(element: TModel, iterator?: (element: TModel, index: number) => number): number; - reduceRight(iterator: (memo: any, element: TModel, index: number) => any, initialMemo: any, context?: any): any[]; - reject(iterator: (element: TModel, index: number) => boolean, context?: any): TModel[]; - rest(): TModel; - rest(n: number): TModel[]; - tail(): TModel; - tail(n: number): TModel[]; - toArray(): any[]; - without(...values: any[]): TModel[]; - } - - class Router extends Events { - - /** - * Do not use, prefer TypeScript's extend functionality. - **/ - private static extend(properties: any, classProperties?: any): any; - - /** - * Routes hash or a method returning the routes hash that maps URLs with parameters to methods on your Router. - * For assigning routes as object hash, do it like this: this.routes = { "route": callback, ... }; - * That works only if you set it in the constructor or the initialize method. - **/ - routes: any; - - constructor(options?: RouterOptions); - initialize(options?: RouterOptions): void; - route(route: string|RegExp, name: string, callback?: Function): Router; - navigate(fragment: string, options?: NavigateOptions): Router; - navigate(fragment: string, trigger?: boolean): Router; - - private _bindRoutes(): void; - private _routeToRegExp(route: string): RegExp; - private _extractParameters(route: RegExp, fragment: string): string[]; - } - - var history: History; - - class History extends Events { - - handlers: any[]; - interval: number; - - start(options?: HistoryOptions): boolean; - - getHash(window?: Window): string; - getFragment(fragment?: string, forcePushState?: boolean): string; - stop(): void; - route(route: string, callback: Function): number; - checkUrl(e?: any): void; - loadUrl(fragmentOverride: string): boolean; - navigate(fragment: string, options?: any): boolean; - started: boolean; - options: any; - - private _updateHash(location: Location, fragment: string, replace: boolean): void; - } - - interface ViewOptions { - model?: TModel; - // TODO: quickfix, this can't be fixed easy. The collection does not need to have the same model as the parent view. - collection?: Backbone.Collection; - el?: any; - id?: string; - className?: string; - tagName?: string; - attributes?: {[id: string]: any}; - } - - class View extends Events { - - /** - * Do not use, prefer TypeScript's extend functionality. - **/ - private static extend(properties: any, classProperties?: any): any; - - constructor(options?: ViewOptions); - initialize(options?: ViewOptions): void; - - /** - * Events hash or a method returning the events hash that maps events/selectors to methods on your View. - * For assigning events as object hash, do it like this: this.events = { "event:selector": callback, ... }; - * That works only if you set it in the constructor or the initialize method. - **/ - events(): any; - - $(selector: string): JQuery; - model: TModel; - collection: Collection; - //template: (json, options?) => string; - setElement(element: HTMLElement|JQuery, delegate?: boolean): View; - id: string; - cid: string; - className: string; - tagName: string; - - el: any; - $el: JQuery; - setElement(element: any): View; - attributes: any; - $(selector: any): JQuery; - render(): View; - remove(): View; - make(tagName: any, attributes?: any, content?: any): any; - delegateEvents(events?: any): any; - undelegateEvents(): any; - - _ensureElement(): void; - } - - // SYNC - function sync(method: string, model: Model, options?: JQueryAjaxSettings): any; - function ajax(options?: JQueryAjaxSettings): JQueryXHR; - var emulateHTTP: boolean; - var emulateJSON: boolean; - - // Utility - function noConflict(): typeof Backbone; - var $: JQueryStatic; -} - -declare module "backbone" { - export = Backbone; -} +/// +///