From b3d5f7e64a34a6637198502c58b4b63bb8d114fb Mon Sep 17 00:00:00 2001 From: Arthur Langereis Date: Tue, 6 Oct 2015 14:50:10 +0200 Subject: [PATCH 001/615] add missing optional attributes parameter for getContext() and missing context attribute defs, thanks to @ander-nz --- webgl-ext/webgl-ext.d.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/webgl-ext/webgl-ext.d.ts b/webgl-ext/webgl-ext.d.ts index c6a8cb34a1..42a4ee21b8 100644 --- a/webgl-ext/webgl-ext.d.ts +++ b/webgl-ext/webgl-ext.d.ts @@ -6,9 +6,19 @@ // These definitions go beyond those already defined in TS 1.6.2 stdlib // All non-draft WebGL 1.0 extensions and prefixed extension names are // covered. +// Some missing parameters for getContext and fields for +// WebGLContextAttributes are added as well, copied over from +// Shane Anderson's webgl interfaces. + + +interface WebGLContextAttributes { + preferLowPowerToHighPerformance?: boolean; + failIfMajorPerformanceCaveat?: boolean; +} interface HTMLCanvasElement { - getContext(contextId: "webgl"): WebGLRenderingContext; + getContext(contextId: "experimental-webgl", attributes?: WebGLContextAttributes): WebGLRenderingContext; + getContext(contextId: "webgl", attributes?: WebGLContextAttributes): WebGLRenderingContext; } interface WebGLRenderingContext { From 09218a9c29af6d9b887c8b9bf593001e737addf2 Mon Sep 17 00:00:00 2001 From: Arthur Langereis Date: Wed, 7 Oct 2015 10:55:34 +0200 Subject: [PATCH 002/615] name update --- webgl-ext/webgl-ext.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webgl-ext/webgl-ext.d.ts b/webgl-ext/webgl-ext.d.ts index 42a4ee21b8..5be2ee07c3 100644 --- a/webgl-ext/webgl-ext.d.ts +++ b/webgl-ext/webgl-ext.d.ts @@ -8,7 +8,7 @@ // covered. // Some missing parameters for getContext and fields for // WebGLContextAttributes are added as well, copied over from -// Shane Anderson's webgl interfaces. +// Shane S. Anderson's definitions file. interface WebGLContextAttributes { From 09ca290d319700137d9a5fc66ce9f39f5813fee5 Mon Sep 17 00:00:00 2001 From: Arthur Langereis Date: Wed, 7 Oct 2015 11:15:03 +0200 Subject: [PATCH 003/615] add pre-defined attrs and link to spec for WebGLContextAttributes --- webgl-ext/webgl-ext.d.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/webgl-ext/webgl-ext.d.ts b/webgl-ext/webgl-ext.d.ts index 5be2ee07c3..f29d2c98d2 100644 --- a/webgl-ext/webgl-ext.d.ts +++ b/webgl-ext/webgl-ext.d.ts @@ -6,14 +6,28 @@ // These definitions go beyond those already defined in TS 1.6.2 stdlib // All non-draft WebGL 1.0 extensions and prefixed extension names are // covered. -// Some missing parameters for getContext and fields for +// Some missing parameters for getContext and attributes for // WebGLContextAttributes are added as well, copied over from // Shane S. Anderson's definitions file. interface WebGLContextAttributes { + // The following attributes are missing from TypeScript 1.6.2's lib.d.ts preferLowPowerToHighPerformance?: boolean; failIfMajorPerformanceCaveat?: boolean; + + // All others duplicated here for reference + /* + alpha?: boolean; + depth?: boolean; + stencil?: boolean; + antialias?: boolean; + premultipliedAlpha?: boolean; + preserveDrawingBuffer?: boolean; + */ + + // For the meanings and default values of these attributes, see the full spec at: + // https://www.khronos.org/registry/webgl/specs/latest/1.0/index.html#5.2 } interface HTMLCanvasElement { From 153565562fdf09b69b752b23be57d807f36bd183 Mon Sep 17 00:00:00 2001 From: Jim Buck Date: Tue, 30 Aug 2016 00:23:18 -0400 Subject: [PATCH 004/615] Initial definition setup for Vorpal. --- vorpal/vorpal-tests.ts | 8 +++ vorpal/vorpal.d.ts | 117 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 vorpal/vorpal-tests.ts create mode 100644 vorpal/vorpal.d.ts diff --git a/vorpal/vorpal-tests.ts b/vorpal/vorpal-tests.ts new file mode 100644 index 0000000000..a1dd744648 --- /dev/null +++ b/vorpal/vorpal-tests.ts @@ -0,0 +1,8 @@ +/// + +let vorpal = require('vorpal'); + +let app: VorpalInstance = vorpal(); + +app + .parse(process.argv); diff --git a/vorpal/vorpal.d.ts b/vorpal/vorpal.d.ts new file mode 100644 index 0000000000..fcd189257f --- /dev/null +++ b/vorpal/vorpal.d.ts @@ -0,0 +1,117 @@ +// Type definitions for vorpal 1.11.4 +// Project: https://github.com/dthree/vorpal +// Definitions by: Jim Buck +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare type CallbackFunction = (err: string | Error, data: T) => void; + +declare interface VorpalInstance { + + ui: UiInstance; + + constructor(); + + /** + * Parses the process's `process.argv` arguments and executes the matching command. + * + * @param {IArguments} argv + * @param {*} options When `use: 'minimist'` is passed in as an option, `.parse` will instead expose the `minimist` module's main method and return the results, executing no commands. + */ + parse(argv: string[], options?: {use?: 'minimist'}): void; + + /** + * Sets the prompt delimiter for the given Vorpal instance. + * + * @param {string} str + * @returns {this} + */ + delimiter(str: string): this; + + /** + * Attaches the TTY's CLI prompt to that given instance of Vorpal. + * + * As a note, multiple instances of Vorpal can run in the same Node instance. However, only one can be 'attached' to your TTY. The last instance given the show() command will be attached, and the previously shown instances will detach. + */ + show(): void; + + /** + * Returns a given command by its name. This is used instead of `vorpal.command()` as `.command` will overwrite a given command. If command is not found, `undefined` is returned. + * + * @param {string} name + * @returns {Command} + */ + find(name: string): Command; + + exec(command: string, cb: CallbackFunction): PromiseLike; + + execSync(command: string, options: {fatal: boolean}): T; + + log(message: string, ...messages: string[]); + + history(id: string); + + localStorage(id: string); + + help(strBuilder: (cmd: string) => string); + + pipe(pipeFn: (stdout: string) => string); + + use(extension: string | Function); + + + /** + * Adds a new command to your command line API. + * + * @param {string} command + * @param {string} [description] + * @returns {Command} + */ + command(command: string, description?: string): Command; + + catch(command: string, description?: string): Command; + + mode(command: string, description?: string): Mode; +} + +declare interface UiInstance { + + redraw: RedrawMethod; + + delimiter(text?: string); + + input(text?: string); + + imprint(); + + submit(text: string); + + cancel(); +} + +declare interface RedrawMethod +{ + (text: string, ...texts: string[]); + + clear(); + done(); +} + +declare interface Command { + +} + +declare interface Mode { + description(desc: string): this; + + delimiter(str: string): this; + + init(initFn: (args: any, callback: CallbackFunction) => void): this; + + action(actionFn: (command: string, callback: CallbackFunction) => void | T): this; +} + +declare module "vorpal" { + export = VorpalInstance; +} From 6c9414ca55ac950f7a6661413af6b15e0f827929 Mon Sep 17 00:00:00 2001 From: Jim Buck Date: Tue, 30 Aug 2016 20:59:05 -0400 Subject: [PATCH 005/615] Added Command methods. Got tests working. --- vorpal/vorpal-tests.ts | 50 +++++++++++++++++++++-- vorpal/vorpal.d.ts | 92 ++++++++++++++++++++++++++++-------------- 2 files changed, 108 insertions(+), 34 deletions(-) diff --git a/vorpal/vorpal-tests.ts b/vorpal/vorpal-tests.ts index a1dd744648..6650450f69 100644 --- a/vorpal/vorpal-tests.ts +++ b/vorpal/vorpal-tests.ts @@ -1,8 +1,50 @@ -/// +/// -let vorpal = require('vorpal'); +import {Vorpal} from './vorpal'; -let app: VorpalInstance = vorpal(); +declare namespace app { + function execSQL(...args: any[]): PromiseLike; +} -app +// Constructor +let vorpal = new Vorpal(); + +// new-less Constructor +let newLessApp = Vorpal(); + +// Parse +vorpal + .show() .parse(process.argv); + +// Parse Options +var results = vorpal.parse('foo -baz', { use: 'minimist' }); + +new Vorpal().delimiter('unicorn-approved-app$'); + +// Show + +vorpal + .delimiter('pg-cli:') + .show(); + +vorpal + .command('sql ', 'Executes arbitrary sql.') + .action(function (args) { + return app.execSQL(args.query); + }); + +// Show (multiple instances) + +var instances = []; +for (var i = 0; i < 3; ++i) { + instances[i] = new Vorpal() + .delimiter('instance' + i + '~$') + .command('switch ', 'Switches prompt to another instance.') + .action(function (args, cb) { + instances[args.instance].show(); + cb(); + }) +} + +instances[0].show(); \ No newline at end of file diff --git a/vorpal/vorpal.d.ts b/vorpal/vorpal.d.ts index fcd189257f..b327efe825 100644 --- a/vorpal/vorpal.d.ts +++ b/vorpal/vorpal.d.ts @@ -4,23 +4,38 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// +/// -declare type CallbackFunction = (err: string | Error, data: T) => void; +import {} from 'inquirer'; +import {ParsedArgs} from 'minimist'; + +export type CallbackFunction = (err?: string | Error, data?: T) => void; + +interface TypesDefinition +{ + string?: string[]; + number?: string[]; + // TODO: Check other types. +} + +interface VorpalFactory { + new (): VorpalInstance; + + (): VorpalInstance; +} + +interface VorpalInstance { -declare interface VorpalInstance { - ui: UiInstance; - constructor(); - /** * Parses the process's `process.argv` arguments and executes the matching command. * - * @param {IArguments} argv - * @param {*} options When `use: 'minimist'` is passed in as an option, `.parse` will instead expose the `minimist` module's main method and return the results, executing no commands. + * @param {(string|string[])} argv + * @param {{use?: 'minimist'}} [options] When `use: 'minimist'` is passed in as an option, `.parse` will instead expose the `minimist` module's main method and return the results, executing no commands. */ - parse(argv: string[], options?: {use?: 'minimist'}): void; - + parse(argv: string | string[], options?: { use?: 'minimist' }): ParsedArgs; + /** * Sets the prompt delimiter for the given Vorpal instance. * @@ -31,11 +46,12 @@ declare interface VorpalInstance { /** * Attaches the TTY's CLI prompt to that given instance of Vorpal. - * * As a note, multiple instances of Vorpal can run in the same Node instance. However, only one can be 'attached' to your TTY. The last instance given the show() command will be attached, and the previously shown instances will detach. + * + * @returns {this} */ - show(): void; - + show(): this; + /** * Returns a given command by its name. This is used instead of `vorpal.command()` as `.command` will overwrite a given command. If command is not found, `undefined` is returned. * @@ -46,12 +62,12 @@ declare interface VorpalInstance { exec(command: string, cb: CallbackFunction): PromiseLike; - execSync(command: string, options: {fatal: boolean}): T; + execSync(command: string, options: { fatal: boolean }): T; log(message: string, ...messages: string[]); - + history(id: string); - + localStorage(id: string); help(strBuilder: (cmd: string) => string); @@ -60,7 +76,7 @@ declare interface VorpalInstance { use(extension: string | Function); - + /** * Adds a new command to your command line API. * @@ -75,34 +91,47 @@ declare interface VorpalInstance { mode(command: string, description?: string): Mode; } -declare interface UiInstance { +export interface UiInstance { redraw: RedrawMethod; delimiter(text?: string); input(text?: string); - + imprint(); submit(text: string); - + cancel(); } -declare interface RedrawMethod -{ - (text: string, ...texts: string[]); +export function RedrawMethod(text: string): void; +export function RedrawMethod(...texts: string[]): void; - clear(); - done(); +export interface RedrawMethod { + clear(): void; + done(): void; } -declare interface Command { - +export interface Command { + description(description: string): this; + alias(name: string): this; + alias(...names: string[]): this; + parse(parseFn: CommandParseFn): this; + option(flag: string, description: string, autocomplete: string[]): this; // TODO: Check autocomplete types. + types(types: TypesDefinition): this; + hidden(): this; // TODO: Check return type. + remove(); // TODO: Check return type. + help(helpFn: (args) => void); // TODO: Check args type. + validate(validateFn: CommandValidateFn); + autocomplete(choices: string[]): this; + autocomplete(choices: {}): this; // TODO: Revisit this. + autocomplete(choicesFn: CommandAutocompleteFn): this; // TODO: Revisit this. + action(actionFn: CommandActionFn): this; } -declare interface Mode { +export interface Mode { description(desc: string): this; delimiter(str: string): this; @@ -112,6 +141,9 @@ declare interface Mode { action(actionFn: (command: string, callback: CallbackFunction) => void | T): this; } -declare module "vorpal" { - export = VorpalInstance; -} +type CommandParseFn = (command: string, args) => string; // TODO: Check args type. +type CommandValidateFn = (args) => boolean | string; // TODO: Check args type. +type CommandAutocompleteFn = (text: string, iteration: number, cb?: CallbackFunction) => void | PromiseLike; +type CommandActionFn = (args, cb?: CallbackFunction) => void | PromiseLike + +export var Vorpal: VorpalFactory; \ No newline at end of file From b72b21bf19edf63d14149023adf1e0183f43c7eb Mon Sep 17 00:00:00 2001 From: Jim Buck Date: Tue, 30 Aug 2016 00:23:18 -0400 Subject: [PATCH 006/615] Initial definition setup for Vorpal. --- vorpal/vorpal-tests.ts | 8 +++ vorpal/vorpal.d.ts | 117 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 vorpal/vorpal-tests.ts create mode 100644 vorpal/vorpal.d.ts diff --git a/vorpal/vorpal-tests.ts b/vorpal/vorpal-tests.ts new file mode 100644 index 0000000000..a1dd744648 --- /dev/null +++ b/vorpal/vorpal-tests.ts @@ -0,0 +1,8 @@ +/// + +let vorpal = require('vorpal'); + +let app: VorpalInstance = vorpal(); + +app + .parse(process.argv); diff --git a/vorpal/vorpal.d.ts b/vorpal/vorpal.d.ts new file mode 100644 index 0000000000..fcd189257f --- /dev/null +++ b/vorpal/vorpal.d.ts @@ -0,0 +1,117 @@ +// Type definitions for vorpal 1.11.4 +// Project: https://github.com/dthree/vorpal +// Definitions by: Jim Buck +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare type CallbackFunction = (err: string | Error, data: T) => void; + +declare interface VorpalInstance { + + ui: UiInstance; + + constructor(); + + /** + * Parses the process's `process.argv` arguments and executes the matching command. + * + * @param {IArguments} argv + * @param {*} options When `use: 'minimist'` is passed in as an option, `.parse` will instead expose the `minimist` module's main method and return the results, executing no commands. + */ + parse(argv: string[], options?: {use?: 'minimist'}): void; + + /** + * Sets the prompt delimiter for the given Vorpal instance. + * + * @param {string} str + * @returns {this} + */ + delimiter(str: string): this; + + /** + * Attaches the TTY's CLI prompt to that given instance of Vorpal. + * + * As a note, multiple instances of Vorpal can run in the same Node instance. However, only one can be 'attached' to your TTY. The last instance given the show() command will be attached, and the previously shown instances will detach. + */ + show(): void; + + /** + * Returns a given command by its name. This is used instead of `vorpal.command()` as `.command` will overwrite a given command. If command is not found, `undefined` is returned. + * + * @param {string} name + * @returns {Command} + */ + find(name: string): Command; + + exec(command: string, cb: CallbackFunction): PromiseLike; + + execSync(command: string, options: {fatal: boolean}): T; + + log(message: string, ...messages: string[]); + + history(id: string); + + localStorage(id: string); + + help(strBuilder: (cmd: string) => string); + + pipe(pipeFn: (stdout: string) => string); + + use(extension: string | Function); + + + /** + * Adds a new command to your command line API. + * + * @param {string} command + * @param {string} [description] + * @returns {Command} + */ + command(command: string, description?: string): Command; + + catch(command: string, description?: string): Command; + + mode(command: string, description?: string): Mode; +} + +declare interface UiInstance { + + redraw: RedrawMethod; + + delimiter(text?: string); + + input(text?: string); + + imprint(); + + submit(text: string); + + cancel(); +} + +declare interface RedrawMethod +{ + (text: string, ...texts: string[]); + + clear(); + done(); +} + +declare interface Command { + +} + +declare interface Mode { + description(desc: string): this; + + delimiter(str: string): this; + + init(initFn: (args: any, callback: CallbackFunction) => void): this; + + action(actionFn: (command: string, callback: CallbackFunction) => void | T): this; +} + +declare module "vorpal" { + export = VorpalInstance; +} From 858f2ba10daaa7c59a413ae022a4eb9a4394f1f4 Mon Sep 17 00:00:00 2001 From: Jim Buck Date: Tue, 30 Aug 2016 20:59:05 -0400 Subject: [PATCH 007/615] Added Command methods. Got tests working. --- vorpal/vorpal-tests.ts | 50 +++++++++++++++++++++-- vorpal/vorpal.d.ts | 92 ++++++++++++++++++++++++++++-------------- 2 files changed, 108 insertions(+), 34 deletions(-) diff --git a/vorpal/vorpal-tests.ts b/vorpal/vorpal-tests.ts index a1dd744648..6650450f69 100644 --- a/vorpal/vorpal-tests.ts +++ b/vorpal/vorpal-tests.ts @@ -1,8 +1,50 @@ -/// +/// -let vorpal = require('vorpal'); +import {Vorpal} from './vorpal'; -let app: VorpalInstance = vorpal(); +declare namespace app { + function execSQL(...args: any[]): PromiseLike; +} -app +// Constructor +let vorpal = new Vorpal(); + +// new-less Constructor +let newLessApp = Vorpal(); + +// Parse +vorpal + .show() .parse(process.argv); + +// Parse Options +var results = vorpal.parse('foo -baz', { use: 'minimist' }); + +new Vorpal().delimiter('unicorn-approved-app$'); + +// Show + +vorpal + .delimiter('pg-cli:') + .show(); + +vorpal + .command('sql ', 'Executes arbitrary sql.') + .action(function (args) { + return app.execSQL(args.query); + }); + +// Show (multiple instances) + +var instances = []; +for (var i = 0; i < 3; ++i) { + instances[i] = new Vorpal() + .delimiter('instance' + i + '~$') + .command('switch ', 'Switches prompt to another instance.') + .action(function (args, cb) { + instances[args.instance].show(); + cb(); + }) +} + +instances[0].show(); \ No newline at end of file diff --git a/vorpal/vorpal.d.ts b/vorpal/vorpal.d.ts index fcd189257f..b327efe825 100644 --- a/vorpal/vorpal.d.ts +++ b/vorpal/vorpal.d.ts @@ -4,23 +4,38 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// +/// -declare type CallbackFunction = (err: string | Error, data: T) => void; +import {} from 'inquirer'; +import {ParsedArgs} from 'minimist'; + +export type CallbackFunction = (err?: string | Error, data?: T) => void; + +interface TypesDefinition +{ + string?: string[]; + number?: string[]; + // TODO: Check other types. +} + +interface VorpalFactory { + new (): VorpalInstance; + + (): VorpalInstance; +} + +interface VorpalInstance { -declare interface VorpalInstance { - ui: UiInstance; - constructor(); - /** * Parses the process's `process.argv` arguments and executes the matching command. * - * @param {IArguments} argv - * @param {*} options When `use: 'minimist'` is passed in as an option, `.parse` will instead expose the `minimist` module's main method and return the results, executing no commands. + * @param {(string|string[])} argv + * @param {{use?: 'minimist'}} [options] When `use: 'minimist'` is passed in as an option, `.parse` will instead expose the `minimist` module's main method and return the results, executing no commands. */ - parse(argv: string[], options?: {use?: 'minimist'}): void; - + parse(argv: string | string[], options?: { use?: 'minimist' }): ParsedArgs; + /** * Sets the prompt delimiter for the given Vorpal instance. * @@ -31,11 +46,12 @@ declare interface VorpalInstance { /** * Attaches the TTY's CLI prompt to that given instance of Vorpal. - * * As a note, multiple instances of Vorpal can run in the same Node instance. However, only one can be 'attached' to your TTY. The last instance given the show() command will be attached, and the previously shown instances will detach. + * + * @returns {this} */ - show(): void; - + show(): this; + /** * Returns a given command by its name. This is used instead of `vorpal.command()` as `.command` will overwrite a given command. If command is not found, `undefined` is returned. * @@ -46,12 +62,12 @@ declare interface VorpalInstance { exec(command: string, cb: CallbackFunction): PromiseLike; - execSync(command: string, options: {fatal: boolean}): T; + execSync(command: string, options: { fatal: boolean }): T; log(message: string, ...messages: string[]); - + history(id: string); - + localStorage(id: string); help(strBuilder: (cmd: string) => string); @@ -60,7 +76,7 @@ declare interface VorpalInstance { use(extension: string | Function); - + /** * Adds a new command to your command line API. * @@ -75,34 +91,47 @@ declare interface VorpalInstance { mode(command: string, description?: string): Mode; } -declare interface UiInstance { +export interface UiInstance { redraw: RedrawMethod; delimiter(text?: string); input(text?: string); - + imprint(); submit(text: string); - + cancel(); } -declare interface RedrawMethod -{ - (text: string, ...texts: string[]); +export function RedrawMethod(text: string): void; +export function RedrawMethod(...texts: string[]): void; - clear(); - done(); +export interface RedrawMethod { + clear(): void; + done(): void; } -declare interface Command { - +export interface Command { + description(description: string): this; + alias(name: string): this; + alias(...names: string[]): this; + parse(parseFn: CommandParseFn): this; + option(flag: string, description: string, autocomplete: string[]): this; // TODO: Check autocomplete types. + types(types: TypesDefinition): this; + hidden(): this; // TODO: Check return type. + remove(); // TODO: Check return type. + help(helpFn: (args) => void); // TODO: Check args type. + validate(validateFn: CommandValidateFn); + autocomplete(choices: string[]): this; + autocomplete(choices: {}): this; // TODO: Revisit this. + autocomplete(choicesFn: CommandAutocompleteFn): this; // TODO: Revisit this. + action(actionFn: CommandActionFn): this; } -declare interface Mode { +export interface Mode { description(desc: string): this; delimiter(str: string): this; @@ -112,6 +141,9 @@ declare interface Mode { action(actionFn: (command: string, callback: CallbackFunction) => void | T): this; } -declare module "vorpal" { - export = VorpalInstance; -} +type CommandParseFn = (command: string, args) => string; // TODO: Check args type. +type CommandValidateFn = (args) => boolean | string; // TODO: Check args type. +type CommandAutocompleteFn = (text: string, iteration: number, cb?: CallbackFunction) => void | PromiseLike; +type CommandActionFn = (args, cb?: CallbackFunction) => void | PromiseLike + +export var Vorpal: VorpalFactory; \ No newline at end of file From ab049f04e7c8c7f4756cc4f381c3fee532f44e19 Mon Sep 17 00:00:00 2001 From: Aaron Reisman Date: Wed, 10 Oct 2018 18:56:22 -0700 Subject: [PATCH 008/615] Add @types/jest-cli (#29558) * Update index.d.ts * Update index.d.ts * make updates from @andy-ms * Add expectation * Update types * Update test * Lint * Rename jest-tests.ts to jest-cli-tests.ts --- types/jest-cli/index.d.ts | 254 +++++++++++++++++++++++++++++++ types/jest-cli/jest-cli-tests.ts | 4 + types/jest-cli/tsconfig.json | 16 ++ types/jest-cli/tslint.json | 3 + 4 files changed, 277 insertions(+) create mode 100644 types/jest-cli/index.d.ts create mode 100644 types/jest-cli/jest-cli-tests.ts create mode 100644 types/jest-cli/tsconfig.json create mode 100644 types/jest-cli/tslint.json diff --git a/types/jest-cli/index.d.ts b/types/jest-cli/index.d.ts new file mode 100644 index 0000000000..64a0f96193 --- /dev/null +++ b/types/jest-cli/index.d.ts @@ -0,0 +1,254 @@ +// Type definitions for jest-cli 23.6 +// Project: https://jestjs.io/ +// Definitions by: Aaron Reisman +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export interface UncheckedSnapshot { + filePath: string; + keys: string[]; +} + +export interface SnapshotSummary { + added: number; + didUpdate: boolean; + failure: boolean; + filesAdded: number; + filesRemoved: number; + filesUnmatched: number; + filesUpdated: number; + matched: number; + total: number; + unchecked: number; + uncheckedKeysByFile: UncheckedSnapshot[]; + unmatched: number; + updated: number; +} +export type LogMessage = string; + +export interface LogEntry { + message: LogMessage; + origin: string; + type: LogType; +} + +export interface LogCounters { + [label: string]: number; +} + +export interface LogTimers { + [label: string]: Date; +} + +export type LogType = + | "assert" + | "count" + | "debug" + | "dir" + | "dirxml" + | "error" + | "group" + | "groupCollapsed" + | "info" + | "log" + | "time" + | "warn"; + +export type ConsoleBuffer = LogEntry[]; + +export interface Callsite { + column: number; + line: number; +} + +export type Status = "passed" | "failed" | "skipped" | "pending"; + +export interface AssertionResult { + ancestorTitles: string[]; + duration?: number; + failureMessages: string[]; + fullName: string; + location?: Callsite; + numPassingAsserts: number; + status: Status; + title: string; +} + +export interface SerializableError { + code?: any; + message: string; + stack?: string; + type?: string; +} + +export interface TestResult { + console?: ConsoleBuffer; + coverage?: RawCoverage; + displayName?: string; + failureMessage?: string; + leaks: boolean; + memoryUsage?: number; + numFailingTests: number; + numPassingTests: number; + numPendingTests: number; + openHandles: Error[]; + perfStats: { + end: number; + start: number; + }; + skipped: boolean; + snapshot: { + added: number; + fileDeleted: boolean; + matched: number; + unchecked: number; + uncheckedKeys: string[]; + unmatched: number; + updated: number; + }; + sourceMaps: { [sourcePath: string]: string }; + testExecError?: SerializableError; + testFilePath: string; + testResults: AssertionResult[]; +} + +export type ReporterConfig = [string, object]; + +export interface FileCoverageTotal { + total: number; + covered: number; + skipped: number; + pct: number; +} + +export interface CoverageSummary { + lines: FileCoverageTotal; + statements: FileCoverageTotal; + branches: FileCoverageTotal; + functions: FileCoverageTotal; + merge: (other: CoverageSummary) => void; +} + +export interface FileCoverage { + getLineCoverage: () => object; + getUncoveredLines: () => number[]; + getBranchCoverageByLine: () => object; + toJSON: () => object; + merge: (other: object) => void; + computeSimpleTotals: (property: string) => FileCoverageTotal; + computeBranchTotals: () => FileCoverageTotal; + resetHits: () => void; + toSummary: () => CoverageSummary; +} + +export type SnapshotUpdateState = "all" | "new" | "none"; + +export interface RawFileCoverage { + path: string; + s: { [statementId: number]: number }; + b: { [branchId: number]: number }; + f: { [functionId: number]: number }; + l: { [lineId: number]: number }; + fnMap: { [functionId: number]: any }; + statementMap: { [statementId: number]: any }; + branchMap: { [branchId: number]: any }; + inputSourceMap?: object; +} + +export interface RawCoverage { + [filePath: string]: RawFileCoverage; +} + +export interface AggregatedResultWithoutCoverage { + numFailedTests: number; + numFailedTestSuites: number; + numPassedTests: number; + numPassedTestSuites: number; + numPendingTests: number; + numTodoTests: number; + numPendingTestSuites: number; + numRuntimeErrorTestSuites: number; + numTotalTests: number; + numTotalTestSuites: number; + openHandles: Error[]; + snapshot: SnapshotSummary; + startTime: number; + success: boolean; + testResults: TestResult[]; + wasInterrupted: boolean; +} + +export interface CoverageMap { + merge(data: { [index: string]: any }): void; + getCoverageSummary(): FileCoverage; + data: RawCoverage; + addFileCoverage(fileCoverage: RawFileCoverage): void; + files(): string[]; + fileCoverageFor(file: string): FileCoverage; +} + +export interface AggregatedResult extends AggregatedResultWithoutCoverage { + coverageMap?: CoverageMap; +} + +export interface GlobalConfig { + bail: boolean; + changedSince: string; + changedFilesWithAncestor: boolean; + collectCoverage: boolean; + collectCoverageFrom: string[]; + collectCoverageOnlyFrom?: { [key: string]: boolean }; + coverageDirectory: string; + coveragePathIgnorePatterns?: string[]; + coverageReporters: string[]; + coverageThreshold: { global: { [key: string]: number } }; + detectLeaks: boolean; + detectOpenHandles: boolean; + enabledTestsMap?: { [key: string]: { [key: string]: boolean } }; + expand: boolean; + filter?: string; + findRelatedTests: boolean; + forceExit: boolean; + json: boolean; + globalSetup?: string; + globalTeardown?: string; + lastCommit: boolean; + logHeapUsage: boolean; + listTests: boolean; + maxWorkers: number; + noStackTrace: boolean; + nonFlagArgs: string[]; + noSCM?: boolean; + notify: boolean; + notifyMode: string; + outputFile?: string; + onlyChanged: boolean; + onlyFailures: boolean; + passWithNoTests: boolean; + projects: string[]; + replname?: string; + reporters: Array; + runTestsByPath: boolean; + rootDir: string; + silent: boolean; + skipFilter: boolean; + errorOnDeprecated: boolean; + testFailureExitCode: number; + testNamePattern: string; + testPathPattern: string; + testResultsProcessor?: string; + updateSnapshot: SnapshotUpdateState; + useStderr: boolean; + verbose?: boolean; + watch: boolean; + watchAll: boolean; + watchman: boolean; + watchPlugins?: Array<{ path: string; config: { [index: string]: any } }>; +} + +export function run(maybeArgv?: string[], project?: string): Promise; + +export function runCLI( + argv: string[], + projects: string[] +): Promise<{ results: AggregatedResult; globalConfig: GlobalConfig }>; diff --git a/types/jest-cli/jest-cli-tests.ts b/types/jest-cli/jest-cli-tests.ts new file mode 100644 index 0000000000..6cb9342fe7 --- /dev/null +++ b/types/jest-cli/jest-cli-tests.ts @@ -0,0 +1,4 @@ +import * as jest from "jest-cli"; + +// $ExpectType Promise +jest.run(["--config", JSON.stringify({})]); diff --git a/types/jest-cli/tsconfig.json b/types/jest-cli/tsconfig.json new file mode 100644 index 0000000000..dac2e8adb9 --- /dev/null +++ b/types/jest-cli/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "jest-cli-tests.ts"] +} diff --git a/types/jest-cli/tslint.json b/types/jest-cli/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/jest-cli/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From c66319d2582c3cb4a7f4c6f227c86210ea422eba Mon Sep 17 00:00:00 2001 From: Sergey Kuznetsov Date: Thu, 11 Oct 2018 17:50:10 +0300 Subject: [PATCH 009/615] Fix conflict with @types/jquery/index.d.ts (#29638) This [change](https://github.com/DefinitelyTyped/DefinitelyTyped/commit/5e0ae37bedb585846866b6ae8d4db7c97ddc367d#diff-138ae409cf0ed11a88023bb376b56599) causes conflict with @types/jquery/index.d.ts --- types/cash/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/types/cash/index.d.ts b/types/cash/index.d.ts index c02457fc5b..efa108e5f8 100644 --- a/types/cash/index.d.ts +++ b/types/cash/index.d.ts @@ -493,4 +493,3 @@ declare module "cash" { export = CashStatic; } declare var cash: CashStatic; -declare var $: CashStatic; From 7f7d13a9fbbf28a0efd6b19bf83433fc322875a7 Mon Sep 17 00:00:00 2001 From: Esa-Matti Suuronen Date: Thu, 11 Oct 2018 20:35:02 +0300 Subject: [PATCH 010/615] elasticsearch: Narrow exists* return types to boolean (#29643) --- types/elasticsearch/index.d.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/types/elasticsearch/index.d.ts b/types/elasticsearch/index.d.ts index a9dc133545..ec3d417483 100644 --- a/types/elasticsearch/index.d.ts +++ b/types/elasticsearch/index.d.ts @@ -39,8 +39,8 @@ export class Client { deleteScript(params: DeleteScriptParams, callback: (error: any, response: any) => void): void; deleteTemplate(params: DeleteTemplateParams): Promise; deleteTemplate(params: DeleteTemplateParams, callback: (error: any, response: any) => void): void; - exists(params: ExistsParams): Promise; - exists(params: ExistsParams, callback: (error: any, response: any, status?: any) => void): void; + exists(params: ExistsParams): Promise; + exists(params: ExistsParams, callback: (error: any, response: boolean, status?: any) => void): void; explain(params: ExplainParams): Promise; explain(params: ExplainParams, callback: (error: any, response: ExplainResponse) => void): void; fieldStats(params: FieldStatsParams): Promise; @@ -1036,14 +1036,14 @@ export class Indices { deleteAlias(params: IndicesDeleteAliasParams): Promise; deleteTemplate(params: IndicesDeleteTemplateParams, callback: (error: any, response: any, status: any) => void): void; deleteTemplate(params: IndicesDeleteTemplateParams): Promise; - exists(params: IndicesExistsParams, callback: (error: any, response: any, status: any) => void): void; - exists(params: IndicesExistsParams): Promise; - existsAlias(params: IndicesExistsAliasParams, callback: (error: any, response: any, status: any) => void): void; - existsAlias(params: IndicesExistsAliasParams): Promise; - existsTemplate(params: IndicesExistsTemplateParams, callback: (error: any, response: any, status: any) => void): void; - existsTemplate(params: IndicesExistsTemplateParams): Promise; - existsType(params: IndicesExistsTypeParams, callback: (error: any, response: any, status: any) => void): void; - existsType(params: IndicesExistsTypeParams): Promise; + exists(params: IndicesExistsParams, callback: (error: any, response: boolean, status: any) => void): void; + exists(params: IndicesExistsParams): Promise; + existsAlias(params: IndicesExistsAliasParams, callback: (error: any, response: boolean, status: any) => void): void; + existsAlias(params: IndicesExistsAliasParams): Promise; + existsTemplate(params: IndicesExistsTemplateParams, callback: (error: any, response: boolean, status: any) => void): void; + existsTemplate(params: IndicesExistsTemplateParams): Promise; + existsType(params: IndicesExistsTypeParams, callback: (error: any, response: boolean, status: any) => void): void; + existsType(params: IndicesExistsTypeParams): Promise; flush(params: IndicesFlushParams, callback: (error: any, response: any, status: any) => void): void; flush(params: IndicesFlushParams): Promise; flushSynced(params: IndicesFlushSyncedParams, callback: (error: any, response: any, status: any) => void): void; From ae7d2e5ef444d83c4584099ca19da5c0ce4ca65c Mon Sep 17 00:00:00 2001 From: Esa-Matti Suuronen Date: Thu, 11 Oct 2018 20:35:17 +0300 Subject: [PATCH 011/615] elasticsearch: Use Refresh for IndexDocumentParams (#29645) --- types/elasticsearch/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/elasticsearch/index.d.ts b/types/elasticsearch/index.d.ts index ec3d417483..69c881e700 100644 --- a/types/elasticsearch/index.d.ts +++ b/types/elasticsearch/index.d.ts @@ -443,7 +443,7 @@ export interface IndexDocumentParams extends GenericParams { waitForActiveShards?: string; opType?: "index" | "create"; parent?: string; - refresh?: string; + refresh?: Refresh; routing?: string; timeout?: TimeSpan; timestamp?: Date | number; From d96c3407ae78faa09880bfb873134dfc2ae23700 Mon Sep 17 00:00:00 2001 From: Christian Chown Date: Thu, 11 Oct 2018 18:36:12 +0100 Subject: [PATCH 012/615] Add typings for react-native-restart (#29644) --- types/react-native-restart/index.d.ts | 11 +++++++++ .../react-native-restart-tests.tsx | 4 ++++ types/react-native-restart/tsconfig.json | 24 +++++++++++++++++++ types/react-native-restart/tslint.json | 1 + 4 files changed, 40 insertions(+) create mode 100644 types/react-native-restart/index.d.ts create mode 100644 types/react-native-restart/react-native-restart-tests.tsx create mode 100644 types/react-native-restart/tsconfig.json create mode 100644 types/react-native-restart/tslint.json diff --git a/types/react-native-restart/index.d.ts b/types/react-native-restart/index.d.ts new file mode 100644 index 0000000000..b73c06a291 --- /dev/null +++ b/types/react-native-restart/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for react-native-restart 0.0 +// Project: https://github.com/avishayil/react-native-restart#readme +// Definitions by: Christian Chown +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 + +declare let ReactNativeRestart: { + Restart(): void; +}; + +export default ReactNativeRestart; diff --git a/types/react-native-restart/react-native-restart-tests.tsx b/types/react-native-restart/react-native-restart-tests.tsx new file mode 100644 index 0000000000..dee25ace3d --- /dev/null +++ b/types/react-native-restart/react-native-restart-tests.tsx @@ -0,0 +1,4 @@ +import * as React from "react"; +import ReactNativeRestart from "react-native-restart"; + +ReactNativeRestart.Restart(); diff --git a/types/react-native-restart/tsconfig.json b/types/react-native-restart/tsconfig.json new file mode 100644 index 0000000000..85f654f9c1 --- /dev/null +++ b/types/react-native-restart/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "jsx": "react-native", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-native-restart-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-native-restart/tslint.json b/types/react-native-restart/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/react-native-restart/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file From cc0a868dc11024332a7846c66c893df7033d1fff Mon Sep 17 00:00:00 2001 From: Christian Chown Date: Thu, 11 Oct 2018 18:36:31 +0100 Subject: [PATCH 013/615] Add typings for react-native-referrer (#29642) --- types/react-native-referrer/index.d.ts | 11 +++++++++ .../react-native-referrer-tests.tsx | 9 +++++++ types/react-native-referrer/tsconfig.json | 24 +++++++++++++++++++ types/react-native-referrer/tslint.json | 1 + 4 files changed, 45 insertions(+) create mode 100644 types/react-native-referrer/index.d.ts create mode 100644 types/react-native-referrer/react-native-referrer-tests.tsx create mode 100644 types/react-native-referrer/tsconfig.json create mode 100644 types/react-native-referrer/tslint.json diff --git a/types/react-native-referrer/index.d.ts b/types/react-native-referrer/index.d.ts new file mode 100644 index 0000000000..34f5429b4a --- /dev/null +++ b/types/react-native-referrer/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for react-native-referrer 0.1 +// Project: https://github.com/JeandeCampredon/react-native-referrer +// Definitions by: Christian Chown +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 + +declare let ReactNativeReferrer: { + getReferrer(): Promise; +}; + +export default ReactNativeReferrer; diff --git a/types/react-native-referrer/react-native-referrer-tests.tsx b/types/react-native-referrer/react-native-referrer-tests.tsx new file mode 100644 index 0000000000..4b7b3d88b8 --- /dev/null +++ b/types/react-native-referrer/react-native-referrer-tests.tsx @@ -0,0 +1,9 @@ +import * as React from "react"; +import { Platform } from "react-native"; +import ReactNativeReferrer from "react-native-referrer"; + +if (Platform.OS === 'android') { + ReactNativeReferrer.getReferrer().then(referrerString => { + console.log(referrerString); + }); +} diff --git a/types/react-native-referrer/tsconfig.json b/types/react-native-referrer/tsconfig.json new file mode 100644 index 0000000000..a1bcec56b8 --- /dev/null +++ b/types/react-native-referrer/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "jsx": "react-native", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-native-referrer-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-native-referrer/tslint.json b/types/react-native-referrer/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/react-native-referrer/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file From 7fd8a1b5a5552b2c8ba1ad3995bf3857686acf89 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Fri, 12 Oct 2018 04:43:05 +1100 Subject: [PATCH 014/615] GoogleMaps: Adding aspects to PlaceResult (#29627) Replaces https://github.com/DefinitelyTyped/DefinitelyTyped/pull/28370 --- types/googlemaps/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/googlemaps/index.d.ts b/types/googlemaps/index.d.ts index 531074b258..722a2ff819 100644 --- a/types/googlemaps/index.d.ts +++ b/types/googlemaps/index.d.ts @@ -2727,6 +2727,7 @@ declare namespace google.maps { export interface PlaceResult { address_components: GeocoderAddressComponent[]; adr_address: string; + aspects: PlaceAspectRating[]; formatted_address: string; formatted_phone_number: string; geometry: PlaceGeometry; From abb6102c14cecadff82669f450facd9a4abe713c Mon Sep 17 00:00:00 2001 From: Piotr Roszatycki Date: Thu, 11 Oct 2018 19:44:22 +0200 Subject: [PATCH 015/615] replacestream: new typings (#29608) * replacestream: new typings * replacestream: fix "Exceeds maximum line length of 200" * replacestream: use `export =` syntax --- types/replacestream/index.d.ts | 54 ++++++++++++++++++++++ types/replacestream/replacestream-tests.ts | 27 +++++++++++ types/replacestream/tsconfig.json | 23 +++++++++ types/replacestream/tslint.json | 1 + 4 files changed, 105 insertions(+) create mode 100644 types/replacestream/index.d.ts create mode 100644 types/replacestream/replacestream-tests.ts create mode 100644 types/replacestream/tsconfig.json create mode 100644 types/replacestream/tslint.json diff --git a/types/replacestream/index.d.ts b/types/replacestream/index.d.ts new file mode 100644 index 0000000000..ede4591a1d --- /dev/null +++ b/types/replacestream/index.d.ts @@ -0,0 +1,54 @@ +// Type definitions for replacestream 4.0 +// Project: https://github.com/eugeneware/replacestream#readme +// Definitions by: Piotr Roszatycki +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace ReplaceStream { + interface Options { + /** + * Sets a limit on the number of times the replacement will be made. This + * is forced to one when a regex without the global flag is provided. + * + * Default: `Infinity` + */ + limit?: number; + /** + * The text encoding used during search and replace. + * + * Default: `"utf8"` + */ + encoding?: string; + /** + * When doing cross-chunk replacing, this sets the maximum length match + * that will be supported. + * + * Default: `100` + */ + maxMatchLen?: number; + /** + * When doing string match (not relevant for regex matching) whether to do a + * case insensitive search. + * + * Default: `true` + */ + ignoreCase?: boolean; + /** + * When provided, these flags will be used when creating the search regexes + * internally. + * + * @deprecated as the flags set on the regex provided are no longer mutated + * if this is not provided. + */ + regExpOptions?: string; + } + + type ReplaceFunction = (match: string, p1: string, offset: number, string: string) => string; +} + +declare function ReplaceStream( + search: RegExp | string, + replace: ReplaceStream.ReplaceFunction | string, + options?: ReplaceStream.Options +): any; + +export = ReplaceStream; diff --git a/types/replacestream/replacestream-tests.ts b/types/replacestream/replacestream-tests.ts new file mode 100644 index 0000000000..d3062af185 --- /dev/null +++ b/types/replacestream/replacestream-tests.ts @@ -0,0 +1,27 @@ +/// + +import * as fs from 'fs'; +import * as path from 'path'; +import replaceStream = require('replacestream'); + +fs.createReadStream(path.join(__dirname, 'happybirthday.txt')) + .pipe(replaceStream('birthday', 'earthday')) + .pipe(process.stdout); + +fs.createReadStream(path.join(__dirname, 'happybirthday.txt')) + .pipe(replaceStream('birthday', 'earthday', { limit: 2 })) + .pipe(process.stdout); + +fs.createReadStream(path.join(__dirname, 'happybirthday.txt')) + .pipe(replaceStream(/birthday/, 'earthday')) + .pipe(process.stdout); + +const words = ['Awesome', 'Good', 'Super', 'Joyous']; + +function replaceFn(match: string, p1: string, offset: number, string: string): string { + return words.shift() || 'Happy'; +} + +fs.createReadStream(path.join(__dirname, 'happybirthday.txt')) + .pipe(replaceStream('Happy', replaceFn)) + .pipe(process.stdout); diff --git a/types/replacestream/tsconfig.json b/types/replacestream/tsconfig.json new file mode 100644 index 0000000000..96bfd055fa --- /dev/null +++ b/types/replacestream/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "replacestream-tests.ts" + ] +} diff --git a/types/replacestream/tslint.json b/types/replacestream/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/replacestream/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 7325705819c67dcdab522cf0d8c1da3a545df850 Mon Sep 17 00:00:00 2001 From: Piotr Roszatycki Date: Thu, 11 Oct 2018 19:45:48 +0200 Subject: [PATCH 016/615] readline-transform: convert to `export =` (#29560) * readline-transform: TypeScript Version: 2.7 * readline-transform: convert to `export =` --- types/readline-transform/index.d.ts | 22 +++++++++++-------- .../readline-transform-tests.ts | 2 +- types/readline-transform/tsconfig.json | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/types/readline-transform/index.d.ts b/types/readline-transform/index.d.ts index ec1ce8b56c..4bfb24a575 100644 --- a/types/readline-transform/index.d.ts +++ b/types/readline-transform/index.d.ts @@ -7,15 +7,19 @@ import { Transform, TransformOptions } from 'stream'; -export interface ReadlineTransformOptions extends TransformOptions { - /** line break matcher for str.split() (default: /\r?\n/) */ - breakMatcher?: RegExp; - /** if content ends with line break, ignore last empty line (default: true) */ - ignoreEndOfBreak?: boolean; - /** if line is empty string, skip it (default: false) */ - skipEmpty?: boolean; +declare namespace ReadlineTransform { + interface Options extends TransformOptions { + /** line break matcher for str.split() (default: /\r?\n/) */ + breakMatcher?: RegExp; + /** if content ends with line break, ignore last empty line (default: true) */ + ignoreEndOfBreak?: boolean; + /** if line is empty string, skip it (default: false) */ + skipEmpty?: boolean; + } } -export default class ReadlineTransform extends Transform { - constructor(options?: ReadlineTransformOptions); +declare class ReadlineTransform extends Transform { + constructor(options?: ReadlineTransform.Options); } + +export = ReadlineTransform; diff --git a/types/readline-transform/readline-transform-tests.ts b/types/readline-transform/readline-transform-tests.ts index 9c343bd352..fc2b3e0e3a 100644 --- a/types/readline-transform/readline-transform-tests.ts +++ b/types/readline-transform/readline-transform-tests.ts @@ -1,5 +1,5 @@ import { PassThrough } from 'stream'; -import ReadlineTransform from 'readline-transform'; +import ReadlineTransform = require('readline-transform'); const readStream = new PassThrough(); const transform = new ReadlineTransform({ diff --git a/types/readline-transform/tsconfig.json b/types/readline-transform/tsconfig.json index 4bf70a9d30..2e76497489 100644 --- a/types/readline-transform/tsconfig.json +++ b/types/readline-transform/tsconfig.json @@ -20,4 +20,4 @@ "index.d.ts", "readline-transform-tests.ts" ] -} \ No newline at end of file +} From 1df7a9325cd62c7196deacb724e6636cdbf10d8e Mon Sep 17 00:00:00 2001 From: Paul Selden Date: Thu, 11 Oct 2018 13:46:24 -0400 Subject: [PATCH 017/615] [stellar-sdk]: Fix AccountRecord.data and add data_attr (#29632) * [stellar-sdk]: Fix AccountRecord.data and data_attr data is a function to call the /accounts/{id}/data/{key} endpoint, while data_attr is an object bag containing data for the account. * [stellar-sdk] Add overload to toXDR() which accepts a string encoding --- types/stellar-sdk/index.d.ts | 10 ++++++---- types/stellar-sdk/stellar-sdk-tests.ts | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/types/stellar-sdk/index.d.ts b/types/stellar-sdk/index.d.ts index 581523ccb6..68ad432585 100644 --- a/types/stellar-sdk/index.d.ts +++ b/types/stellar-sdk/index.d.ts @@ -10,7 +10,7 @@ /// export class Account { - constructor(accountId: string, sequence: string | number) + constructor(accountId: string, sequence: string) accountId(): string; sequenceNumber(): string; incrementSequenceNumber(): void; @@ -98,10 +98,10 @@ export interface AccountRecord extends Record { weight: number } >; - data: { + data: (options: {value: string}) => Promise<{value: string}>; + data_attr: { [key: string]: string }; - effects: CallCollectionFunction; offers: CallCollectionFunction; operations: CallCollectionFunction; @@ -437,7 +437,8 @@ export class AccountResponse implements AccountRecord { weight: number } >; - data: { + data: (options: {value: string}) => Promise<{value: string}>; + data_attr: { [key: string]: string }; @@ -894,6 +895,7 @@ export namespace xdr { static fromXDR(xdr: Buffer): XDRStruct; toXDR(): Buffer; + toXDR(encoding: string): string; } class Operation extends XDRStruct { } class Asset extends XDRStruct { } diff --git a/types/stellar-sdk/stellar-sdk-tests.ts b/types/stellar-sdk/stellar-sdk-tests.ts index 8ff71d7fb6..fe72b84a66 100644 --- a/types/stellar-sdk/stellar-sdk-tests.ts +++ b/types/stellar-sdk/stellar-sdk-tests.ts @@ -2,7 +2,7 @@ import * as StellarSdk from 'stellar-sdk'; const sourceKey = StellarSdk.Keypair.random(); // $ExpectType Keypair const destKey = StellarSdk.Keypair.random(); -const account = new StellarSdk.Account(sourceKey.publicKey(), 1); +const account = new StellarSdk.Account(sourceKey.publicKey(), '1'); const transaction = new StellarSdk.TransactionBuilder(account) .addOperation(StellarSdk.Operation.accountMerge({destination: destKey.publicKey()})) .addMemo(new StellarSdk.Memo(StellarSdk.MemoText, "memo")) From aa83866295bc3cb6d119cafab50a0210d0ddd182 Mon Sep 17 00:00:00 2001 From: Nathan Hamblen Date: Thu, 11 Oct 2018 13:46:54 -0400 Subject: [PATCH 018/615] @types/pino: recognize `changeLevelName` field (#29624) This field has been supported since pino 5.4.0, API [docs are here][api]. [api]:https://github.com/pinojs/pino/blob/master/docs/api.md#changelevelname-string --- types/pino/index.d.ts | 4 ++++ types/pino/pino-tests.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/types/pino/index.d.ts b/types/pino/index.d.ts index 71cb957643..75f045af01 100644 --- a/types/pino/index.d.ts +++ b/types/pino/index.d.ts @@ -150,6 +150,10 @@ declare namespace P { * Outputs the level as a string instead of integer. Default: `false`. */ useLevelLabels?: boolean; + /** + * Changes the property `level` to any string value you pass in. Default: 'level' + */ + changeLevelName?: string; /** * Use this option to define additional logging levels. * The keys of the object correspond the namespace of the log level, and the values should be the numerical value of the level. diff --git a/types/pino/pino-tests.ts b/types/pino/pino-tests.ts index 356f84da30..cec8f658fb 100644 --- a/types/pino/pino-tests.ts +++ b/types/pino/pino-tests.ts @@ -50,7 +50,7 @@ pino({ }); pino({ base: null }); -pino({ base: { foo: 'bar' } }); +pino({ base: { foo: 'bar' } , changeLevelName: 'severity' }); if ('pino' in log) console.log(`pino version: ${log.pino}`); From dab682e6f807cc326e13494c34805fa461b4742e Mon Sep 17 00:00:00 2001 From: Resi Respati Date: Fri, 12 Oct 2018 00:47:24 +0700 Subject: [PATCH 019/615] [next] Add support for `next/constants` (#29633) * [next] Add support for `next/constants` * minor whitespace fix --- types/next/constants.d.ts | 23 +++++++++++++++++++ types/next/test/next-constants-tests.ts | 30 +++++++++++++++++++++++++ types/next/tsconfig.json | 2 ++ 3 files changed, 55 insertions(+) create mode 100644 types/next/constants.d.ts create mode 100644 types/next/test/next-constants-tests.ts diff --git a/types/next/constants.d.ts b/types/next/constants.d.ts new file mode 100644 index 0000000000..d2dc74dad0 --- /dev/null +++ b/types/next/constants.d.ts @@ -0,0 +1,23 @@ +export const PHASE_EXPORT: string; +export const PHASE_PRODUCTION_BUILD: string; +export const PHASE_PRODUCTION_SERVER: string; +export const PHASE_DEVELOPMENT_SERVER: string; +export const PAGES_MANIFEST: string; +export const BUILD_MANIFEST: string; +export const REACT_LOADABLE_MANIFEST: string; +export const SERVER_DIRECTORY: string; +export const CONFIG_FILE: string; +export const BUILD_ID_FILE: string; +export const BLOCKED_PAGES: string[]; + +export const CLIENT_STATIC_FILES_PATH: string; +export const CLIENT_STATIC_FILES_RUNTIME: string; +export const CLIENT_STATIC_FILES_RUNTIME_PATH: string; +/** static/runtime/main.js */ +export const CLIENT_STATIC_FILES_RUNTIME_MAIN: string; +/** static/runtime/webpack.js */ +export const CLIENT_STATIC_FILES_RUNTIME_WEBPACK: string; +/** matches static//pages/.js */ +export const IS_BUNDLED_PAGE_REGEX: RegExp; +/** matches static//pages/:page*.js */ +export const ROUTE_NAME_REGEX: RegExp; diff --git a/types/next/test/next-constants-tests.ts b/types/next/test/next-constants-tests.ts new file mode 100644 index 0000000000..64413ea97c --- /dev/null +++ b/types/next/test/next-constants-tests.ts @@ -0,0 +1,30 @@ +import { + PHASE_DEVELOPMENT_SERVER, + IS_BUNDLED_PAGE_REGEX +} from "next/constants"; + +const isIndexPage = IS_BUNDLED_PAGE_REGEX.test( + "static/CjW0mFnyG80HdP4eSUiy7/pages/index.js" +); + +// Example taken from: https://github.com/cyrilwanner/next-compose-plugins/blob/a25b313899638912cc9defc0be072f4fe4a1e855/README.md +const config = (nextConfig: any = {}) => { + return { + ...nextConfig, + + // define in which phases this plugin should get applied. + // you can also use multiple phases or negate them. + // however, users can still overwrite them in their configuration if they really want to. + phases: [PHASE_DEVELOPMENT_SERVER], + + webpack(config: any, options: any) { + // do something here which only gets applied during development server phase + + if (typeof nextConfig.webpack === "function") { + return nextConfig.webpack(config, options); + } + + return config; + } + }; +}; diff --git a/types/next/tsconfig.json b/types/next/tsconfig.json index 125953fcd6..9981affbd3 100644 --- a/types/next/tsconfig.json +++ b/types/next/tsconfig.json @@ -20,6 +20,7 @@ }, "files": [ "index.d.ts", + "constants.d.ts", "app.d.ts", "document.d.ts", "dynamic.d.ts", @@ -29,6 +30,7 @@ "router.d.ts", "config.d.ts", "test/next-tests.ts", + "test/next-constants-tests.ts", "test/next-app-tests.tsx", "test/next-error-tests.tsx", "test/next-head-tests.tsx", From d59cfd4c353435fd91367d702d3fec89db8b3696 Mon Sep 17 00:00:00 2001 From: Yosh Date: Thu, 11 Oct 2018 19:54:03 +0200 Subject: [PATCH 020/615] [@types/react-native-auth0] add resetPassword definition (#29615) --- types/react-native-auth0/index.d.ts | 6 ++++++ types/react-native-auth0/react-native-auth0-tests.ts | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/types/react-native-auth0/index.d.ts b/types/react-native-auth0/index.d.ts index d6bd3e7cf1..7508386166 100644 --- a/types/react-native-auth0/index.d.ts +++ b/types/react-native-auth0/index.d.ts @@ -70,6 +70,11 @@ export interface UserInfoParams { token: string; } +export interface ResetPasswordParams { + email: string; + connection: string; +} + export interface UserInfo { email: string; emailVerified: boolean; @@ -88,6 +93,7 @@ export class Auth { passwordRealm(params: PasswordRealmParams): Promise; refreshToken(params: RefreshTokenParams): Promise; + resetPassword(params: ResetPasswordParams): Promise; revoke(params: RevokeParams): Promise; userInfo(params: UserInfoParams): Promise; } diff --git a/types/react-native-auth0/react-native-auth0-tests.ts b/types/react-native-auth0/react-native-auth0-tests.ts index 068833e349..8a10d5d2b6 100644 --- a/types/react-native-auth0/react-native-auth0-tests.ts +++ b/types/react-native-auth0/react-native-auth0-tests.ts @@ -49,6 +49,11 @@ auth0.auth.refreshToken({ scope: "openid" }); +auth0.auth.resetPassword({ + email: "me@example.com", + connection: "db-connection" +}); + auth0.auth.revoke({ refreshToken: "refresh-token" }); From 05406773b8929e49030fdf5266e4198e627454d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Vieira?= Date: Thu, 11 Oct 2018 18:54:24 +0100 Subject: [PATCH 021/615] Allow styles to be any ReactNode. (#29639) --- types/next/document.d.ts | 6 ++++-- types/next/test/next-document-tests.tsx | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/types/next/document.d.ts b/types/next/document.d.ts index 3d238f6c6f..eed52766b3 100644 --- a/types/next/document.d.ts +++ b/types/next/document.d.ts @@ -37,7 +37,7 @@ export interface NextDocumentContext exte * https://github.com/zeit/next.js/blob/7.0.0/server/document.js#L16 */ export interface DefaultDocumentIProps extends RenderPageResponse { - styles?: Array>; + styles?: React.ReactNode; } /** @@ -104,5 +104,7 @@ export class NextScript extends React.Component {} export default class Document

extends React.Component< P & DefaultDocumentIProps & DocumentProps > { - static getInitialProps(context: NextDocumentContext): DefaultDocumentIProps | Promise; + static getInitialProps( + context: NextDocumentContext + ): DefaultDocumentIProps | Promise; } diff --git a/types/next/test/next-document-tests.tsx b/types/next/test/next-document-tests.tsx index d25b340e64..6ba291be0d 100644 --- a/types/next/test/next-document-tests.tsx +++ b/types/next/test/next-document-tests.tsx @@ -12,6 +12,27 @@ interface WithUrlProps { url: string; } +class MyDocumentDefault extends Document { + static async getInitialProps(ctx: NextDocumentContext) { + const initialProps = await Document.getInitialProps(ctx); + return { ...initialProps }; + } + + render() { + return ( + + + + + +

+ + + + ); + } +} + class MyDoc extends Document { static getInitialProps({ req, renderPage }: NextDocumentContext) { // without callback From 4ec0f8dee0e9af8adf6ffcb20f7206decab6c2a8 Mon Sep 17 00:00:00 2001 From: Quinn Langille Date: Thu, 11 Oct 2018 10:55:16 -0700 Subject: [PATCH 022/615] New-Types: add types for Opossum (#29637) --- types/opossum/index.d.ts | 34 ++++++++++++++++++++++++++++++++++ types/opossum/opossum-tests.ts | 24 ++++++++++++++++++++++++ types/opossum/tsconfig.json | 23 +++++++++++++++++++++++ types/opossum/tslint.json | 1 + 4 files changed, 82 insertions(+) create mode 100644 types/opossum/index.d.ts create mode 100644 types/opossum/opossum-tests.ts create mode 100644 types/opossum/tsconfig.json create mode 100644 types/opossum/tslint.json diff --git a/types/opossum/index.d.ts b/types/opossum/index.d.ts new file mode 100644 index 0000000000..bcdc262d99 --- /dev/null +++ b/types/opossum/index.d.ts @@ -0,0 +1,34 @@ +// Type definitions for opossum 1.8 +// Project: https://github.com/bucharest-gold/opossum +// Definitions by: Quinn Langille +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +/// +import * as stream from "stream"; + +export type Action = () => any; + +export class CircuitBreaker { + promisify(action: Action): Promise; + stats(): stream.Transform; +} + +export interface CircuitBreakerOptions { + timeout?: number; + maxFailures?: number; + resetTimeout?: number; + rollingCountTimeout?: number; + rollingCountBuckets?: number; + name?: string; + rollingPercentilesEnabled?: boolean; + capacity?: number; + errorThresholdPercentage?: number; + enabled?: boolean; + allowWarmUp?: boolean; +} + +export default function circuitBreaker( + action: Action, + options?: CircuitBreakerOptions +): CircuitBreaker; diff --git a/types/opossum/opossum-tests.ts b/types/opossum/opossum-tests.ts new file mode 100644 index 0000000000..22778147e5 --- /dev/null +++ b/types/opossum/opossum-tests.ts @@ -0,0 +1,24 @@ +import { Transform } from "stream"; +import circuitBreaker, { CircuitBreaker, CircuitBreakerOptions } from "opossum"; + +const _blank = () => {}; + +const testNoOptions: CircuitBreaker = circuitBreaker(_blank); + +const options: CircuitBreakerOptions = { + timeout: 1, + maxFailures: 1, + resetTimeout: 1, + rollingCountTimeout: 1, + rollingCountBuckets: 1, + name: "testing", + rollingPercentilesEnabled: true, + capacity: 1, + errorThresholdPercentage: 1, + enabled: true, + allowWarmUp: true +}; + +const testWithOptions: CircuitBreaker = circuitBreaker(_blank, options); +const shouldBeAPromise: Promise = testWithOptions.promisify(_blank); +const shouldBeATransformStream: Transform = testWithOptions.stats(); diff --git a/types/opossum/tsconfig.json b/types/opossum/tsconfig.json new file mode 100644 index 0000000000..7ddf39bf63 --- /dev/null +++ b/types/opossum/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "opossum-tests.ts" + ] +} diff --git a/types/opossum/tslint.json b/types/opossum/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/opossum/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From e6526ac29b01af1ecbcec522d7600efccd3b813f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Wei=C3=9Fenfels?= Date: Thu, 11 Oct 2018 19:56:57 +0200 Subject: [PATCH 023/615] made tab change attention flag optional (#29523) --- types/firefox-webext-browser/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/firefox-webext-browser/index.d.ts b/types/firefox-webext-browser/index.d.ts index d9e9e8df7c..3a0bbc6a4c 100644 --- a/types/firefox-webext-browser/index.d.ts +++ b/types/firefox-webext-browser/index.d.ts @@ -6915,7 +6915,7 @@ declare namespace browser.tabs { type _TabsOnUpdatedEvent Date: Thu, 11 Oct 2018 13:57:10 -0400 Subject: [PATCH 024/615] Quill Options Fix to Match Documentation (#29545) * Quill Options Fix to Match Documentation https://quilljs.com/docs/api/#debug Debug can take a string or boolean. * Version Up * CI Failed * Adding test --- types/quill/index.d.ts | 2 +- types/quill/quill-tests.ts | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/types/quill/index.d.ts b/types/quill/index.d.ts index 93c58da4b7..0b4de9932b 100644 --- a/types/quill/index.d.ts +++ b/types/quill/index.d.ts @@ -52,7 +52,7 @@ export interface ClipboardStatic { } export interface QuillOptionsStatic { - debug?: string; + debug?: string | boolean; modules?: StringMap; placeholder?: string; readOnly?: boolean; diff --git a/types/quill/quill-tests.ts b/types/quill/quill-tests.ts index fe4ebefaf2..b2dcfac727 100644 --- a/types/quill/quill-tests.ts +++ b/types/quill/quill-tests.ts @@ -12,6 +12,17 @@ function test_quill() { }); } +function test_quill_opts() { + const quillEditor = new Quill('#editor', { + modules: + { + toolbar: { container: "#toolbar" } + }, + theme: 'snow', + debug: true, + }); +} + function test_scroll() { const quillEditor = new Quill('#editor'); const blot: Blot = quillEditor.scroll; From a38342addbe6acb12c670e7171929f366141be85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Gr=C5=88o?= Date: Thu, 11 Oct 2018 19:57:45 +0200 Subject: [PATCH 025/615] [ascii2mathml] Export Options type (#29522) * [ascii2mathml] Export Options type Types should be exported. * oops, forgot this * one more try --- types/ascii2mathml/index.d.ts | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/types/ascii2mathml/index.d.ts b/types/ascii2mathml/index.d.ts index dcb9f7bb98..0ff3b1d10e 100644 --- a/types/ascii2mathml/index.d.ts +++ b/types/ascii2mathml/index.d.ts @@ -7,29 +7,31 @@ export = A2MML; declare var A2MML: ascii2mathml; -interface Options { - decimalMark?: string; - colSep?: string; - rowSep?: string; - display?: 'inline' | 'block'; - dir?: 'ltr' | 'rtl'; - bare?: boolean; - standalone?: boolean; - annotate?: boolean; -} - interface ascii2mathml { /** * Generates a function with default options set to convert * ASCIIMath expression to MathML markup. * @param options Options */ - (options: Options): ascii2mathml; + (options: A2MML.Options): ascii2mathml; /** * Converts ASCIIMath expression to MathML markup. * @param asciimath ASCIIMath expression * @param options Options */ - (asciimath: string, options?: Options): string; + (asciimath: string, options?: A2MML.Options): string; +} + +declare namespace A2MML { + interface Options { + decimalMark?: string; + colSep?: string; + rowSep?: string; + display?: 'inline' | 'block'; + dir?: 'ltr' | 'rtl'; + bare?: boolean; + standalone?: boolean; + annotate?: boolean; + } } From abbce5d159c2e8b4a100b41ef4ee17883aee1cd8 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Thu, 11 Oct 2018 14:45:40 -0400 Subject: [PATCH 026/615] [jquery] Documentation improvements (#29658) * [jquery] Fix code for example not rendering in VS Code autocomplete. VS Code does not render the code block of the last example in the autocomplete tooltip (but does in the hover tooltip). This is fixed by adding an additional line terminated by a zero-width space. There doesn't appear to be an obvious pattern to what causes this and there may be other incidences of this bug in the declarations. * [jquery] Improve formatting of documentation for unified signatures in tooltips. Documentation for unified signatures is also unified. This means that documentation for a parameter will contain documentation from all the parameters that it's composed of. VS Code and WebStorm render this as one continuous line. This makes it confusing as it's not obvious which parts of documentation apply to a parameter. To remedy this, parameters are formatted as a bulletted list. `
` tags are necessary to force line breaks in WebStorm. The list also cannot start on the first line. To force the first line break, the `
` tag is used for WebStorm. For VS Code, a non-empty body must follow the parameter name on its line. A Braille Pattern Blank could be used here but to provide a more intuitive and consistent experience, VS Code's format for rendering parameter info is mimicked instead. The `@` symbol must be encoded to prevent `@param` from being parsed as a JSDoc tag. Note: VS Code renders the `
` tags literally and there does not appear to be a way to hide them. --- types/jquery/index.d.ts | 234 +++++++++++++++++++++++++--------------- 1 file changed, 148 insertions(+), 86 deletions(-) diff --git a/types/jquery/index.d.ts b/types/jquery/index.d.ts index b504656014..77e8ecbfaf 100644 --- a/types/jquery/index.d.ts +++ b/types/jquery/index.d.ts @@ -119,10 +119,14 @@ $.when( /** * Creates DOM elements on the fly from the provided string of raw HTML. * - * @param html A string of HTML to create on the fly. Note that this parses HTML, not XML. - * A string defining a single, standalone, HTML element (e.g.
or
). - * @param ownerDocument_attributes A document in which the new elements will be created. - * An object of attributes, events, and methods to call on the newly-created element. + * @param html _@param_ `html` + *
+ * * `html (ownerDocument)` — A string of HTML to create on the fly. Note that this parses HTML, not XML.
+ * * `html (attributes)` — A string defining a single, standalone, HTML element (e.g. <div/> or <div></div>). + * @param ownerDocument_attributes _@param_ `ownerDocument_attributes` + *
+ * * `ownerDocument` — A document in which the new elements will be created.
+ * * `attributes` — An object of attributes, events, and methods to call on the newly-created element. * @see \`{@link https://api.jquery.com/jQuery/ }\` * @since 1.0 * @since 1.4 @@ -180,6 +184,7 @@ $( "input:radio", document.forms[ 0 ] ); ```javascript $( "div", xml.responseXML ); ``` +​ */ // tslint:disable-next-line:no-unnecessary-generics (selector: JQuery.Selector, context?: Element | Document | JQuery): JQuery; @@ -1601,8 +1606,8 @@ $( "#log" ).append( "
settings -- " + JSON.stringify( settings ) + "< * * @param url A string containing the URL to which the request is sent. * @param data A plain object or string that is sent to the server with the request. - * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but - * you can use null or jQuery.noop as a placeholder. + * @param success A callback function that is executed if the request succeeds. Required if `dataType` is provided, + * but you can use `null` or \`{@link noop jQuery.noop}\` as a placeholder. * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). * @see \`{@link https://api.jquery.com/jQuery.get/ }\` * @since 1.0 @@ -1615,8 +1620,8 @@ $( "#log" ).append( "
settings -- " + JSON.stringify( settings ) + "< * Load data from the server using a HTTP GET request. * * @param url A string containing the URL to which the request is sent. - * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but - * you can use null or jQuery.noop as a placeholder. + * @param success A callback function that is executed if the request succeeds. Required if `dataType` is provided, + * but you can use `null` or \`{@link noop jQuery.noop}\` as a placeholder. * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). * @see \`{@link https://api.jquery.com/jQuery.get/ }\` * @since 1.0 @@ -1636,9 +1641,11 @@ $.get( "test.php", function( data ) { * Load data from the server using a HTTP GET request. * * @param url A string containing the URL to which the request is sent. - * @param success_data A callback function that is executed if the request succeeds. Required if dataType is provided, but - * you can use null or jQuery.noop as a placeholder. - * A plain object or string that is sent to the server with the request. + * @param success_data _@param_ `success_data` + *
+ * * `success` — A callback function that is executed if the request succeeds. Required if `dataType` is provided, + * but you can use `null` or \`{@link noop jQuery.noop}\` as a placeholder.
+ * * `data` — A plain object or string that is sent to the server with the request. * @see \`{@link https://api.jquery.com/jQuery.get/ }\` * @since 1.0 * @example ​ ````Request the test.php page and send some additional data along (while still ignoring the return results). @@ -1668,10 +1675,12 @@ $.get( "test.cgi", { name: "John", time: "2pm" } ) /** * Load data from the server using a HTTP GET request. * - * @param url_settings A string containing the URL to which the request is sent. - * A set of key/value pairs that configure the Ajax request. All properties except for url are - * optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) for a - * complete list of all settings. The type option will automatically be set to GET. + * @param url_settings _@param_ `url_settings` + *
+ * * `url` — A string containing the URL to which the request is sent.
+ * * `settings` — A set of key/value pairs that configure the Ajax request. All properties except for `url` are + * optional. A default can be set for any option with \`{@link ajaxSetup $.ajaxSetup()}\`. See \`{@link https://api.jquery.com/jquery.ajax/#jQuery-ajax-settings jQuery.ajax( settings )}\` + * for a complete list of all settings. The type option will automatically be set to `GET`. * @see \`{@link https://api.jquery.com/jQuery.get/ }\` * @since 1.0 * @since 1.12 @@ -1698,8 +1707,10 @@ $.get( "test.php" ); * Load JSON-encoded data from the server using a GET HTTP request. * * @param url A string containing the URL to which the request is sent. - * @param success_data A callback function that is executed if the request succeeds. - * A plain object or string that is sent to the server with the request. + * @param success_data _@param_ `url_settings` + *
+ * * `success` — A callback function that is executed if the request succeeds.
+ * * `data` — A plain object or string that is sent to the server with the request. * @see \`{@link https://api.jquery.com/jQuery.getJSON/ }\` * @since 1.0 * @example ​ ````Loads the four most recent pictures of Mount Rainier from the Flickr JSONP API. @@ -2620,8 +2631,10 @@ $.param({ a: { b: 1, c: 2 }, d: [ 3, 4, { e: 5 } ] }); * Parses a string into an array of DOM nodes. * * @param data HTML string to be parsed - * @param context_keepScripts Document element to serve as the context in which the HTML fragment will be created - * A Boolean indicating whether to include scripts passed in the HTML string + * @param context_keepScripts _@param_ `context_keepScripts` + *
+ * * `context` — Document element to serve as the context in which the HTML fragment will be created
+ * * `keepScripts` — A Boolean indicating whether to include scripts passed in the HTML string * @see \`{@link https://api.jquery.com/jQuery.parseHTML/ }\` * @since 1.8 * @example ​ ````Create an array of DOM nodes using an HTML string and insert it into a div. @@ -2763,9 +2776,11 @@ $.post( "test.php", { func: "getNameAndTime" }, function( data ) { * Load data from the server using a HTTP POST request. * * @param url A string containing the URL to which the request is sent. - * @param success_data A callback function that is executed if the request succeeds. Required if dataType is provided, but - * can be null in that case. - * A plain object or string that is sent to the server with the request. + * @param success_data _@param_ `success_data` + *
+ * * `success` — A callback function that is executed if the request succeeds. Required if `dataType` is provided, + * but can be `null` in that case.
+ * * `data` — A plain object or string that is sent to the server with the request. * @see \`{@link https://api.jquery.com/jQuery.post/ }\` * @since 1.0 * @example ​ ````Request the test.php page and send some additional data along (while still ignoring the return results). @@ -2843,10 +2858,12 @@ $( "#searchForm" ).submit(function( event ) { /** * Load data from the server using a HTTP POST request. * - * @param url_settings A string containing the URL to which the request is sent. - * A set of key/value pairs that configure the Ajax request. All properties except for url are - * optional. A default can be set for any option with $.ajaxSetup(). See jQuery.ajax( settings ) for a - * complete list of all settings. Type will automatically be set to POST. + * @param url_settings _@param_ `url_settings` + *
+ * * `url` — A string containing the URL to which the request is sent.
+ * * `settings` — A set of key/value pairs that configure the Ajax request. All properties except for `url` are optional. + * A default can be set for any option with \`{@link ajaxSetup $.ajaxSetup()}\`. See \`{@link https://api.jquery.com/jquery.ajax/#jQuery-ajax-settings jQuery.ajax( settings )}\` + * for a complete list of all settings. Type will automatically be set to `POST`. * @see \`{@link https://api.jquery.com/jQuery.post/ }\` * @since 1.0 * @since 1.12 @@ -12960,8 +12977,10 @@ $( "span:eq(3)" ).text( "" + jQuery.data( div, "test2" ) ); * Creates an object containing a set of properties ready to be used in the definition of custom animations. * * @param duration A string or number determining how long the animation will run. - * @param easing_complete A string indicating which easing function to use for the transition. - * A function to call once the animation is complete, called once per matched element. + * @param easing_complete _@param_ `easing_complete` + *
+ * * `easing` — A string indicating which easing function to use for the transition.
+ * * `complete` — A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/jQuery.speed/ }\` * @since 1.0 * @since 1.1 @@ -12971,8 +12990,11 @@ $( "span:eq(3)" ).text( "" + jQuery.data( div, "test2" ) ); /** * Creates an object containing a set of properties ready to be used in the definition of custom animations. * - * @param duration_complete_settings A string or number determining how long the animation will run. - * A function to call once the animation is complete, called once per matched element. + * @param duration_complete_settings _@param_ `duration_complete_settings` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `complete` — A function to call once the animation is complete, called once per matched element.
+ * * `settings` — * @see \`{@link https://api.jquery.com/jQuery.speed/ }\` * @since 1.0 * @since 1.1 @@ -13952,8 +13974,10 @@ $( "p" ).animate({ * Perform a custom animation of a set of CSS properties. * * @param properties An object of CSS properties and values that the animation will move toward. - * @param duration_easing A string or number determining how long the animation will run. - * A string indicating which easing function to use for the transition. + * @param duration_easing _@param_ `duration_easing` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `easing` — A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/animate/ }\` * @since 1.0 @@ -16703,8 +16727,10 @@ $( "input[type='checkbox']" ).check(); /** * Display the matched elements by fading them to opaque. * - * @param duration_easing A string or number determining how long the animation will run. - * A string indicating which easing function to use for the transition. + * @param duration_easing _@param_ `duration_easing` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `easing` — A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/fadeIn/ }\` * @since 1.0 @@ -16768,10 +16794,12 @@ $( "a" ).click(function() { /** * Display the matched elements by fading them to opaque. * - * @param duration_easing_complete_options A string or number determining how long the animation will run. - * A string indicating which easing function to use for the transition. - * A function to call once the animation is complete, called once per matched element. - * A map of additional options to pass to the method. + * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `easing` — A string indicating which easing function to use for the transition.
+ * * `complete` — A function to call once the animation is complete, called once per matched element.
+ * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/fadeIn/ }\` * @since 1.0 * @since 1.4.3 @@ -16889,8 +16917,10 @@ $( "#btn2" ).click(function() { /** * Hide the matched elements by fading them to transparent. * - * @param duration_easing A string or number determining how long the animation will run. - * A string indicating which easing function to use for the transition. + * @param duration_easing _@param_ `duration_easing` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `easing` — A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/fadeOut/ }\` * @since 1.0 @@ -16948,10 +16978,12 @@ $( "span" ).hover(function() { /** * Hide the matched elements by fading them to transparent. * - * @param duration_easing_complete_options A string or number determining how long the animation will run. - * A string indicating which easing function to use for the transition. - * A function to call once the animation is complete, called once per matched element. - * A map of additional options to pass to the method. + * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `easing` — A string indicating which easing function to use for the transition.
+ * * `complete` — A function to call once the animation is complete, called once per matched element.
+ * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/fadeOut/ }\` * @since 1.0 * @since 1.4.3 @@ -17201,8 +17233,10 @@ $( "button:last" ).click(function() { /** * Display or hide the matched elements by animating their opacity. * - * @param duration_easing A string or number determining how long the animation will run. - * A string indicating which easing function to use for the transition. + * @param duration_easing _@param_ `duration_easing` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `easing` — A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/fadeToggle/ }\` * @since 1.0 @@ -17243,10 +17277,12 @@ $( "button:last" ).click(function() { /** * Display or hide the matched elements by animating their opacity. * - * @param duration_easing_complete_options A string or number determining how long the animation will run. - * A string indicating which easing function to use for the transition. - * A function to call once the animation is complete, called once per matched element. - * A map of additional options to pass to the method. + * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `easing` — A string indicating which easing function to use for the transition.
+ * * `complete` — A function to call once the animation is complete, called once per matched element.
+ * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/fadeToggle/ }\` * @since 1.0 * @since 1.4.3 @@ -18108,8 +18144,10 @@ $( "#getw" ).click(function() { * Hide the matched elements. * * @param duration A string or number determining how long the animation will run. - * @param easing_complete A string indicating which easing function to use for the transition. - * A function to call once the animation is complete, called once per matched element. + * @param easing_complete _@param_ `easing_complete` + *
+ * * `easing` — A string indicating which easing function to use for the transition.
+ * * `complete` — A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/hide/ }\` * @since 1.0 * @since 1.4.3 @@ -18195,9 +18233,11 @@ $( "div" ).click(function() { /** * Hide the matched elements. * - * @param duration_complete_options A string or number determining how long the animation will run. - * A function to call once the animation is complete, called once per matched element. - * A map of additional options to pass to the method. + * @param duration_complete_options _@param_ `duration_complete_options` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `complete` — A function to call once the animation is complete, called once per matched element.
+ * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/hide/ }\` * @since 1.0 * @example ​ ````Hides all paragraphs then the link on click. @@ -19514,8 +19554,10 @@ $( "#feeds" ).load( "feeds.php", { limit: 25 }, function() { * Load data from the server and place the returned HTML into the matched element. * * @param url A string containing the URL to which the request is sent. - * @param complete_data A callback function that is executed when the request completes. - * A plain object or string that is sent to the server with the request. + * @param complete_data _@param_ `complete_data` + *
+ * * `complete` — A callback function that is executed when the request completes.
+ * * `data` — A plain object or string that is sent to the server with the request. * @see \`{@link https://api.jquery.com/load/ }\` * @since 1.0 * @example ​ ````Load another page's list items into an ordered list. @@ -20652,8 +20694,10 @@ $( "body" ).off( "click", "p", foo ); * * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as * "click", "keydown.myPlugin", or ".myPlugin". - * @param selector_handler A selector which should match the one originally passed to .on() when attaching event handlers. - * A function to execute each time the event is triggered. + * @param selector_handler _@param_ `selector_handler` + *
+ * * `selector` — A selector which should match the one originally passed to `.on()` when attaching event handlers.
+ * * `handler` — A handler function previously attached for the event(s), or the special value `false`. * @see \`{@link https://api.jquery.com/off/ }\` * @since 1.7 * @example ​ ````Remove all delegated click handlers from all paragraphs: @@ -23773,8 +23817,10 @@ $( "input" ).select(); * Display the matched elements. * * @param duration A string or number determining how long the animation will run. - * @param easing_complete A string indicating which easing function to use for the transition. - * A function to call once the animation is complete, called once per matched element. + * @param easing_complete _@param_ `easing_complete` + *
+ * * `easing` — A string indicating which easing function to use for the transition.
+ * * `complete` — A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/show/ }\` * @since 1.0 * @since 1.4.3 @@ -23881,9 +23927,11 @@ $( "form" ).submit(function( event ) { /** * Display the matched elements. * - * @param duration_complete_options A string or number determining how long the animation will run. - * A function to call once the animation is complete, called once per matched element. - * A map of additional options to pass to the method. + * @param duration_complete_options _@param_ `duration_complete_options` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `complete` — A function to call once the animation is complete, called once per matched element.
+ * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/show/ }\` * @since 1.0 * @example ​ ````Animates all hidden paragraphs to show slowly, completing the animation within 600 milliseconds. @@ -24116,8 +24164,10 @@ $( "p" ).slice( -1 ).wrapInner( "" ); /** * Display the matched elements with a sliding motion. * - * @param duration_easing A string or number determining how long the animation will run. - * A string indicating which easing function to use for the transition. + * @param duration_easing _@param_ `duration_easing` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `easing` — A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/slideDown/ }\` * @since 1.0 @@ -24182,10 +24232,12 @@ $( "div" ).click(function() { /** * Display the matched elements with a sliding motion. * - * @param duration_easing_complete_options A string or number determining how long the animation will run. - * A string indicating which easing function to use for the transition. - * A function to call once the animation is complete, called once per matched element. - * A map of additional options to pass to the method. + * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `easing` — A string indicating which easing function to use for the transition.
+ * * `complete` — A function to call once the animation is complete, called once per matched element.
+ * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/slideDown/ }\` * @since 1.0 * @since 1.4.3 @@ -24243,8 +24295,10 @@ $( document.body ).click(function () { /** * Display or hide the matched elements with a sliding motion. * - * @param duration_easing A string or number determining how long the animation will run. - * A string indicating which easing function to use for the transition. + * @param duration_easing _@param_ `duration_easing` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `easing` — A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/slideToggle/ }\` * @since 1.0 @@ -24312,10 +24366,12 @@ $( "#aa" ).click(function() { /** * Display or hide the matched elements with a sliding motion. * - * @param duration_easing_complete_options A string or number determining how long the animation will run. - * A string indicating which easing function to use for the transition. - * A function to call once the animation is complete, called once per matched element. - * A map of additional options to pass to the method. + * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `easing` — A string indicating which easing function to use for the transition.
+ * * `complete` — A function to call once the animation is complete, called once per matched element.
+ * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/slideToggle/ }\` * @since 1.0 * @since 1.4.3 @@ -24366,8 +24422,10 @@ $( "button" ).click(function() { /** * Hide the matched elements with a sliding motion. * - * @param duration_easing A string or number determining how long the animation will run. - * A string indicating which easing function to use for the transition. + * @param duration_easing _@param_ `duration_easing` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `easing` — A string indicating which easing function to use for the transition. * @param complete A function to call once the animation is complete, called once per matched element. * @see \`{@link https://api.jquery.com/slideUp/ }\` * @since 1.0 @@ -24421,10 +24479,12 @@ $( "button" ).click(function() { /** * Hide the matched elements with a sliding motion. * - * @param duration_easing_complete_options A string or number determining how long the animation will run. - * A string indicating which easing function to use for the transition. - * A function to call once the animation is complete, called once per matched element. - * A map of additional options to pass to the method. + * @param duration_easing_complete_options _@param_ `duration_easing_complete_options` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `easing` — A string indicating which easing function to use for the transition.
+ * * `complete` — A function to call once the animation is complete, called once per matched element.
+ * * `options` — A map of additional options to pass to the method. * @see \`{@link https://api.jquery.com/slideUp/ }\` * @since 1.0 * @since 1.4.3 @@ -24797,10 +24857,12 @@ disp( $( "div" ).toArray().reverse() ); /** * Display or hide the matched elements. * - * @param duration_complete_options_display A string or number determining how long the animation will run. - * A function to call once the animation is complete, called once per matched element. - * A map of additional options to pass to the method. - * Use true to show the element or false to hide it. + * @param duration_complete_options_display _@param_ `duration_complete_options_display` + *
+ * * `duration` — A string or number determining how long the animation will run.
+ * * `complete` — A function to call once the animation is complete, called once per matched element.
+ * * `options` — A map of additional options to pass to the method.
+ * * `display` — Use true to show the element or false to hide it. * @see \`{@link https://api.jquery.com/toggle/ }\` * @since 1.0 * @since 1.3 From 52a012c3621b3a7cfa915b062ce6eba581b8ff3e Mon Sep 17 00:00:00 2001 From: zackzeno Date: Thu, 11 Oct 2018 14:55:48 -0400 Subject: [PATCH 027/615] [@types/history] History should be generic (#29024) * Make exec / createRow methods generic Saying they take/return Object is inaccurate, I wasn't sure if they should use object, any, or T extends object. I went with T extends object since it seems most correct. * Update tests * Update lint * Replace generic with object from "Common Mistakes" * Make History object generic * Make History object generic * Fix MemoryHistory definition, Fixed tested --- types/history/createMemoryHistory.d.ts | 6 +++--- types/history/history-tests.ts | 6 +++--- types/history/index.d.ts | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/types/history/createMemoryHistory.d.ts b/types/history/createMemoryHistory.d.ts index e1aca026e2..6142f4e3a4 100644 --- a/types/history/createMemoryHistory.d.ts +++ b/types/history/createMemoryHistory.d.ts @@ -1,4 +1,4 @@ -import { History, Location } from './index'; +import { History, Location, LocationState } from './index'; import { getConfirmation } from './DOMUtils'; export interface MemoryHistoryBuildOptions { @@ -8,9 +8,9 @@ export interface MemoryHistoryBuildOptions { keyLength?: number; } -export interface MemoryHistory extends History { +export interface MemoryHistory extends History { index: number; - entries: Location[]; + entries: Location[]; canGo(n: number): boolean; } diff --git a/types/history/history-tests.ts b/types/history/history-tests.ts index 0a63059b12..689035c9ed 100644 --- a/types/history/history-tests.ts +++ b/types/history/history-tests.ts @@ -1,4 +1,4 @@ -import { createBrowserHistory, createMemoryHistory, createHashHistory, createLocation, Location } from 'history'; +import { createBrowserHistory, createMemoryHistory, createHashHistory, createLocation, Location, History, MemoryHistory } from 'history'; import * as LocationUtils from 'history/LocationUtils'; import * as PathUtils from 'history/PathUtils'; import * as DOMUtils from 'history/DOMUtils'; @@ -7,7 +7,7 @@ import * as ExecutionEnvironment from 'history/ExecutionEnvironment'; let input = { value: "" }; { - let history = createBrowserHistory(); + let history: History<{some: 'state'}> = createBrowserHistory(); // Listen for changes to the current location. The // listener is called once immediately. @@ -43,7 +43,7 @@ let input = { value: "" }; } { - let history = createMemoryHistory(); + let history: MemoryHistory<{the: 'state'}> = createMemoryHistory(); // Pushing a path string. history.push('/the/path'); diff --git a/types/history/index.d.ts b/types/history/index.d.ts index 1c7b35b8f2..3fff510bd2 100644 --- a/types/history/index.d.ts +++ b/types/history/index.d.ts @@ -8,20 +8,20 @@ export as namespace History; export type Action = 'PUSH' | 'POP' | 'REPLACE'; export type UnregisterCallback = () => void; -export interface History { +export interface History { length: number; action: Action; - location: Location; - push(path: Path, state?: LocationState): void; - push(location: LocationDescriptorObject): void; - replace(path: Path, state?: LocationState): void; - replace(location: LocationDescriptorObject): void; + location: Location; + push(path: Path, state?: HistoryLocationState): void; + push(location: LocationDescriptorObject): void; + replace(path: Path, state?: HistoryLocationState): void; + replace(location: LocationDescriptorObject): void; go(n: number): void; goBack(): void; goForward(): void; block(prompt?: boolean | string | TransitionPromptHook): UnregisterCallback; listen(listener: LocationListener): UnregisterCallback; - createHref(location: LocationDescriptorObject): Href; + createHref(location: LocationDescriptorObject): Href; } export interface Location { From 8baf389b6957c1b13a44689285da79cd38a273d8 Mon Sep 17 00:00:00 2001 From: afholderman Date: Thu, 11 Oct 2018 13:52:57 -0600 Subject: [PATCH 028/615] create AposConstructor Type, add beforeConstruct in ModuleOptions (#29445) * create AposConstructor Type, add beforeConstruct in ModuleOptions * Add all options to AposConstructor --- types/apostrophe/index.d.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/types/apostrophe/index.d.ts b/types/apostrophe/index.d.ts index 7083405e8e..5201453542 100644 --- a/types/apostrophe/index.d.ts +++ b/types/apostrophe/index.d.ts @@ -7,7 +7,10 @@ export = apostrophe; export as namespace apos; -declare function apostrophe(options: any, ...args: any[]): any; +declare function apostrophe( + options: apostrophe.AposConstructor, + ...args: any[] +): any; declare namespace apostrophe { const moogBundle: { @@ -15,6 +18,20 @@ declare namespace apostrophe { modules: string[]; }; + // Pass in custom modules as first argument + // second argument is additional custom options e.g. restApi exposed by apostrophe-headless + interface AposConstructor { + afterInit?: () => void; + afterListen?: () => void; + initFailed?: (error: any) => void; + baseUrl?: string; + modules: { [K in AposCoreModules & M]?: AposModuleOptions | O }; + prefix?: string; + root?: string; + rootDir?: string; + shortName: string; + } + const ui: { globalBusy: (state: any) => any; link: ( @@ -297,6 +314,7 @@ declare namespace apostrophe { label: string; fields: string[]; }[]; + beforeConstruct?: (self: any, options: any) => any; defer?: boolean; filters?: { projection?: { From 7b99141476d0eec86edc60f04a33c62e927be856 Mon Sep 17 00:00:00 2001 From: Christian Chown Date: Thu, 11 Oct 2018 22:25:22 +0100 Subject: [PATCH 029/615] Add types for react-native-huawei-protected-apps (#29664) --- .../index.d.ts | 19 +++++++++++++++ ...act-native-huawei-protected-apps-tests.tsx | 12 ++++++++++ .../tsconfig.json | 24 +++++++++++++++++++ .../tslint.json | 1 + 4 files changed, 56 insertions(+) create mode 100644 types/react-native-huawei-protected-apps/index.d.ts create mode 100644 types/react-native-huawei-protected-apps/react-native-huawei-protected-apps-tests.tsx create mode 100644 types/react-native-huawei-protected-apps/tsconfig.json create mode 100644 types/react-native-huawei-protected-apps/tslint.json diff --git a/types/react-native-huawei-protected-apps/index.d.ts b/types/react-native-huawei-protected-apps/index.d.ts new file mode 100644 index 0000000000..cecb0377c6 --- /dev/null +++ b/types/react-native-huawei-protected-apps/index.d.ts @@ -0,0 +1,19 @@ +// Type definitions for react-native-huawei-protected-apps 0.0 +// Project: https://github.com/pgengoux/react-native-huawei-protected-apps +// Definitions by: Christian Chown +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.9 + +export interface HuaweiProtectedAppsConfig { + title: string; + text: string; + doNotShowAgainText: string; + positiveText: string; + negativeText: string; +} + +declare let HuaweiProtectedApps: { + AlertIfHuaweiDevice(config: HuaweiProtectedAppsConfig): void; +}; + +export default HuaweiProtectedApps; diff --git a/types/react-native-huawei-protected-apps/react-native-huawei-protected-apps-tests.tsx b/types/react-native-huawei-protected-apps/react-native-huawei-protected-apps-tests.tsx new file mode 100644 index 0000000000..8bb0047300 --- /dev/null +++ b/types/react-native-huawei-protected-apps/react-native-huawei-protected-apps-tests.tsx @@ -0,0 +1,12 @@ +import * as React from "react"; +import HuaweiProtectedApps from "react-native-huawei-protected-apps"; + +const config = { + title: "Huawei Protected Apps", + text: "This app requires to be enabled in 'Protected Apps' in order to receive push notifcations", + doNotShowAgainText: "Do not show again", + positiveText: "PROTECTED APPS", + negativeText: "CANCEL" +}; + +HuaweiProtectedApps.AlertIfHuaweiDevice(config); diff --git a/types/react-native-huawei-protected-apps/tsconfig.json b/types/react-native-huawei-protected-apps/tsconfig.json new file mode 100644 index 0000000000..3c79da2804 --- /dev/null +++ b/types/react-native-huawei-protected-apps/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "jsx": "react-native", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-native-huawei-protected-apps-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-native-huawei-protected-apps/tslint.json b/types/react-native-huawei-protected-apps/tslint.json new file mode 100644 index 0000000000..2750cc0197 --- /dev/null +++ b/types/react-native-huawei-protected-apps/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } \ No newline at end of file From 86fd332d858cd419e5b74fdf93a16b9b8e3cf346 Mon Sep 17 00:00:00 2001 From: Leonard Thieu Date: Thu, 11 Oct 2018 17:26:08 -0400 Subject: [PATCH 030/615] [jquery] Remove removed parameters from `EasingMethod`. (#29663) These were never available in jQuery 3.0+. --- types/jquery/index.d.ts | 27 +-------------------------- types/jquery/jquery-tests.ts | 6 +----- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/types/jquery/index.d.ts b/types/jquery/index.d.ts index 77e8ecbfaf..a75ad457ad 100644 --- a/types/jquery/index.d.ts +++ b/types/jquery/index.d.ts @@ -30179,32 +30179,7 @@ $( "input" ).click(function() { (fx: Tween): void; } - /** - * @deprecated ​ Deprecated. - * - * **Cause**: Additional arguments for `jQuery.easing` methods were never documented and are redundant since the same behavior can be easily achieved without them. When Migrate detects this case, the specified easing function is not used and `"linear"` easing is used instead for the animation. - * - * **Solution**: Rewrite the easing function to only use one argument. If you are using the \`{@link http://gsgd.co.uk/sandbox/jquery/easing jQuery Easing plugin}\`, upgrade to \`{@link https://github.com/gdsmith/jquery.easing/releases version 1.4.0 or higher}\`. - * - * For example, to implement \`{@link https://en.wikipedia.org/wiki/Cubic_function Cubic easing}\`, the old function might be: - * -```js -jQuery.easing.easeInCubic = function ( p, t, b, c, d ) { - return c * ( t /= d ) * t * t + b; -} -``` - * - * You can achive same effect with this: - * -```js -jQuery.easing.easeInCubic = function ( p ) { - return Math.pow( p, 3 ); -} -``` - * - * See jQuery-ui \`{@link https://github.com/jquery/jquery-ui/commit/c0093b599fcd58b6ad122ab425c4cc1a4da4a520#diff-9cd789a170c765edcf0f4854db386e1a commit}\` for other possible cases. - */ - type EasingMethod = (p: number, t: number, b: number, c: number, d: number) => number; + type EasingMethod = (percent: number) => number; interface Easings { [name: string]: EasingMethod; diff --git a/types/jquery/jquery-tests.ts b/types/jquery/jquery-tests.ts index bfb58a3e60..b4c0414fc0 100644 --- a/types/jquery/jquery-tests.ts +++ b/types/jquery/jquery-tests.ts @@ -7901,11 +7901,7 @@ function JQuery_EffectsOptions() { } function JQuery_Easings() { - jQuery.easing.easeInCubic = (p: number, t: number, b: number, c: number, d: number) => { - return c * (t /= d) * t * t + b; - }; - - jQuery.easing.easeInCubic = (p: number) => { + jQuery.easing.easeInCubic = (p) => { return Math.pow(p, 3); }; } From b06ea9d0f01479ee7d415e8cf1701eb8509c3616 Mon Sep 17 00:00:00 2001 From: rdoo Date: Thu, 11 Oct 2018 23:26:57 +0200 Subject: [PATCH 031/615] osmosis: add more types (#29501) --- types/osmosis/index.d.ts | 31 ++++++++++++++++++++++++++++--- types/osmosis/osmosis-tests.ts | 11 +++++++++-- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/types/osmosis/index.d.ts b/types/osmosis/index.d.ts index 4c03388047..8d9f640f8b 100644 --- a/types/osmosis/index.d.ts +++ b/types/osmosis/index.d.ts @@ -56,8 +56,33 @@ interface Osmosis { * result data, osmosis finished */ data(callback: (param: any) => any): Osmosis; - } - declare const osmosis: Osmosis; + /** + * Set configuration options for the **preceeding** command on down the chain. + */ + config(option: string | { [key: string]: any }, value?: any): Osmosis; - export = osmosis; + /** + * Set a cookie. Short for `.config({ cookies: ... })`. Note: Setting a cookie to `null` will delete the cookie. + */ + cookie(name: string, value: string | null): Osmosis; + + /** + * Set an HTTP header. Short for `.config({ headers: ... })` + */ + header(name: string, value: string): Osmosis; + + /** + * Set multiple HTTP headers. Short for `.config({ headers: ... })`. + */ + headers(headers: { [key: string]: string }): Osmosis; + + /** + * Call a callback when the Osmosis instance has completely finished. + */ + done(callback: () => any): Osmosis; +} + +declare const osmosis: Osmosis; + +export = osmosis; diff --git a/types/osmosis/osmosis-tests.ts b/types/osmosis/osmosis-tests.ts index f0c39d4312..94f08db15e 100644 --- a/types/osmosis/osmosis-tests.ts +++ b/types/osmosis/osmosis-tests.ts @@ -12,9 +12,15 @@ const errorFunction = (error: string) => { const myError = error; }; -// example is from https://github.com/rchipka/node-osmosis#example +const doneFunction = () => {}; + +// modified example from https://github.com/rchipka/node-osmosis#example osmosis + .config({ headers: { 'test-header-name': 'test-header-value' } }) + .headers({ 'test-header-name': 'test-header-value' }) + .header('test-header-name', 'test-header-value') + .cookie('test-cookie-name', 'test-cookie-value') .get('www.craigslist.org/about/sites') .find('h1 + div a') .set('location') @@ -39,4 +45,5 @@ osmosis }) .log(logFunction) .error(errorFunction) - .debug(debugFunction); + .debug(debugFunction) + .done(doneFunction); From 2f80e7c8903ce3ca47adfc72b878cea87dbd6120 Mon Sep 17 00:00:00 2001 From: Kacper Wiszczuk Date: Thu, 11 Oct 2018 23:39:04 +0200 Subject: [PATCH 032/615] React-native Add new accessibility props --- types/react-native/index.d.ts | 34 +++++++++++++++++++++++++++++++ types/react-native/test/index.tsx | 10 ++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 6d2ee2e433..918b20e250 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -1844,8 +1844,36 @@ export interface AccessibilityProps extends AccessibilityPropsAndroid, Accessibi * label is constructed by traversing all the children and accumulating all the Text nodes separated by space. */ accessibilityLabel?: string; + + /** + * Accessibility Role tells a person using either VoiceOver on iOS or TalkBack on Android the type of element that is focused on. + */ + accessibilityRole?: AccessibilityRole; + /** + * Accessibility State tells a person using either VoiceOver on iOS or TalkBack on Android the state of the element currently focused on. + */ + accessibilityStates?: "selected" | "disabled"; + + /** + * An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label. + */ + accessibilityHint?: string; } +export type AccessibilityRole = + | "none" + | "button" + | "link" + | "search" + | "image" + | "keyboardkey" + | "text" + | "adjustable" + | "header" + | "summary" + | "imagebutton"; + + export interface AccessibilityPropsAndroid { /** * In some cases, we also want to alert the end user of the type of selected component (i.e., that it is a “button”). @@ -1904,6 +1932,12 @@ export interface AccessibilityPropsIOS { * @platform ios */ onMagicTap?: () => void; + + /** + * https://facebook.github.io/react-native/docs/accessibility#accessibilityignoresinvertcolorsios + * @platform ios + */ + accessibilityIgnoresInvertColors?: boolean; } type AccessibilityTrait = diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 2b2b4ecaa1..648d6024c3 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -744,8 +744,16 @@ class AccessibilityTest extends React.Component { importantForAccessibility={"no-hide-descendants"} accessibilityTraits={'none'} onAccessibilityTap={() => {}} + accessibilityRole="header" + accessibilityStates="selected" + accessibilityHint="Very importent header" > - Text + + Text + ); From b7d0bad41004f084340a3db6579c472d1bc9e6e2 Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 11 Oct 2018 15:36:06 -0700 Subject: [PATCH 033/615] newrelic: Remove unnecessary namespace/interface (#29662) --- types/newrelic/index.d.ts | 629 +++++++++++++++++++------------------- 1 file changed, 312 insertions(+), 317 deletions(-) diff --git a/types/newrelic/index.d.ts b/types/newrelic/index.d.ts index f6c54f5a4b..0c674e4646 100644 --- a/types/newrelic/index.d.ts +++ b/types/newrelic/index.d.ts @@ -4,348 +4,343 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // https://docs.newrelic.com/docs/agents/nodejs-agent/api-guides/nodejs-agent-api -declare namespace newrelic { - interface NewRelicAPI { - /** - * Give the current transaction a custom name. - * - * Overrides any New Relic naming rules set in configuration or from New Relic's servers. - * - * IMPORTANT: this function must be called when a transaction is active. New - * Relic transactions are tied to web requests, so this method may be called - * from within HTTP or HTTPS listener functions, Express routes, or other - * contexts where a web request or response object are in scope. - * - * The `name` will be prefixed with 'Custom/' when sent. - */ - setTransactionName(name: string): void; - /** - * Returns a handle on the currently executing transaction. - * - * This handle can then be used to end or ignore a given transaction safely from any context. - * It is best used with newrelic.startWebTransaction() and newrelic.startBackgroundTransaction(). - */ - getTransaction(): TransactionHandle; +/** + * Give the current transaction a custom name. + * + * Overrides any New Relic naming rules set in configuration or from New Relic's servers. + * + * IMPORTANT: this function must be called when a transaction is active. New + * Relic transactions are tied to web requests, so this method may be called + * from within HTTP or HTTPS listener functions, Express routes, or other + * contexts where a web request or response object are in scope. + * + * The `name` will be prefixed with 'Custom/' when sent. + */ +export function setTransactionName(name: string): void; - /** - * Specify the `Dispatcher` and `Dispatcher Version` environment values. - * - * A dispatcher is typically the service responsible for brokering - * the request with the process responsible for responding to the - * request. For example Node's `http` module would be the dispatcher - * for incoming HTTP requests. - */ - setDispatcher(name: string, version?: string): void; +/** + * Returns a handle on the currently executing transaction. + * + * This handle can then be used to end or ignore a given transaction safely from any context. + * It is best used with newrelic.startWebTransaction() and newrelic.startBackgroundTransaction(). + */ +export function getTransaction(): TransactionHandle; - /** - * Give the current transaction a name based on your own idea of what - * constitutes a controller in your Node application. Also allows you to - * optionally specify the action being invoked on the controller. If the action - * is omitted, then the API will default to using the HTTP method used in the - * request (e.g. GET, POST, DELETE). Overrides any New Relic naming rules set - * in configuration or from New Relic's servers. - * - * IMPORTANT: this function must be called when a transaction is active. New - * Relic transactions are tied to web requests, so this method may be called - * from within HTTP or HTTPS listener functions, Express routes, or other - * contexts where a web request or response object are in scope. - * - * The `name` will be prefixed with 'Controller/' when sent. - * The `action` defaults to the HTTP method used for the request. - */ - setControllerName(name: string, action: string): void; +/** + * Specify the `Dispatcher` and `Dispatcher Version` environment values. + * + * A dispatcher is typically the service responsible for brokering + * the request with the process responsible for responding to the + * request. For example Node's `http` module would be the dispatcher + * for incoming HTTP requests. + */ +export function setDispatcher(name: string, version?: string): void; - /** - * Add a custom attribute to the current transaction. - * - * Some attributes are reserved (see CUSTOM_BLACKLIST in the docs for the current, very short list), and - * as with most API methods, this must be called in the context of an - * active transaction. - * - * Most recently set value wins. - */ - addCustomAttribute(key: string, value: string): void; +/** + * Give the current transaction a name based on your own idea of what + * constitutes a controller in your Node application. Also allows you to + * optionally specify the action being invoked on the controller. If the action + * is omitted, then the API will default to using the HTTP method used in the + * request (e.g. GET, POST, DELETE). Overrides any New Relic naming rules set + * in configuration or from New Relic's servers. + * + * IMPORTANT: this function must be called when a transaction is active. New + * Relic transactions are tied to web requests, so this method may be called + * from within HTTP or HTTPS listener functions, Express routes, or other + * contexts where a web request or response object are in scope. + * + * The `name` will be prefixed with 'Controller/' when sent. + * The `action` defaults to the HTTP method used for the request. + */ +export function setControllerName(name: string, action: string): void; - /** - * Adds all custom attributes in an object to the current transaction. - * - * See documentation for `addCustomAttribute` for more information on setting custom attributes. - */ - addCustomAttributes(atts: { [key: string]: string }): void; +/** + * Add a custom attribute to the current transaction. + * + * Some attributes are reserved (see CUSTOM_BLACKLIST in the docs for the current, very short list), and + * as with most API methods, this must be called in the context of an + * active transaction. + * + * Most recently set value wins. + */ +export function addCustomAttribute(key: string, value: string): void; - /** - * Tell the tracer whether to ignore the current transaction. - * - * The most common use for this will be to mark a transaction as ignored (maybe it's handling - * a websocket polling channel, or maybe it's an external call you don't care - * is slow), but it's also useful when you want a transaction that would - * otherwise be ignored due to URL or transaction name normalization rules - * to *not* be ignored. - */ - setIgnoreTransaction(ignored: boolean): void; +/** + * Adds all custom attributes in an object to the current transaction. + * + * See documentation for `addCustomAttribute` for more information on setting custom attributes. + */ +export function addCustomAttributes(atts: { [key: string]: string }): void; - /** - * Send errors to New Relic that you've already handled yourself. - * - * NOTE: Errors that are recorded using this method do _not_ obey the `ignore_status_codes` configuration. - * - * Optional. Any custom attributes to be displayed in the New Relic UI. - */ - noticeError(error: Error, customAttributes?: { [key: string]: string }): void; +/** + * Tell the tracer whether to ignore the current transaction. + * + * The most common use for this will be to mark a transaction as ignored (maybe it's handling + * a websocket polling channel, or maybe it's an external call you don't care + * is slow), but it's also useful when you want a transaction that would + * otherwise be ignored due to URL or transaction name normalization rules + * to *not* be ignored. + */ +export function setIgnoreTransaction(ignored: boolean): void; - /** - * If the URL for a transaction matches the provided pattern, name the - * transaction with the provided name. - * - * If there are capture groups in the pattern (which is a standard JavaScript regular expression, - * and can be passed as either a RegExp or a string), then the substring matches ($1, $2, - * etc.) are replaced in the name string. BE CAREFUL WHEN USING SUBSTITUTION. - * If the replacement substrings are highly variable (i.e. are identifiers, - * GUIDs, or timestamps), the rule will generate too many metrics and - * potentially get your application blacklisted by New Relic. - * - * An example of a good rule with replacements: - * - * newrelic.addNamingRule('^/storefront/(v[1-5])/(item|category|tag)', 'CommerceAPI/$1/$2') - * - * An example of a bad rule with replacements: - * - * newrelic.addNamingRule('^/item/([0-9a-f]+)', 'Item/$1') - * - * Keep in mind that the original URL and any query parameters will be sent - * along with the request, so slow transactions will still be identifiable. - * - * Naming rules can not be removed once added. They can also be added via the - * agent's configuration. See configuration documentation for details. - */ - addNamingRule(pattern: RegExp | string, name: string): void; +/** + * Send errors to New Relic that you've already handled yourself. + * + * NOTE: Errors that are recorded using this method do _not_ obey the `ignore_status_codes` configuration. + * + * Optional. Any custom attributes to be displayed in the New Relic UI. + */ +export function noticeError(error: Error, customAttributes?: { [key: string]: string }): void; - /** - * If the URL for a transaction matches the provided pattern, ignore the transaction attached to that URL. - * - * Useful for filtering socket.io connections and other long-polling requests out of your agents to keep - * them from distorting an app's apdex or mean response time. - * - * Example: - * - * newrelic.addIgnoringRule('^/socket\\.io/') - */ - addIgnoringRule(pattern: RegExp | string): void; +/** + * If the URL for a transaction matches the provided pattern, name the + * transaction with the provided name. + * + * If there are capture groups in the pattern (which is a standard JavaScript regular expression, + * and can be passed as either a RegExp or a string), then the substring matches ($1, $2, + * etc.) are replaced in the name string. BE CAREFUL WHEN USING SUBSTITUTION. + * If the replacement substrings are highly variable (i.e. are identifiers, + * GUIDs, or timestamps), the rule will generate too many metrics and + * potentially get your application blacklisted by New Relic. + * + * An example of a good rule with replacements: + * + * newrelic.addNamingRule('^/storefront/(v[1-5])/(item|category|tag)', 'CommerceAPI/$1/$2') + * + * An example of a bad rule with replacements: + * + * newrelic.addNamingRule('^/item/([0-9a-f]+)', 'Item/$1') + * + * Keep in mind that the original URL and any query parameters will be sent + * along with the request, so slow transactions will still be identifiable. + * + * Naming rules can not be removed once added. They can also be added via the + * agent's configuration. See configuration documentation for details. + */ +export function addNamingRule(pattern: RegExp | string, name: string): void; - /** - * Get the header necessary for Browser Monitoring. - * - * This script must be manually injected into your templates, as high as possible - * in the header, but _after_ any X-UA-COMPATIBLE HTTP-EQUIV meta tags. - * Otherwise you may hurt IE! - * - * This method must be called _during_ a transaction, and must be called every - * time you want to generate the headers. - * - * Do *not* reuse the headers between users, or even between requests. - */ - getBrowserTimingHeader(): string; +/** + * If the URL for a transaction matches the provided pattern, ignore the transaction attached to that URL. + * + * Useful for filtering socket.io connections and other long-polling requests out of your agents to keep + * them from distorting an app's apdex or mean response time. + * + * Example: + * + * newrelic.addIgnoringRule('^/socket\\.io/') + */ +export function addIgnoringRule(pattern: RegExp | string): void; - /** - * Instrument a particular method to improve visibility into a transaction, - * or optionally turn it into a metric. - * - * The name defines a name for the segment. This name will be visible in transaction traces and - * as a new metric in the New Relic UI. - * The record flag defines whether the segment should be recorded as a metric. - * The handler is the function you want to track as a segment. - * The optional callback is a function passed to the handler to fire after its work is done. - * - * The agent begins timing the segment when startSegment is called. - * The segment is ended when either the handler finishes executing, or callback is fired, if it is provided. - * If a promise is returned from the handler, the segment's ending will be tied to that promise resolving or rejecting. - */ - startSegment>(name: string, record: boolean, handler: T): T; - startSegment any>(name: string, record: boolean, handler: (cb?: C) => T, callback?: C): T; +/** + * Get the header necessary for Browser Monitoring. + * + * This script must be manually injected into your templates, as high as possible + * in the header, but _after_ any X-UA-COMPATIBLE HTTP-EQUIV meta tags. + * Otherwise you may hurt IE! + * + * This method must be called _during_ a transaction, and must be called every + * time you want to generate the headers. + * + * Do *not* reuse the headers between users, or even between requests. + */ +export function getBrowserTimingHeader(): string; - /** - * Instrument a particular callback to improve visibility into a transaction. - * - * Use this API call to improve instrumentation of a particular method, or to track work across asynchronous - * boundaries by calling createTracer() in both the target function and its parent asynchronous function. - * - * The name will be visible in transaction traces and as a new metric in the New Relic UI. - * - * The agent begins timing the segment when createTracer is called, and ends the segment when the callback - * defined by the callback argument finishes executing. - * - * @deprecated - * This method has been deprecated in favor of newrelic.startSegment() - */ - createTracer any>(name: string, handle: T): T; +/** + * Instrument a particular method to improve visibility into a transaction, + * or optionally turn it into a metric. + * + * The name defines a name for the segment. This name will be visible in transaction traces and + * as a new metric in the New Relic UI. + * The record flag defines whether the segment should be recorded as a metric. + * The handler is the function you want to track as a segment. + * The optional callback is a function passed to the handler to fire after its work is done. + * + * The agent begins timing the segment when startSegment is called. + * The segment is ended when either the handler finishes executing, or callback is fired, if it is provided. + * If a promise is returned from the handler, the segment's ending will be tied to that promise resolving or rejecting. + */ +export function startSegment>(name: string, record: boolean, handler: T): T; +export function startSegment any>(name: string, record: boolean, handler: (cb?: C) => T, callback?: C): T; - /** - * Creates and starts a web transaction to record work done in the handle supplied. - * - * This transaction will run until the handle - * synchronously returns UNLESS: - * 1. The handle function returns a promise, where the end of the - * transaction will be tied to the end of the promise returned. - * 2. `getTransaction` is called in the handle, flagging the - * transaction as externally handled. In this case the transaction - * will be ended when `TransactionHandle#end` is called in the user's code. - * - * @example - * var newrelic = require('newrelic') - * newrelic.startWebTransaction('/some/url/path', function() { - * var transaction = newrelic.getTransaction() - * setTimeout(function() { - * // do some work - * transaction.end() - * }, 100) - * }) - * - * The `url` is used to name and group related transactions in APM, - * so it should be a generic name and not include any variable parameters. - */ - startWebTransaction(url: string, handle: (...args: any[]) => any): any; +/** + * Instrument a particular callback to improve visibility into a transaction. + * + * Use this API call to improve instrumentation of a particular method, or to track work across asynchronous + * boundaries by calling createTracer() in both the target function and its parent asynchronous function. + * + * The name will be visible in transaction traces and as a new metric in the New Relic UI. + * + * The agent begins timing the segment when createTracer is called, and ends the segment when the callback + * defined by the callback argument finishes executing. + * + * @deprecated + * This method has been deprecated in favor of newrelic.startSegment() + */ +export function createTracer any>(name: string, handle: T): T; - /** - * Creates and starts a background transaction to record work done in the handle supplied. - * - * This transaction will run until the handle - * synchronously returns UNLESS: - * 1. The handle function returns a promise, where the end of the - * transaction will be tied to the end of the promise returned. - * 2. `API#getTransaction` is called in the handle, flagging the - * transaction as externally handled. In this case the transaction - * will be ended when `TransactionHandle#end` is called in the user's code. - * - * @example - * var newrelic = require('newrelic') - * newrelic.startBackgroundTransaction('Red October', 'Subs', function() { - * var transaction = newrelic.getTransaction() - * setTimeout(function() { - * // do some work - * transaction.end() - * }, 100) - * }) - * - * The `url` is used to name and group related transactions in APM, - * so it should be a generic name and not include any variable parameters. - * - * The optional `group can be used for grouping background transactions in APM. - * For more information see: - * https://docs.newrelic.com/docs/apm/applications-menu/monitoring/transactions-page#txn-type-dropdown - */ - startBackgroundTransaction(name: string, handle: (...args: any[]) => any): any; - startBackgroundTransaction(name: string, group: string, handle: (...args: any[]) => any): any; +/** + * Creates and starts a web transaction to record work done in the handle supplied. + * + * This transaction will run until the handle + * synchronously returns UNLESS: + * 1. The handle function returns a promise, where the end of the + * transaction will be tied to the end of the promise returned. + * 2. `getTransaction` is called in the handle, flagging the + * transaction as externally handled. In this case the transaction + * will be ended when `TransactionHandle#end` is called in the user's code. + * + * @example + * var newrelic = require('newrelic') + * newrelic.startWebTransaction('/some/url/path', function() { + * var transaction = newrelic.getTransaction() + * setTimeout(function() { + * // do some work + * transaction.end() + * }, 100) + * }) + * + * The `url` is used to name and group related transactions in APM, + * so it should be a generic name and not include any variable parameters. + */ +export function startWebTransaction(url: string, handle: (...args: any[]) => any): any; - /** - * End the current web or background custom transaction. - * - * This method requires being in the correct transaction context when called. - */ - endTransaction(): void; +/** + * Creates and starts a background transaction to record work done in the handle supplied. + * + * This transaction will run until the handle + * synchronously returns UNLESS: + * 1. The handle function returns a promise, where the end of the + * transaction will be tied to the end of the promise returned. + * 2. `API#getTransaction` is called in the handle, flagging the + * transaction as externally handled. In this case the transaction + * will be ended when `TransactionHandle#end` is called in the user's code. + * + * @example + * var newrelic = require('newrelic') + * newrelic.startBackgroundTransaction('Red October', 'Subs', function() { + * var transaction = newrelic.getTransaction() + * setTimeout(function() { + * // do some work + * transaction.end() + * }, 100) + * }) + * + * The `url` is used to name and group related transactions in APM, + * so it should be a generic name and not include any variable parameters. + * + * The optional `group can be used for grouping background transactions in APM. + * For more information see: + * https://docs.newrelic.com/docs/apm/applications-menu/monitoring/transactions-page#txn-type-dropdown + */ +export function startBackgroundTransaction(name: string, handle: (...args: any[]) => any): any; +export function startBackgroundTransaction(name: string, group: string, handle: (...args: any[]) => any): any; - /** - * Record an event-based metric, usually associated with a particular duration. - * - * The `name` must be a string following standard metric naming rules. The `value` will - * usually be a number, but it can also be an object. - * * When `value` is a numeric value, it should represent the magnitude of a measurement - * associated with an event; for example, the duration for a particular method call. - * * When `value` is an object, it must contain count, total, min, max, and sumOfSquares - * keys, all with number values. This form is useful to aggregate metrics on your own - * and report them periodically; for example, from a setInterval. These values will - * be aggregated with any previously collected values for the same metric. The names - * of these keys match the names of the keys used by the platform API. - */ - recordMetric(name: string, value: number | Metric): void; +/** + * End the current web or background custom transaction. + * + * This method requires being in the correct transaction context when called. + */ +export function endTransaction(): void; - /** - * Update a metric that acts as a simple counter. - * - * The count of the selected metric will be incremented by the specified amount, defaulting to 1. - */ - incrementMetric(name: string, value?: number): void; +/** + * Record an event-based metric, usually associated with a particular duration. + * + * The `name` must be a string following standard metric naming rules. The `value` will + * usually be a number, but it can also be an object. + * * When `value` is a numeric value, it should represent the magnitude of a measurement + * associated with an event; for example, the duration for a particular method call. + * * When `value` is an object, it must contain count, total, min, max, and sumOfSquares + * keys, all with number values. This form is useful to aggregate metrics on your own + * and report them periodically; for example, from a setInterval. These values will + * be aggregated with any previously collected values for the same metric. The names + * of these keys match the names of the keys used by the platform API. + */ +export function recordMetric(name: string, value: number | Metric): void; - /** - * Record an event-based metric, usually associated with a particular duration. - * - * `eventType` must be an alphanumeric string less than 255 characters. - * The keys of `attributes` must be shorter than 255 characters. - */ - recordCustomEvent(eventType: string, attributes: { [keys: string]: boolean | number | string }): void; +/** + * Update a metric that acts as a simple counter. + * + * The count of the selected metric will be incremented by the specified amount, defaulting to 1. + */ +export function incrementMetric(name: string, value?: number): void; - /** - * Registers an instrumentation function. - * - * The provided onRequire callback will be fired when the given module is loaded with require. - * The moduleName parameter should be the string that will be passed to require; - * for example, 'express' or 'amqplib/callback_api'. - * - * The optional onError callback is called if the onRequire parameters throws an error. - * This is useful for debugging your instrumentation. - * - * Use this method to: - * - Add instrumentation for modules not currently instrumented by New Relic. - * - Instrument your own code. - * - Replace the Node.js agent's built-in instrumentation with your own. - */ - instrument: Instrument; +/** + * Record an event-based metric, usually associated with a particular duration. + * + * `eventType` must be an alphanumeric string less than 255 characters. + * The keys of `attributes` must be shorter than 255 characters. + */ +export function recordCustomEvent(eventType: string, attributes: { [keys: string]: boolean | number | string }): void; - /** - * Sets an instrumentation callback for a datastore module. - * - * This method is just like `instrument`, except it provides a datastore-service-specialized shim. - */ - instrumentDatastore: Instrument; +/** + * Registers an instrumentation function. + * + * The provided onRequire callback will be fired when the given module is loaded with require. + * The moduleName parameter should be the string that will be passed to require; + * for example, 'express' or 'amqplib/callback_api'. + * + * The optional onError callback is called if the onRequire parameters throws an error. + * This is useful for debugging your instrumentation. + * + * Use this method to: + * - Add instrumentation for modules not currently instrumented by New Relic. + * - Instrument your own code. + * - Replace the Node.js agent's built-in instrumentation with your own. + */ +export const instrument: Instrument; - /** - * Sets an instrumentation callback for a web framework module. - * - * This method is just like `instrument`, except it provides a web-framework-specialized shim. - */ - instrumentWebframework: Instrument; +/** + * Sets an instrumentation callback for a datastore module. + * + * This method is just like `instrument`, except it provides a datastore-service-specialized shim. + */ +export const instrumentDatastore: Instrument; - /** - * Sets an instrumentation callback for a message service client module. - * - * This method is just like `instrument`, except it provides a message-service-specialized shim. - */ - instrumentMessages: Instrument; +/** + * Sets an instrumentation callback for a web framework module. + * + * This method is just like `instrument`, except it provides a web-framework-specialized shim. + */ +export const instrumentWebframework: Instrument; - /** - * Gracefully shuts down the agent. - * - * If `collectPendingData` is true, the agent will send any pending data to the collector - * before shutting down. Defaults to `false`. - */ - shutdown(cb?: (error?: Error) => void): void; - shutdown(options?: { collectPendingData?: boolean, timeout?: number }, cb?: (error?: Error) => void): void; - } +/** + * Sets an instrumentation callback for a message service client module. + * + * This method is just like `instrument`, except it provides a message-service-specialized shim. + */ +export const instrumentMessages: Instrument; - interface Instrument { - (opts: { moduleName: string, onRequire: () => void, onError?: (err: Error) => void }): void; - (moduleName: string, onRequire: () => void, onError?: (err: Error) => void): void; - } +/** + * Gracefully shuts down the agent. + * + * If `collectPendingData` is true, the agent will send any pending data to the collector + * before shutting down. Defaults to `false`. + */ +export function shutdown(cb?: (error?: Error) => void): void; +export function shutdown(options?: { collectPendingData?: boolean, timeout?: number }, cb?: (error?: Error) => void): void; - interface Metric { - count: number; - total: number; - min: number; - max: number; - sumOfSquares: number; - } +export interface Instrument { + (opts: { moduleName: string, onRequire: () => void, onError?: (err: Error) => void }): void; + (moduleName: string, onRequire: () => void, onError?: (err: Error) => void): void; +} - interface TransactionHandle { - /** - * End the transaction. - */ - end(callback?: () => any): void; +export interface Metric { + count: number; + total: number; + min: number; + max: number; + sumOfSquares: number; +} - /** - * Mark the transaction to be ignored. - */ - ignore(): void; - } +export interface TransactionHandle { + /** + * End the transaction. + */ + end(callback?: () => any): void; + + /** + * Mark the transaction to be ignored. + */ + ignore(): void; } -declare const api: newrelic.NewRelicAPI; -export = api; From e2f685d6232c7b99702b1a3257f75e9552c2bbc3 Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Thu, 11 Oct 2018 15:50:43 -0700 Subject: [PATCH 034/615] Add new @types/yargs-parser package (#29409) * Add yargs-parser package. * Add tests. * More polish. * Bump version. * Switch to namespace. * More work. * Import yargs type. --- types/yargs-parser/index.d.ts | 58 ++++++++++++++++++++++++ types/yargs-parser/tsconfig.json | 18 ++++++++ types/yargs-parser/tslint.json | 1 + types/yargs-parser/yargs-parser-tests.ts | 47 +++++++++++++++++++ 4 files changed, 124 insertions(+) create mode 100644 types/yargs-parser/index.d.ts create mode 100644 types/yargs-parser/tsconfig.json create mode 100644 types/yargs-parser/tslint.json create mode 100644 types/yargs-parser/yargs-parser-tests.ts diff --git a/types/yargs-parser/index.d.ts b/types/yargs-parser/index.d.ts new file mode 100644 index 0000000000..d50a3e9903 --- /dev/null +++ b/types/yargs-parser/index.d.ts @@ -0,0 +1,58 @@ +// Type definitions for yargs-parser 11.0 +// Project: https://github.com/yargs/yargs-parser#readme +// Definitions by: Miles Johnson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +import { Arguments as YargsArguments } from 'yargs'; + +declare namespace yargsParser { + type Arguments = YargsArguments; + + interface DetailedArguments { + argv: Arguments; + error: Error | null; + aliases: { [alias: string]: string[] }; + newAliases: { [alias: string]: boolean }; + configuration: Configuration; + } + + interface Configuration { + 'boolean-negation': boolean; + 'camel-case-expansion': boolean; + 'combine-arrays': boolean; + 'dot-notation': boolean; + 'duplicate-arguments-array': boolean; + 'flatten-duplicate-arrays': boolean; + 'negation-prefix': string; + 'parse-numbers': boolean; + 'populate--': boolean; + 'set-placeholder-key': boolean; + 'short-option-groups': boolean; + } + + interface Options { + alias?: { [key: string]: string | string[] }; + array?: string[]; + boolean?: string[]; + config?: string | string[] | { [key: string]: boolean }; + configuration?: Partial; + coerce?: { [key: string]: (arg: any) => any }; + count?: string[]; + default?: { [key: string]: any }; + envPrefix?: string; + narg?: { [key: string]: number }; + normalize?: string[]; + string?: string[]; + number?: string[]; + '--'?: boolean; + } + + interface Parser { + (argv: string | string[], opts?: Options): Arguments; + detailed(argv: string | string[], opts?: Options): DetailedArguments; + } +} + +declare var yargsParser: yargsParser.Parser; +export = yargsParser; diff --git a/types/yargs-parser/tsconfig.json b/types/yargs-parser/tsconfig.json new file mode 100644 index 0000000000..244cc7a6bf --- /dev/null +++ b/types/yargs-parser/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "yargs-parser-tests.ts"] +} diff --git a/types/yargs-parser/tslint.json b/types/yargs-parser/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/yargs-parser/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/yargs-parser/yargs-parser-tests.ts b/types/yargs-parser/yargs-parser-tests.ts new file mode 100644 index 0000000000..6906f9df59 --- /dev/null +++ b/types/yargs-parser/yargs-parser-tests.ts @@ -0,0 +1,47 @@ +import parse, { Arguments } from 'yargs-parser'; + +parse('--foo -bar'); + +parse(['--foo', '-bar']); + +parse(['--foo', '-bar'], { + boolean: ['b', 'a', 'r'], +}); + +// prettier-ignore +// $ExpectError +parse(['--foo', '-bar'], { + string: 123, +}); + +parse(['--foo', '-bar'], { + // $ExpectError + unknown: ['b', 'a', 'r'], +}); + +parse(['--foo', '-bar'], { + alias: { foo: 'foo', bar: ['bar'] }, + '--': true, +}); + +parse(['--foo', '-bar'], { + configuration: { + 'dot-notation': false, + }, +}); + +parse(['--foo', '-bar'], { + envPrefix: 'YARG_', + configuration: { + // $ExpectError + 'fake-key': true, + }, +}); + +parse.detailed('--foo -bar'); + +parse.detailed(['--foo', '-bar']); + +parse.detailed(['--foo'], {}); + +function test(args: Arguments) {} From 9fe610b941a80755e4963846eafe7c438d3736c0 Mon Sep 17 00:00:00 2001 From: Alex Henry Date: Thu, 11 Oct 2018 16:00:17 -0700 Subject: [PATCH 035/615] Update CometD 4.0.0 Types to Use Correct Shape for SubscriptionHandles (#29665) * Modify subscription types to use the correct callbacks and subscription handle structures * The listeners are actually the same subscription handles under the hood * Not sure what this scope variable would look like, not seeing any clues in cometd. Going with any. --- types/cometd/cometd-tests.ts | 6 +++--- types/cometd/index.d.ts | 27 ++++++++++++++++++--------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/types/cometd/cometd-tests.ts b/types/cometd/cometd-tests.ts index ada9412c04..ef56879d6f 100644 --- a/types/cometd/cometd-tests.ts +++ b/types/cometd/cometd-tests.ts @@ -1,4 +1,4 @@ -import { CometD, Listener, Message } from "cometd"; +import { CometD, Listener, Message, SubscriptionHandle } from "cometd"; const cometd = new CometD(); @@ -78,7 +78,7 @@ cometd.unsubscribe(subscription3, additionalInfoUnsubscribe, unsubscribeReply => // Subscribers versus Listeners // ============================ -let _reportListener: Listener | undefined; +let _reportListener: SubscriptionHandle | undefined; cometd.addListener("/meta/handshake", message => { // Only subscribe if the handshake is successful @@ -106,7 +106,7 @@ cometd.addListener("/meta/handshake", message => { // Dynamic Resubscription // ====================== -let _subscription: Listener | undefined; +let _subscription: SubscriptionHandle | undefined; class Controller { dynamicSubscribe = () => { diff --git a/types/cometd/index.d.ts b/types/cometd/index.d.ts index 32e4f962bb..cd829d444c 100644 --- a/types/cometd/index.d.ts +++ b/types/cometd/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for CometD 4.0 // Project: http://cometd.org -// Definitions by: Derek Cicerone , Daniel Perez Alvarez +// Definitions by: Derek Cicerone , Daniel Perez Alvarez , Alex Henry // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -75,6 +75,15 @@ export interface Message { } export type Listener = (message: Message) => void; +export type Callback = (data: any) => void; + +export interface SubscriptionHandle { + id: number; + channel: string; + listener: boolean; + callback: Callback; + scope?: any; +} export interface Extension { incoming?: Listener; @@ -202,14 +211,14 @@ export class CometD { * @param callback the callback to call when a message is sent to the channel * @returns the subscription handle to be passed to `removeListener` */ - addListener(channel: string, callback: Listener): Listener; + addListener(channel: string, callback: Listener): SubscriptionHandle; /** * Removes the subscription obtained with a call to `addListener`. * * @param subscription the subscription to unsubscribe. */ - removeListener(subscription: Listener): void; + removeListener(subscription: SubscriptionHandle): void; /** * Removes all listeners registered with `addListener` or `subscribe`. @@ -234,7 +243,7 @@ export class CometD { * @param subscribeCallback a function to be invoked when the subscription is acknowledged * @return the subscription handle to be passed to `unsubscribe` */ - subscribe(channel: string, callback: Listener, subscribeCallback?: Listener): Listener; + subscribe(channel: string, callback: Callback, subscribeCallback?: Listener): SubscriptionHandle; /** * Subscribes to the given channel, performing the given callback in the given scope when a @@ -255,7 +264,7 @@ export class CometD { * @param subscribeCallback a function to be invoked when the subscription is acknowledged * @return the subscription handle to be passed to `unsubscribe` */ - subscribe(channel: string, callback: Listener, subscribeProps: object, subscribeCallback?: Listener): Listener; + subscribe(channel: string, callback: Callback, subscribeProps: object, subscribeCallback?: Listener): SubscriptionHandle; /** * Unsubscribes the subscription obtained with a call to `subscribe`. @@ -263,7 +272,7 @@ export class CometD { * @param subscription the subscription to unsubscribe. * @param unsubscribeCallback a function to be invoked when the unsubscription is acknowledged */ - unsubscribe(subscription: Listener, unsubscribeCallback?: Listener): void; + unsubscribe(subscription: SubscriptionHandle, unsubscribeCallback?: Listener): void; /** * Unsubscribes the subscription obtained with a call to `subscribe`. @@ -272,12 +281,12 @@ export class CometD { * @param unsubscribeProps an object to be merged with the unsubscribe message * @param unsubscribeCallback a function to be invoked when the unsubscription is acknowledged */ - unsubscribe(subscription: Listener, unsubscribeProps: object, unsubscribeCallback?: Listener): void; + unsubscribe(subscription: SubscriptionHandle, unsubscribeProps: object, unsubscribeCallback?: Listener): void; /** * Resubscribes as necessary in case of a re-handshake. */ - resubscribe(subscription: Listener, subscribeProps?: object): Listener; + resubscribe(subscription: SubscriptionHandle, subscribeProps?: object): SubscriptionHandle; /** * Removes all subscriptions added via `subscribe`, but does not remove the listeners added via @@ -463,5 +472,5 @@ export class CometD { * @param isListener whether it was a listener * @param message the message received from the Bayeux server */ - onListenerException: (exception: any, subscriptionHandle: Listener, isListener: boolean, message: string) => void; + onListenerException: (exception: any, subscriptionHandle: SubscriptionHandle, isListener: boolean, message: string) => void; } From a4e838f79ba0c60330397103b84647933da70c7c Mon Sep 17 00:00:00 2001 From: Enzo Volkmann Date: Fri, 12 Oct 2018 16:24:33 +0200 Subject: [PATCH 036/615] Started adding type definitions --- types/pdfmake/index.d.ts | 66 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 5 deletions(-) diff --git a/types/pdfmake/index.d.ts b/types/pdfmake/index.d.ts index fdc0a9de05..abcdce24cb 100644 --- a/types/pdfmake/index.d.ts +++ b/types/pdfmake/index.d.ts @@ -24,6 +24,33 @@ declare module 'pdfmake/build/pdfmake' { 'SRA0' | 'SRA1' | 'SRA2' | 'SRA3' | 'SRA4' | 'EXECUTIVE' | 'FOLIO' | 'LEGAL' | 'LETTER' | 'TABLOID'; + enum PageSize { + A0_x_4 = '4A0', + A0_x_2 = '2A0', + AO = 'A0', + A1 = 'A1', + A2 = 'A2', + A3 = 'A3', + A4 = 'A4', + A5 = 'A5', + A6 = 'A6', + A7 = 'A7', + A8 = 'A8', + A9 = 'A9', + A1O = 'A10', + BO = 'B0', + B1 = 'B1', + B2 = 'B2', + B3 = 'B3', + B4 = 'B4', + B5 = 'B5', + B6 = 'B6', + B7 = 'B7', + B8 = 'B8', + B9 = 'B9', + B1O = 'B10' + } + type pageOrientationType = "portrait" | "landscape"; let pdfMake: pdfMakeStatic; @@ -48,15 +75,44 @@ declare module 'pdfmake/build/pdfmake' { type TDocumentHeaderFooterFunction = (currentPage: number, pageCount: number) => any; + type Margins = number | [number, number] | [number, number, number, number]; + + interface Styles { + [key: string]: Style; + } + + type Alignment = 'left' | 'right' | 'justify' | 'center'; + + interface Style { + font?: any; + fontSize?: number; + fontFeatures?: any; + bold?: boolean; + italics?: boolean; + alignment?: Alignment; + color?: string; + columnGap?: any; + fillColor?: string; + decoration?: any; + decorationany?: any; + decorationColor?: string; + background?: any; + lineHeight?: number; + characterSpacing?: number; + noWrap?: boolean; + markerColor?: string; + leadingIndent?: any; + } + interface TDocumentDefinitions { info?: TDocumentInformation; - header?: any; - footer?: any; + header?: TDocumentHeaderFooterFunction; + footer?: TDocumentHeaderFooterFunction; content: any; - styles?: any; - pageSize?: pageSizeType; + styles?: Styles; + pageSize?: PageSize; pageOrientation?: pageOrientationType; - pageMargins?: [number, number, number, number]; + pageMargins?: Margins; defaultStyle?: { font?: string; }; From 8683d5c066cd1384dac996271f9ba18cdad29fc3 Mon Sep 17 00:00:00 2001 From: Yash Kulshrestha Date: Fri, 12 Oct 2018 08:46:13 -0700 Subject: [PATCH 037/615] added types for yup@0.26 (#29524) * added types for yup@0.26 * added types for is-docker * Revert "added types for is-docker" This reverts commit 753dac6d555112d294caf27c931b1e8cbb79045c. --- types/yup/index.d.ts | 104 ++++++++++---- types/yup/yup-tests.ts | 319 +++++++++++++++++++++++++---------------- 2 files changed, 272 insertions(+), 151 deletions(-) diff --git a/types/yup/index.d.ts b/types/yup/index.d.ts index 2dcf110a9e..3fc9a33fcd 100644 --- a/types/yup/index.d.ts +++ b/types/yup/index.d.ts @@ -1,17 +1,32 @@ -// Type definitions for yup 0.24 +// Type definitions for yup 0.26 // Project: https://github.com/jquense/yup // Definitions by: Dominik Hardtke , // Vladyslav Tserman , // Moreton Bay Regional Council , // Sindre Seppola +// Yash Kulshrestha // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -export function reach(schema: Schema, path: string, value?: any, context?: any): Schema; -export function addMethod>(schemaCtor: AnySchemaConstructor, name: string, method: (this: T, ...args: any[]) => T): void; +export function reach( + schema: Schema, + path: string, + value?: any, + context?: any +): Schema; +export function addMethod>( + schemaCtor: AnySchemaConstructor, + name: string, + method: (this: T, ...args: any[]) => T +): void; export function ref(path: string, options?: { contextPrefix: string }): Ref; export function lazy(fn: (value: T) => Schema): Lazy; -export function ValidationError(errors: string | string[], value: any, path: string, type?: any): ValidationError; +export function ValidationError( + errors: string | string[], + value: any, + path: string, + type?: any +): ValidationError; export function setLocale(customLocale: LocaleObject): void; export const mixed: MixedSchemaConstructor; @@ -23,7 +38,8 @@ export const date: DateSchemaConstructor; export const array: ArraySchemaConstructor; export const object: ObjectSchemaConstructor; -export type AnySchemaConstructor = MixedSchemaConstructor +export type AnySchemaConstructor = + | MixedSchemaConstructor | StringSchemaConstructor | NumberSchemaConstructor | BooleanSchemaConstructor @@ -40,6 +56,8 @@ export interface Schema { concat(schema: this): this; validate(value: T, options?: ValidateOptions): Promise; validateSync(value: T, options?: ValidateOptions): T; + validateAt(path: string, value: T, options?: ValidateOptions): Promise; + validateSyncAt(path: string, value: T, options?: ValidateOptions): T; isValid(value: T, options?: any): Promise; isValidSync(value: T, options?: any): boolean; cast(value: any, options?: any): T; @@ -55,29 +73,43 @@ export interface Schema { oneOf(arrayOfValues: any[], message?: string): this; notOneOf(arrayOfValues: any[], message?: string): this; when(keys: string | any[], builder: WhenOptions): this; - test(name: string, message: string, test: (this: TestContext, value?: any) => boolean | ValidationError | Promise, callbackStyleAsync?: boolean): this; + test( + name: string, + message: + | string + | ((params: object & Partial) => string), + test: ( + this: TestContext, + value?: any + ) => boolean | ValidationError | Promise, + callbackStyleAsync?: boolean + ): this; test(options: TestOptions): this; transform(fn: TransformFunction): this; } export interface MixedSchemaConstructor { (): MixedSchema; - new(options?: { type?: string, [key: string]: any }): MixedSchema; + new (options?: { type?: string; [key: string]: any }): MixedSchema; } // tslint:disable-next-line:no-empty-interface -export interface MixedSchema extends Schema { -} +export interface MixedSchema extends Schema {} export interface StringSchemaConstructor { (): StringSchema; - new(): StringSchema; + new (): StringSchema; } export interface StringSchema extends Schema { min(limit: number | Ref, message?: string): StringSchema; max(limit: number | Ref, message?: string): StringSchema; - matches(regex: RegExp, messageOrOptions?: string | { message?: string; excludeEmptyString?: boolean }): StringSchema; + matches( + regex: RegExp, + messageOrOptions?: + | string + | { message?: string; excludeEmptyString?: boolean } + ): StringSchema; email(message?: string): StringSchema; url(message?: string): StringSchema; ensure(): StringSchema; @@ -88,7 +120,7 @@ export interface StringSchema extends Schema { export interface NumberSchemaConstructor { (): NumberSchema; - new(): NumberSchema; + new (): NumberSchema; } export interface NumberSchema extends Schema { @@ -105,16 +137,15 @@ export interface NumberSchema extends Schema { export interface BooleanSchemaConstructor { (): BooleanSchema; - new(): BooleanSchema; + new (): BooleanSchema; } // tslint:disable-next-line:no-empty-interface -export interface BooleanSchema extends Schema { -} +export interface BooleanSchema extends Schema {} export interface DateSchemaConstructor { (): DateSchema; - new(): DateSchema; + new (): DateSchema; } export interface DateSchema extends Schema { @@ -124,7 +155,7 @@ export interface DateSchema extends Schema { export interface ArraySchemaConstructor { (schema?: Schema): ArraySchema; - new(): ArraySchema<{}>; + new (): ArraySchema<{}>; } export interface ArraySchema extends Schema { @@ -137,11 +168,14 @@ export interface ArraySchema extends Schema { export interface ObjectSchemaConstructor { (fields?: { [field in keyof T]: Schema }): ObjectSchema; - new(): ObjectSchema<{}>; + new (): ObjectSchema<{}>; } export interface ObjectSchema extends Schema { - shape(fields: { [field in keyof T]: Schema }, noSortEdges?: Array<[string, string]>): ObjectSchema; + shape( + fields: { [field in keyof T]: Schema }, + noSortEdges?: Array<[string, string]> + ): ObjectSchema; from(fromKey: string, toKey: string, alias?: boolean): ObjectSchema; noUnknown(onlyKnownKeys?: boolean, message?: string): ObjectSchema; transformKeys(callback: (key: any) => any): void; @@ -149,7 +183,11 @@ export interface ObjectSchema extends Schema { constantCase(): ObjectSchema; } -export type TransformFunction = ((this: T, value: any, originalValue: any) => any); +export type TransformFunction = (( + this: T, + value: any, + originalValue: any +) => any); export interface WhenOptionsBuilder { (value: any, schema: T): T; @@ -158,8 +196,9 @@ export interface WhenOptionsBuilder { (v1: any, v2: any, v3: any, v4: any, schema: T): T; } -export type WhenOptions = WhenOptionsBuilder - | { is: boolean | ((value: any) => boolean), then: any, otherwise: any } +export type WhenOptions = + | WhenOptionsBuilder + | { is: boolean | ((value: any) => boolean); then: any; otherwise: any } | object; export interface TestContext { @@ -167,7 +206,7 @@ export interface TestContext { options: ValidateOptions; parent: any; schema: Schema; - createError: (params: { path: string, message: string }) => ValidationError; + createError: (params: { path: string; message: string }) => ValidationError; } export interface ValidateOptions { @@ -193,6 +232,13 @@ export interface ValidateOptions { context?: object; } +export interface TestMessageParams { + path: string; + value: any; + originalValue: any; + label: string; +} + export interface TestOptions { /** * Unique name identifying the test @@ -202,12 +248,17 @@ export interface TestOptions { /** * Test function, determines schema validity */ - test: (this: TestContext, value: any) => boolean | ValidationError | Promise; + test: ( + this: TestContext, + value: any + ) => boolean | ValidationError | Promise; /** * The validation error message */ - message?: string; + message?: + | string + | ((params: object & Partial) => string); /** * Values passed to message for interpolation @@ -253,8 +304,7 @@ export interface Ref { } // tslint:disable-next-line:no-empty-interface -export interface Lazy extends Schema { -} +export interface Lazy extends Schema {} export interface LocaleObject { mixed?: { [key in keyof MixedSchema]?: string }; diff --git a/types/yup/yup-tests.ts b/types/yup/yup-tests.ts index c6f367a043..31b2757ec0 100644 --- a/types/yup/yup-tests.ts +++ b/types/yup/yup-tests.ts @@ -1,128 +1,170 @@ -import * as yup from 'yup'; +import * as yup from "yup"; // tslint:disable-next-line:no-duplicate-imports -import { reach, date, Schema, ObjectSchema, ValidationError, MixedSchema, SchemaDescription, TestOptions, ValidateOptions, NumberSchema, TestContext } from 'yup'; +import { + reach, + date, + Schema, + ObjectSchema, + ValidationError, + MixedSchema, + SchemaDescription, + TestOptions, + ValidateOptions, + NumberSchema, + TestContext +} from "yup"; // reach function let schema = yup.object().shape({ nested: yup.object().shape({ - arr: yup.array().of( - yup.object().shape({ num: yup.number().max(4) }) - ) + arr: yup.array().of(yup.object().shape({ num: yup.number().max(4) })) }) - }); -reach(schema, 'nested.arr.num'); -reach(schema, 'nested.arr[].num'); +}); +reach(schema, "nested.arr.num"); +reach(schema, "nested.arr[].num"); // addMethod function -yup.addMethod(yup.number, 'minimum', function(this, minValue: number, message: string) { +yup.addMethod(yup.number, "minimum", function( + this, + minValue: number, + message: string +) { return this.min(minValue, message); }); -yup.addMethod(yup.date, 'newMethod', function(this: yup.DateSchema, date: Date, message?: string) { +yup.addMethod(yup.date, "newMethod", function( + this: yup.DateSchema, + date: Date, + message?: string +) { return this.max(date, message); }); // ref function schema = yup.object().shape({ - baz: yup.ref('foo.bar'), + baz: yup.ref("foo.bar"), foo: yup.object().shape({ - bar: yup.string() + bar: yup.string() }), - x: yup.ref('$x') + x: yup.ref("$x") }); -schema.cast({ foo: { bar: 'boom' } }, { context: { x: 5 } }); +schema.cast({ foo: { bar: "boom" } }, { context: { x: 5 } }); // lazy function const node: ObjectSchema = yup.object().shape({ id: yup.number(), - child: yup.lazy(() => - node.default(undefined) - ) + child: yup.lazy(() => node.default(undefined)) }); const renderable = yup.lazy(value => { switch (typeof value) { - case 'number': - return yup.number(); - case 'string': - return yup.string(); - default: - return yup.mixed(); + case "number": + return yup.number(); + case "string": + return yup.string(); + default: + return yup.mixed(); } }); const renderables = yup.array().of(renderable); // ValidationError -let error: ValidationError = yup.ValidationError('error', 'value', 'path'); -error = yup.ValidationError(['error', 'error2'], true, 'path'); -error = yup.ValidationError(['error', 'error2'], 5, 'path'); -error = yup.ValidationError(['error', 'error2'], {name: 'value'}, 'path'); -error = yup.ValidationError(['error', 'error2'], {name: 'value'}, 'path', 'type'); +let error: ValidationError = yup.ValidationError("error", "value", "path"); +error = yup.ValidationError(["error", "error2"], true, "path"); +error = yup.ValidationError(["error", "error2"], 5, "path"); +error = yup.ValidationError(["error", "error2"], { name: "value" }, "path"); +error = yup.ValidationError( + ["error", "error2"], + { name: "value" }, + "path", + "type" +); error = { - name: 'ValidationError', - message: 'error', - path: 'path', - errors: ['error'], - inner: [yup.ValidationError('error', true, 'path')], - type: 'date', - value: {start: '2017-11-10'} + name: "ValidationError", + message: "error", + path: "path", + errors: ["error"], + inner: [yup.ValidationError("error", true, "path")], + type: "date", + value: { start: "2017-11-10" } }; -error.value = 'value'; +error.value = "value"; error.value = true; error.value = 5; -error.value = {name: 'value'}; +error.value = { name: "value" }; error.type = {}; error.type = []; -error.errors = ['error']; +error.errors = ["error"]; // mixed let mixed: MixedSchema = yup.mixed(); mixed.clone(); -mixed.label('label'); -mixed.meta({ meta: 'value' }); +mixed.label("label"); +mixed.meta({ meta: "value" }); mixed.describe().label; mixed.describe().meta; mixed.describe().tests; mixed.describe().type; mixed.concat(yup.string()); mixed.validate({}); -mixed.validate({ hello: 'world' }, { strict: true }).then(value => value); +mixed.validate({ hello: "world" }, { strict: true }).then(value => value); +mixed.validateSync({ hello: "world" }, { strict: true }); +mixed.validateAt("path", {}, { strict: true, context: {} }); +mixed + .validateAt("path", {}, { strict: true, context: {} }) + .then(value => value); +mixed.validateSyncAt("path", {}, { strict: true, context: {} }); mixed.isValid(undefined, (valid: true) => true); -mixed.isValid({ hello: 'world' }).then(valid => valid); +mixed.isValid({ hello: "world" }).then(valid => valid); mixed.cast({}); -mixed.isType('hello'); +mixed.isType("hello"); mixed.strict(true); mixed.strip(true); mixed.withMutation(schema => {}); -mixed.default({ number: 5}); -mixed.default(() => ({ number: 5})); +mixed.default({ number: 5 }); +mixed.default(() => ({ number: 5 })); mixed.default(); mixed.nullable(true); mixed.required(); mixed.notRequired(); // $ExpectType MixedSchema -mixed.typeError('type error'); -mixed.oneOf(['hello', 'world'], 'message'); -mixed.notOneOf(['hello', 'world'], 'message'); -mixed.when('isBig', { +mixed.typeError("type error"); +mixed.oneOf(["hello", "world"], "message"); +mixed.notOneOf(["hello", "world"], "message"); +mixed.when("isBig", { is: value => true, then: yup.number().min(5), otherwise: yup.number().min(0) }); -mixed.when('isBig', { - is: true, - then: yup.number().min(5), - otherwise: yup.number().min(0) -}).when('$other', (value: any, schema: MixedSchema) => value === 4 ? schema.required() : schema); +mixed + .when("isBig", { + is: true, + then: yup.number().min(5), + otherwise: yup.number().min(0) + }) + .when( + "$other", + (value: any, schema: MixedSchema) => + value === 4 ? schema.required() : schema + ); // tslint:disable-next-line:no-invalid-template-strings -mixed.test('is-jimmy', '${path} is not Jimmy', value => value === 'jimmy'); +mixed.test("is-jimmy", "${path} is not Jimmy", value => value === "jimmy"); +mixed.test( + "is-jimmy", + ({ path, value }) => `${path} has an error, it is ${value}`, + value => value === "jimmy" +); mixed.test({ - name: 'lessThan5', + name: "lessThan5", exclusive: true, // tslint:disable-next-line:no-invalid-template-strings - message: '${path} must be less than 5 characters', + message: "${path} must be less than 5 characters", test: value => value == null || value.length <= 5 }); -mixed.test('with-promise', 'It contains invalid value', value => new Promise(resolve => true)); +mixed.test( + "with-promise", + "It contains invalid value", + value => new Promise(resolve => true) +); const testContext = function(this: TestContext) { // $ExpectType string this.path; @@ -133,22 +175,30 @@ const testContext = function(this: TestContext) { // $ExpectType Schema this.schema; // $ExpectType ValidationError - this.createError({ path: '1', message: '1' }); + this.createError({ path: "1", message: "1" }); return true; }; -mixed.test('with-context', 'it uses function context', testContext); +mixed.test("with-context", "it uses function context", testContext); mixed.test({ test: testContext }); // Async ValidationError -const asyncValidationErrorTest = function(this: TestContext): Promise { - return new Promise(resolve => resolve(this.createError({ path: "testPath", message: "testMessage" }))); +const asyncValidationErrorTest = function( + this: TestContext +): Promise { + return new Promise(resolve => + resolve(this.createError({ path: "testPath", message: "testMessage" })) + ); }; -mixed.test('async-validation-error', 'Returns async ValidationError', asyncValidationErrorTest); +mixed.test( + "async-validation-error", + "Returns async ValidationError", + asyncValidationErrorTest +); mixed.test({ - test: asyncValidationErrorTest, + test: asyncValidationErrorTest }); // Sync ValidationError @@ -156,9 +206,13 @@ const syncValidationErrorTest = function(this: TestContext): ValidationError { return this.createError({ path: "testPath", message: "testMessage" }); }; -mixed.test('sync-validation-error', 'Returns sync ValidationError', syncValidationErrorTest); +mixed.test( + "sync-validation-error", + "Returns sync ValidationError", + syncValidationErrorTest +); mixed.test({ - test: syncValidationErrorTest, + test: syncValidationErrorTest }); yup.string().transform(function(this, value: any, originalvalue: any) { @@ -171,7 +225,7 @@ mixed = new ExtendsMixed(); class ExtendsMixed2 extends yup.mixed { constructor() { - super({ type: 'CustomType' }); + super({ type: "CustomType" }); } } mixed = new ExtendsMixed2(); @@ -182,25 +236,27 @@ mixed = new ExtendsMixed2(); class DateSchema extends yup.date { isWednesday(message?: string): DateSchema { return this.clone().test({ - name: 'Wednesday', + name: "Wednesday", // tslint:disable-next-line:no-invalid-template-strings - message: message || '${path} must be Wednesday', - test: value => true /* Check that day is Wednesday */, + message: message || "${path} must be Wednesday", + test: value => true /* Check that day is Wednesday */ }); } } -yup.object().shape({ - startDate: new DateSchema().isWednesday().required() -}).isValidSync({ - startDate: '2017-11-29', -}); +yup.object() + .shape({ + startDate: new DateSchema().isWednesday().required() + }) + .isValidSync({ + startDate: "2017-11-29" + }); // String schema const strSchema = yup.string(); // $ExpectType StringSchema -strSchema.isValid('hello'); // => true +strSchema.isValid("hello"); // => true strSchema.required(); -strSchema.min(5, 'message'); -strSchema.max(5, 'message'); +strSchema.min(5, "message"); +strSchema.max(5, "message"); strSchema.matches(/(hi|bye)/); strSchema.email(); strSchema.url(); @@ -212,16 +268,19 @@ strSchema.uppercase(); // Number schema const numSchema = yup.number(); // $ExpectType NumberSchema numSchema.isValid(10); // => true -numSchema.min(5, 'message'); -numSchema.max(5, 'message'); +numSchema.min(5, "message"); +numSchema.max(5, "message"); numSchema.positive(); numSchema.negative(); numSchema.lessThan(5); numSchema.moreThan(5); numSchema.integer(); numSchema.truncate(); -numSchema.round('floor'); -numSchema.validate(5, { strict: true }).then(value => value).catch(err => err); +numSchema.round("floor"); +numSchema + .validate(5, { strict: true }) + .then(value => value) + .catch(err => err); // Boolean Schema const boolSchema = yup.boolean(); @@ -231,17 +290,17 @@ boolSchema.isValid(true); // => true const dateSchema = yup.date(); dateSchema.isValid(new Date()); // => true dateSchema.min(new Date()); -dateSchema.min('2017-11-12'); -dateSchema.min(new Date(), 'message'); -dateSchema.min('2017-11-12', 'message'); +dateSchema.min("2017-11-12"); +dateSchema.min(new Date(), "message"); +dateSchema.min("2017-11-12", "message"); dateSchema.max(new Date()); -dateSchema.max('2017-11-12'); -dateSchema.max(new Date(), 'message'); -dateSchema.max('2017-11-12', 'message'); +dateSchema.max("2017-11-12"); +dateSchema.max(new Date(), "message"); +dateSchema.max("2017-11-12", "message"); // Array Schema const arrSchema = yup.array().of(yup.number().min(2)); -arrSchema.isValid([2, 3]); // => true +arrSchema.isValid([2, 3]); // => true arrSchema.isValid([1, -24]); // => false arrSchema.required(); arrSchema.ensure(); @@ -254,9 +313,13 @@ yup.array().of(yup.string()); // $ExpectType ArraySchema // Object Schema const objSchema = yup.object().shape({ name: yup.string().required(), - age: yup.number().required().positive().integer(), + age: yup + .number() + .required() + .positive() + .integer(), email: yup.string().email(), - website: yup.string().url(), + website: yup.string().url() }); yup.object().shape({ num: yup.number() @@ -266,35 +329,35 @@ yup.object({ num: yup.number() }); -objSchema.from('prop', 'myProp'); -objSchema.from('prop', 'myProp', true); +objSchema.from("prop", "myProp"); +objSchema.from("prop", "myProp", true); objSchema.noUnknown(); objSchema.noUnknown(true); -objSchema.noUnknown(true, 'message'); +objSchema.noUnknown(true, "message"); objSchema.transformKeys(key => key.toUpperCase()); objSchema.camelCase(); objSchema.constantCase(); const description: SchemaDescription = { - type: 'type', - label: 'label', - meta: { key: 'value' }, - tests: ['test1', 'test2'] + type: "type", + label: "label", + meta: { key: "value" }, + tests: ["test1", "test2"] }; const testOptions: TestOptions = { - name: 'name', + name: "name", test: value => true, - message: 'validation error message', - params: { param1: 'value'}, + message: "validation error message", + params: { param1: "value" }, exclusive: true }; const testOptionsWithPromise: TestOptions = { - name: 'name', + name: "name", test: value => new Promise(resolve => true), - message: 'validation error message', - params: { param1: 'value'}, + message: "validation error message", + params: { param1: "value" }, exclusive: true }; @@ -304,13 +367,13 @@ const validateOptions: ValidateOptions = { stripUnknown: true, recursive: true, context: { - key: 'value' + key: "value" } }; yup.setLocale({ number: { max: "Max message", min: "Min message" }, - string: { email: "String message"} + string: { email: "String message" } }); interface MyInterface { @@ -328,10 +391,12 @@ interface SubInterface { const typedSchema = yup.object({ stringField: yup.string().required(), // $ExpectType StringSchema numberField: yup.number().required(), // $ExpectType NumberSchema - subFields: yup.object({ - testField: yup.string().required(), - }).required(), - arrayField: yup.array(yup.string()).required(), // $ExpectType ArraySchema + subFields: yup + .object({ + testField: yup.string().required() + }) + .required(), + arrayField: yup.array(yup.string()).required() // $ExpectType ArraySchema }); const testObject: MyInterface = { @@ -340,7 +405,7 @@ const testObject: MyInterface = { subFields: { testField: "test2" }, - arrayField: ["hi"], + arrayField: ["hi"] }; typedSchema.validateSync(testObject); // $ExpectType MyInterface @@ -348,35 +413,41 @@ typedSchema.validateSync(testObject); // $ExpectType MyInterface // $ExpectError yup.object({ stringField: yup.string().required(), - subFields: yup.object({ - testField: yup.string().required(), - }).required(), - arrayField: yup.array(yup.string()).required(), + subFields: yup + .object({ + testField: yup.string().required() + }) + .required(), + arrayField: yup.array(yup.string()).required() }); // $ExpectError yup.object({ stringField: yup.number().required(), numberField: yup.number().required(), - subFields: yup.object({ - testField: yup.string().required(), - }).required(), - arrayField: yup.array(yup.string()).required(), + subFields: yup + .object({ + testField: yup.string().required() + }) + .required(), + arrayField: yup.array(yup.string()).required() }); // $ExpectError yup.object({ stringField: yup.string().required(), numberField: yup.number().required(), - arrayField: yup.array(yup.string()).required(), + arrayField: yup.array(yup.string()).required() }); // $ExpectError yup.object({ stringField: yup.string().required(), numberField: yup.number().required(), - subFields: yup.object({ - testField: yup.number().required(), - }).required(), - arrayField: yup.array(yup.string()).required(), + subFields: yup + .object({ + testField: yup.number().required() + }) + .required(), + arrayField: yup.array(yup.string()).required() }); From b3b1373cf4c08efaf1d0b2ea6a92673c20f64373 Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Fri, 12 Oct 2018 11:48:38 -0400 Subject: [PATCH 038/615] Add types for @sindresorhus/df npm packge (#29668) * add types for @sindresorhus/df * remove , * lint fixes * CR feedback --- types/sindresorhus__df/index.d.ts | 21 +++++++++++ .../sindresorhus__df-tests.ts | 37 +++++++++++++++++++ types/sindresorhus__df/tsconfig.json | 28 ++++++++++++++ types/sindresorhus__df/tslint.json | 1 + 4 files changed, 87 insertions(+) create mode 100644 types/sindresorhus__df/index.d.ts create mode 100644 types/sindresorhus__df/sindresorhus__df-tests.ts create mode 100644 types/sindresorhus__df/tsconfig.json create mode 100644 types/sindresorhus__df/tslint.json diff --git a/types/sindresorhus__df/index.d.ts b/types/sindresorhus__df/index.d.ts new file mode 100644 index 0000000000..af7a6c8d20 --- /dev/null +++ b/types/sindresorhus__df/index.d.ts @@ -0,0 +1,21 @@ +// Type definitions for sindresorhus__df 2.10 +// Project: https://github.com/sindresorhus/df +// Definitions by: Matt Thompson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +declare function df(): Promise; +declare namespace df { + function fs(filesystem: string): Promise; + function file(file: string): Promise; + interface SpaceInfo { + filesystem: string; + size: number; + used: number; + available: number; + capacity: number; + mountpoint: string; + } +} + +export = df; diff --git a/types/sindresorhus__df/sindresorhus__df-tests.ts b/types/sindresorhus__df/sindresorhus__df-tests.ts new file mode 100644 index 0000000000..970c8b8a1f --- /dev/null +++ b/types/sindresorhus__df/sindresorhus__df-tests.ts @@ -0,0 +1,37 @@ +import df = require('@sindresorhus/df'); + +(async () => { + const disks = await df(); + disks.forEach((disk: df.SpaceInfo) => { + const {filesystem, size, used, available, capacity, mountpoint} = disk; + return { + filesystem, size, used, available, capacity, mountpoint + }; + }); + /* + [{ + filesystem: '/dev/disk1', + size: 499046809600, + used: 443222245376, + available: 55562420224, + capacity: 0.89, + mountpoint: '/' + }, …] + */ + + let {filesystem, size, used, available, capacity, mountpoint} = await df.fs('/dev/disk1'); + /* + { + filesystem: '/dev/disk1', + … + } + */ + + ({filesystem, size, used, available, capacity, mountpoint} = await df.file('./simple.txt')); + /* + { + filesystem: '/dev/disk1', + … + } + */ +})(); diff --git a/types/sindresorhus__df/tsconfig.json b/types/sindresorhus__df/tsconfig.json new file mode 100644 index 0000000000..9dcf70310e --- /dev/null +++ b/types/sindresorhus__df/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "strictFunctionTypes": true, + "forceConsistentCasingInFileNames": true, + "paths": { + "@sindresorhus/df": [ + "sindresorhus__df" + ] + } + }, + "files": [ + "index.d.ts", + "sindresorhus__df-tests.ts" + ] +} diff --git a/types/sindresorhus__df/tslint.json b/types/sindresorhus__df/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sindresorhus__df/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From e9472683cb0e2124d9e5b1938029752ea07570ff Mon Sep 17 00:00:00 2001 From: Kacper Wiszczuk Date: Fri, 12 Oct 2018 18:03:30 +0200 Subject: [PATCH 039/615] React native/ flatlist and sectionlist should have nullable types (#29686) --- types/react-native/index.d.ts | 26 +++++++++++++------------- types/react-native/test/index.tsx | 2 ++ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 918b20e250..697d5de39d 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -3880,22 +3880,22 @@ export interface FlatListProps extends VirtualizedListProps { /** * Rendered in between each item, but not at the top or bottom */ - ItemSeparatorComponent?: React.ComponentType; + ItemSeparatorComponent?: React.ComponentType | null; /** * Rendered when the list is empty. */ - ListEmptyComponent?: React.ComponentType | React.ReactElement; + ListEmptyComponent?: React.ComponentType | React.ReactElement | null; /** * Rendered at the very end of the list. */ - ListFooterComponent?: React.ComponentType | React.ReactElement; + ListFooterComponent?: React.ComponentType | React.ReactElement | null; /** * Rendered at the very beginning of the list. */ - ListHeaderComponent?: React.ComponentType | React.ReactElement; + ListHeaderComponent?: React.ComponentType | React.ReactElement | null; /** * Optional custom style for multi-item rows generated when numColumns > 1 @@ -4076,7 +4076,7 @@ export interface SectionBase { renderItem?: SectionListRenderItem; - ItemSeparatorComponent?: React.ComponentType; + ItemSeparatorComponent?: React.ComponentType | null; keyExtractor?: (item: ItemT, index: number) => string; } @@ -4099,27 +4099,27 @@ export interface SectionListProps extends VirtualizedListWithoutRenderIte /** * Rendered in between adjacent Items within each section. */ - ItemSeparatorComponent?: React.ComponentType; + ItemSeparatorComponent?: React.ComponentType | null; /** * Rendered when the list is empty. */ - ListEmptyComponent?: React.ComponentType | React.ReactElement; + ListEmptyComponent?: React.ComponentType | React.ReactElement | null; /** * Rendered at the very end of the list. */ - ListFooterComponent?: React.ComponentType | React.ReactElement; + ListFooterComponent?: React.ComponentType | React.ReactElement | null; /** * Rendered at the very beginning of the list. */ - ListHeaderComponent?: React.ComponentType | React.ReactElement; + ListHeaderComponent?: React.ComponentType | React.ReactElement | null; /** * Rendered in between each section. */ - SectionSeparatorComponent?: React.ComponentType | React.ReactElement; + SectionSeparatorComponent?: React.ComponentType | React.ReactElement | null; /** * A marker property for telling the list to re-render (since it implements PureComponent). @@ -4263,19 +4263,19 @@ export interface SectionListStatic extends React.ComponentClass | React.ReactElement; + ListEmptyComponent?: React.ComponentType | React.ReactElement | null; /** * Rendered at the bottom of all the items. Can be a React Component Class, a render function, or * a rendered element. */ - ListFooterComponent?: React.ComponentType | React.ReactElement; + ListFooterComponent?: React.ComponentType | React.ReactElement | null; /** * Rendered at the top of all the items. Can be a React Component Class, a render function, or * a rendered element. */ - ListHeaderComponent?: React.ComponentType | React.ReactElement; + ListHeaderComponent?: React.ComponentType | React.ReactElement | null; /** * The default accessor functions assume this is an Array<{key: string}> but you can override diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 648d6024c3..dc3733cf83 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -330,6 +330,8 @@ export class FlatListTest extends React.Component, {}> { data={[1, 2, 3, 4, 5]} renderItem={this._renderItem} ItemSeparatorComponent={this._renderSeparator} + ListFooterComponent={null} + ListHeaderComponent={null} /> ); } From 66d218c459da288f0736cb650a3987add95971b8 Mon Sep 17 00:00:00 2001 From: Indri Muska Date: Fri, 12 Oct 2018 18:07:49 +0200 Subject: [PATCH 040/615] Added type definitions for @google/maps (#29625) * Added type definitions for @google/maps * Linting --- types/google__maps/google__maps-tests.ts | 19 + types/google__maps/index.d.ts | 3439 ++++++++++++++++++++++ types/google__maps/tsconfig.json | 29 + types/google__maps/tslint.json | 3 + 4 files changed, 3490 insertions(+) create mode 100644 types/google__maps/google__maps-tests.ts create mode 100644 types/google__maps/index.d.ts create mode 100644 types/google__maps/tsconfig.json create mode 100644 types/google__maps/tslint.json diff --git a/types/google__maps/google__maps-tests.ts b/types/google__maps/google__maps-tests.ts new file mode 100644 index 0000000000..d79ebde2f3 --- /dev/null +++ b/types/google__maps/google__maps-tests.ts @@ -0,0 +1,19 @@ +import { createClient } from '@google/maps'; + +const client = createClient({ + key: 'my-google-maps-api-key', + language: 'ja', + // tslint:disable-next-line + Promise: Promise, +}); + +client + .geocode({ address: 'Leaning Tower of Pisa' }) + .asPromise() + .then(response => { + response.json.results.forEach(result => { + console.log( + result.geometry.location + ); + }); + }); diff --git a/types/google__maps/index.d.ts b/types/google__maps/index.d.ts new file mode 100644 index 0000000000..4759d412dd --- /dev/null +++ b/types/google__maps/index.d.ts @@ -0,0 +1,3439 @@ +// Type definitions for @google/maps 0.5 +// Project: https://github.com/googlemaps/google-maps-services-js +// Definitions by: Indri Muska +// Definitions: https://github.com/indrimuska/google-maps-api-typings +// TypeScript Version: 2.3 + +/** + * Creates a Google Maps client. The client object contains all the API methods. + */ +export interface CreateClientOptions { + /** API key (required, unless clientID and clientSecret provided). */ + key: string; + /** Maps API for Work client ID. */ + clientId?: string; + /** Maps API for Work client secret (a.k.a. private key). */ + clientSecret?: string; + /** Maps API for Work channel. */ + channel?: string; + /** Timeout in milliseconds. (Default: 60 * 1000 ms). */ + timeout?: number; + /** Default language for all queries. */ + language?: Language; + /** Promise constructor (optional). */ + Promise?: PromiseConstructor; + /** Rate options. */ + rate?: RateOptions; + /** Retry options. */ + retryOptions?: RetryOptions; +} + +export interface RateOptions { + /** Controls rate-limiting of requests. Maximum number of requests per period. (Default: 50). */ + limit?: number; + /** Period for rate limit, in milliseconds. (Default: 1000 ms). */ + period?: number; +} + +export interface RetryOptions { + /** If a transient server error occurs, how long to wait before retrying the request, in milliseconds. (Default: 500 ms). */ + interval?: number; +} + +export function createClient(options: CreateClientOptions): GoogleMapsClient; + +/** + * A callback function, which is called asynchronously when an API method completes. + * The callback is given either: + * - a successful `ClientResponse` object; or + * - an error, one of: + * - the string `"timeout"`; or + * - an error from the underlying `http` library; or + * - a `ClientResponse` whose status is not `OK`. + * + * API methods don't require a callback function, if you use the Promise API. + */ +export type ResponseCallback = (err: 'timeout' | ClientResponse, response: ClientResponse) => void; + +/** + * The object given to the ResponseCallback, containing the HTTP status and headers, as well as the response JSON. + */ +export interface ClientResponse { + /** The HTTP headers. */ + headers: { [index: string]: string }; + /** Deserialized JSON object for the API response. */ + json: T; + /** The HTTP status. */ + status: number; +} + +/** A handle that allows cancelling a request, or obtaining a Promise. */ +export interface RequestHandle { + /** + * Returns the response as a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). + * This method is only available if you supplied the `Promise` constructor to the `createClient()` method when you constructed + * the client object. + */ + asPromise(): Promise>; + /** + * Cancels the request. + * The ResponseCallback will not be invoked, and promises will not be settled. + * Use the RequestHandle#finally handler will still be called. + */ + cancel(): void; + /** + * Registers a callback that will be called when the response is finished, either successfully, or with an error, + * or having been cancelled. Use this to clean up resources. + * Returns this handle, for chaining. + */ + finally(callback: () => void): RequestHandle; +} + +export type LatLngArray = [number, number]; + +export type LatLngString = string; + +export interface LatLngLiteral { + lat: number; + lng: number; +} + +export interface LatLngLiteralVerbose { + latitude: number; + longitude: number; +} + +/** + * A latitude, longitude pair. The API methods accept either: + * - a two-item array of [latitude, longitude]; + * - a comma-separated string; + * - an object with 'lat', 'lng' properties; or + * - an object with 'latitude', 'longitude' properties. + */ +export type LatLng = ( + LatLngArray | + LatLngString | + LatLngLiteral | + LatLngLiteralVerbose +); + +/** The bounds parameter defines the latitude/longitude coordinates of the southwest and northeast corners of this bounding box. */ +export interface LatLngBounds { + northeast: LatLngLiteral; + southwest: LatLngLiteral; +} + +/** + * By default the API will attempt to load the most appropriate language based on the users location or browser settings. + * Some APIs allow you to explicitly set a language when you make a request + * + * @see https://developers.google.com/maps/faq#languagesupport + */ +export type Language = ( + /** Arabic */ + 'ar' | + /** Belarusian */ + 'be' | + /** Bulgarian */ + 'bg' | + /** Bengali */ + 'bn' | + /** Catalan */ + 'ca' | + /** Czech */ + 'cs' | + /** Danish */ + 'da' | + /** German */ + 'de' | + /** Greek */ + 'el' | + /** English */ + 'en' | + /** English (Australian) */ + 'en-Au' | + /** English (Great Britain) */ + 'en-GB' | + /** Spanish */ + 'es' | + /** Basque */ + 'eu' | + /** Farsi */ + 'fa' | + /** Finnish */ + 'fi' | + /** Filipino */ + 'fil' | + /** French */ + 'fr' | + /** Galician */ + 'gl' | + /** Gujarati */ + 'gu' | + /** Hindi */ + 'hi' | + /** Croatian */ + 'hr' | + /** Hungarian */ + 'hu' | + /** Indonesian */ + 'id' | + /** Italian */ + 'it' | + /** Hebrew */ + 'iw' | + /** Japanese */ + 'ja' | + /** Kazakh */ + 'kk' | + /** Kannada */ + 'kn' | + /** Korean */ + 'ko' | + /** Kyrgyz */ + 'ky' | + /** Lithuanian */ + 'lt' | + /** Latvian */ + 'lv' | + /** Macedonian */ + 'mk' | + /** Malayalam */ + 'ml' | + /** Marathi */ + 'mr' | + /** Burmese */ + 'my' | + /** Dutch */ + 'nl' | + /** Norwegian */ + 'no' | + /** Punjabi */ + 'pa' | + /** Polish */ + 'pl' | + /** Portuguese */ + 'pt' | + /** Portuguese (Brazil) */ + 'pt-BR' | + /** Portuguese (Portugal) */ + 'pt-PT' | + /** Romanian */ + 'ro' | + /** Russian */ + 'ru' | + /** Slovak */ + 'sk' | + /** Slovenian */ + 'sl' | + /** Albanian */ + 'sq' | + /** Serbian */ + 'sr' | + /** Swedish */ + 'sv' | + /** Tamil */ + 'ta' | + /** Telugu */ + 'te' | + /** Thai */ + 'th' | + /** Tagalog */ + 'tl' | + /** Turkish */ + 'tr' | + /** Ukrainian */ + 'uk' | + /** Uzbek */ + 'uz' | + /** Vietnamese */ + 'vi' | + /** Chinese (Simlified) */ + 'zh-CN' | + /** Chinese (Traditional) */ + 'zh-TW' +); + +export type GoogleMapsClientEndpoint = (query: Request, callback?: ResponseCallback) => RequestHandle; + +export interface GoogleMapsClient { + /** + * The Directions API is a service that calculates directions between locations using an HTTP request. + * + * With the Directions API, you can: + * - Search for directions for several modes of transportation, including transit, driving, walking or cycling. + * - Return multi-part directions using a series of waypoints. + * - Specify origins, destinations, and waypoints as text strings + * (e.g. "Chicago, IL" or "Darwin, NT, Australia"), or as latitude/longitude coordinates, or as place IDs. + * + * The API returns the most efficient routes when calculating directions. Travel time is the primary factor optimized, + * but the API may also take into account other factors such as distance, number of turns and many more when deciding + * which route is the most efficient. + * + * **Tip:** Calculating directions is a time and resource intensive task. Whenever possible, use the service to calculate + * known addresses ahead of time and store the results in a + * [**temporary cache**](https://developers.google.com/maps/documentation/directions/policies#pre-fetching-caching-or-storage-of-content) + * of your own design. + * + * **Note:** This service is not designed to respond in real time to user input. For dynamic directions calculations + * (for example, within a user interface element), consult the documentation for the + * [Maps JavaScript API Directions Service](https://developers.google.com/maps/documentation/javascript/directions) + * + * @see https://developers.google.com/maps/documentation/directions/intro + */ + directions: GoogleMapsClientEndpoint; + /** + * The Distance Matrix API is a service that provides travel distance and time for a matrix of origins and destinations. + * The API returns information based on the recommended route between start and end points, as calculated by the Google Maps API, + * and consists of rows containing duration and distance values for each pair. + * + * @see https://developers.google.com/maps/documentation/distance-matrix/intro + */ + distanceMatrix: GoogleMapsClientEndpoint; + /** + * The Elevation API provides a simple interface to query locations on the earth for elevation data. With the Elevation API, + * you can develop hiking and biking applications, positioning applications, or low resolution surveying applications. + * + * Elevation data is available for all locations on the surface of the earth, including depth locations on the ocean floor + * (which return negative values). In those cases where Google does not possess exact elevation measurements at the precise + * location you request, the service interpolates and returns an averaged value using the four nearest locations. + * Elevation values are expressed relative to local mean sea level (LMSL). + * + * You access the Elevation API through an HTTP interface. Users of the Maps JavaScript API may also access this API directly + * by using the `ElevationService()` object. + * (See [Elevation Service](https://developers.google.com/maps/documentation/javascript/elevation) for more information.) + * + * @see https://developers.google.com/maps/documentation/elevation/intro + */ + elevation: GoogleMapsClientEndpoint; + /** + * You may request sampled elevation data along paths, allowing you to calculate elevation changes along routes. + * With the Elevation API, you can develop hiking and biking applications, positioning applications, + * or low resolution surveying applications. + * + * @see https://developers.google.com/maps/documentation/elevation/intro + */ + elevationAlongPath: GoogleMapsClientEndpoint; + /** + * The Places API allows you to query for place information on a variety of categories, such as: establishments, + * prominent points of interest, geographic locations, and more. You can search for places either by proximity or a text string. + * A Place Search returns a list of places along with summary information about each place; additional information is available + * via a [Place Details](https://developers.google.com/places/web-service/details) query. + * + * A Find Place request takes a text input, and returns a place. + * The text input can be any kind of Places data, for example, a name, address, or phone number. + * + * @see https://developers.google.com/places/web-service/search#FindPlaceRequests + */ + findPlace: GoogleMapsClientEndpoint; + /** + * **Geocoding** is the process of converting addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") + * into geographic coordinates (like latitude 37.423021 and longitude -122.083739), + * which you can use to place markers on a map, or position the map. + * + * **Note:** This service is generally designed for geocoding static (known in advance) addresses for placement + * of application content on a map; this service is not designed to respond in real time to user input. + * For dynamic geocoding (for example, within a user interface element), consult the documentation for the + * [Maps JavaScript API client geocoder](https://developers.google.com/maps/documentation/javascript/geocoding) and/or the + * [Google Play services Location APIs](https://developer.android.com/google/play-services/location.html). + * + * **Tip:** Geocoding is a time and resource intensive task. Whenever possible, pre-geocode known addresses + * (using the Geocoding API described here or another geocoding service), and store your results in a + * [**temporary cache**](https://developers.google.com/maps/documentation/geocoding/policies#pre-fetching-caching-or-storage-of-content) + * of your own design. + * + * @see https://developers.google.com/maps/documentation/geocoding/intro#GeocodingRequests + */ + geocode: GoogleMapsClientEndpoint; + /** + * The Geolocation API returns a location and accuracy radius based on information about cell towers and WiFi nodes + * that the mobile client can detect. This document describes the protocol used to send this data to the server and + * to return a response to the client. + * + * @see https://developers.google.com/maps/documentation/geolocation/intro + */ + geolocate: GoogleMapsClientEndpoint; + /** + * The Roads API takes up to 100 independent coordinates, and returns the closest road segment for each point. + * The points passed do not need to be part of a continuous path. + * + * If you are working with sequential GPS points, use [Snap to Roads](https://developers.google.com/maps/documentation/roads/snap). + * + * @see https://developers.google.com/maps/documentation/roads/nearest + */ + nearestRoads: GoogleMapsClientEndpoint; + /** + * Once you have a `place_id` from a Place Search, you can request more details about a particular establishment + * or point of interest by initiating a Place Details request. A Place Details request returns more comprehensive + * information about the indicated place such as its complete address, phone number, user rating and reviews. + * + * @see https://developers.google.com/places/web-service/details + */ + place: GoogleMapsClientEndpoint; + /** + * The Google Places API Text Search Service is a web service that returns information about a set of places + * based on a string — for example "pizza in New York" or "shoe stores near Ottawa" or "123 Main Street". + * The service responds with a list of places matching the text string and any location bias that has been set. + * + * The service is especially useful for making + * [ambiguous address queries](https://developers.google.com/maps/documentation/geocoding/best-practices) in an automated system, + * and non-address components of the string may match businesses as well as addresses. + * Examples of ambiguous address queries are incomplete addresses, poorly formatted addresses, + * or a request that includes non-address components such as business names. + * + * The search response will include a list of places. You can send a Place Details request + * for more information about any of the places in the response. + * + * @see https://developers.google.com/places/web-service/search#TextSearchRequests + */ + places: GoogleMapsClientEndpoint; + /** + * The Place Autocomplete service is a web service that returns place predictions in response to an HTTP request. + * The request specifies a textual search string and optional geographic bounds. + * The service can be used to provide autocomplete functionality for text-based geographic searches, + * by returning places such as businesses, addresses and points of interest as a user types. + * + * @see https://developers.google.com/places/web-service/autocomplete + */ + placesAutoComplete: GoogleMapsClientEndpoint; + /** + * A Nearby Search lets you search for places within a specified area. + * You can refine your search request by supplying keywords or specifying the type of place you are searching for. + * + * @see https://developers.google.com/places/web-service/search#PlaceSearchRequests + */ + placesNearby: GoogleMapsClientEndpoint; + /** + * The Place Photo service, part of the Places API, is a read- only API that allows you to add high quality photographic content + * to your application. The Place Photo service gives you access to the millions of photos stored in the Places database. + * When you get place information using a Place Details request, photo references will be returned for relevant photographic content. + * The Nearby Search and Text Search requests also return a single photo reference per place, when relevant. + * Using the Photo service you can then access the referenced photos and resize the image to the optimal size for your application. + * + * @see https://developers.google.com/places/web-service/photos + */ + placesPhoto: GoogleMapsClientEndpoint; + /** + * The Query Autocomplete service can be used to provide a query prediction for text-based geographic searches, + * by returning suggested queries as you type. + * + * The Query Autocomplete service allows you to add on-the-fly geographic query predictions to your application. + * Instead of searching for a specific location, a user can type in a categorical search, such as "pizza near New York" + * and the service responds with a list of suggested queries matching the string. As the Query Autocomplete service can match + * on both full words and substrings, applications can send queries as the user types to provide on-the-fly predictions. + * + * @see https://developers.google.com/places/web-service/query + */ + placesQueryAutoComplete: GoogleMapsClientEndpoint; + /** + * The Google Places API Radar Search Service allows you to search for up to 200 places at once, + * but with less detail than is typically returned from a Text Search or Nearby Search request. + * With Radar Search, you can create applications that help users identify specific areas of interest within a geographic area. + * + * The search response will include up to 200 places, and will include only the following information about each place: + * - The `geometry` field containing geographic coordinates. + * - The `place_id`, which you can use in a Place Details request to get more information about the place. + * + * @deprecated Radar search is deprecated as of June 30, 2018. After that time, this feature will no longer be available. + * + * @see https://developers.google.com/places/web-service/search#RadarSearchRequests + */ + placesRadar: GoogleMapsClientEndpoint; + /** + * Reverse geocoding is the process of converting geographic coordinates into a human-readable address. + * + * @see https://developers.google.com/maps/documentation/geocoding/intro#ReverseGeocoding + */ + reverseGeocode: GoogleMapsClientEndpoint; + /** + * The Roads API returns the posted speed limit for a given road segment. + * In the case of road segments with variable speed limits, the default speed limit for the segment is returned. + * + * The accuracy of speed limit data returned by the Roads API cannot be guaranteed. + * The speed limit data provided is not real-time, and may be estimated, inaccurate, incomplete, and/or outdated. + * You may report inaccuracies in our speed limit data by filing a case in the + * [Google Cloud Support Portal](https://developers.google.com/maps/premium/support#support_portal). + * + * @see https://developers.google.com/maps/documentation/roads/speed-limits + */ + snappedSpeedLimits: GoogleMapsClientEndpoint; + /** + * The Roads API takes up to 100 GPS points collected along a route, and returns a similar set of data, + * with the points snapped to the most likely roads the vehicle was traveling along. + * Optionally, you can request that the points be interpolated, resulting in a path that smoothly follows the geometry of the road. + * + * @see https://developers.google.com/maps/documentation/roads/snap + */ + snapToRoads: GoogleMapsClientEndpoint; + /** + * The Roads API returns the posted speed limit for a given road segment. + * In the case of road segments with variable speed limits, the default speed limit for the segment is returned. + * + * The accuracy of speed limit data returned by the Roads API cannot be guaranteed. + * The speed limit data provided is not real-time, and may be estimated, inaccurate, incomplete, and/or outdated. + * You may report inaccuracies in our speed limit data by filing a case in the + * [Google Cloud Support Portal](https://developers.google.com/maps/premium/support#support_portal). + * + * @see https://developers.google.com/maps/documentation/roads/speed-limits + */ + speedLimits: GoogleMapsClientEndpoint; + /** + * The Time Zone API provides a simple interface to request the time zone for locations on the surface of the earth, + * as well as the time offset from UTC for each of those locations. You request the time zone information for + * a specific latitude/longitude pair and date. The API returns the name of that time zone, the time offset from UTC, + * and the daylight savings offset. + * + * @see https://developers.google.com/maps/documentation/timezone/intro + */ + timezone: GoogleMapsClientEndpoint; +} + +export interface DirectionsRequest { + /** + * The address, textual latitude/longitude value, or place ID from which you wish to calculate directions. + * - If you pass an address, the Directions service geocodes the string and converts it to a latitude/longitude coordinate + * to calculate directions. This coordinate may be different from that returned by the Geocoding API, for example a building + * entrance rather than its center. + * + * `origin=24+Sussex+Drive+Ottawa+ON` + * + * - If you pass coordinates, they are used unchanged to calculate directions. Ensure that no space exists between the latitude + * and longitude values. + * + * `origin=41.43206,-81.38992` + * + * - Place IDs must be prefixed with `place_id:`. The place ID may only be specified if the request includes an API key or a + * Google Maps APIs Premium Plan client ID. You can retrieve place IDs from the Geocoding API and the Places SDK + * (including Place Autocomplete). For an example using place IDs from Place Autocomplete, see [Place Autocomplete and + * Directions](https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-directions). + * + * `origin=place_id:ChIJ3S-JXmauEmsRUcIaWtf4MzE` + */ + origin: LatLng; + /** + * The address, textual latitude/longitude value, or place ID to which you wish to calculate directions. + * The options for the `destination` parameter are the same as for the `origin` parameter, described above + */ + destination: LatLng; + /** + * Specifies the mode of transport to use when calculating directions + * + * @default TravelMode.driving + */ + mode?: TravelMode; + /** + * Specifies an array of waypoints. + * Waypoints alter a route by routing it through the specified location(s). + * A waypoint is specified as a latitude/longitude coordinate, an encoded polyline, a place ID, or an address which will be geocoded. + * Encoded polylines must be prefixed with `enc:` and followed by a colon (`:`). Place IDs must be prefixed with `place_id:`. + * The place ID may only be specified if the request includes an API key or a Google Maps APIs Premium Plan client ID. + * Waypoints are only supported for driving, walking and bicycling directions. + */ + waypoints?: LatLng[]; + /** + * If set to `true`, specifies that the Directions service may provide more than one route alternative in the response. + * Note that providing route alternatives may increase the response time from the server. + */ + alternatives?: boolean; + /** Indicates that the calculated route(s) should avoid the indicated features. */ + avoid?: TravelRestriction[]; + /** + * The language in which to return results. + * + * - If `language` is not supplied, the API attempts to use the preferred language as specified in the `Accept-Language` header, + * or the native language of the domain from which the request is sent. + * - The API does its best to provide a street address that is readable for both the user and locals. To achieve that goal, + * it returns street addresses in the local language, transliterated to a script readable by the user if necessary, + * observing the preferred language. All other addresses are returned in the preferred language. + * Address components are all returned in the same language, which is chosen from the first component. + * - If a name is not available in the preferred language, the API uses the closest match. + * - The preferred language has a small influence on the set of results that the API chooses to return, + * and the order in which they are returned. The geocoder interprets abbreviations differently depending on language, + * such as the abbreviations for street types, or synonyms that may be valid in one language but not in another. + * For example, utca and tér are synonyms for street in Hungarian. + */ + language?: Language; + /** Specifies the unit system to use when displaying results. */ + units?: UnitSystem; + /** Specifies the region code, specified as a ccTLD ("top-level domain") two-character value. */ + region?: string; + /** + * Specifies the desired time of arrival for transit directions, in seconds since midnight, January 1, 1970 UTC. + * You can specify either `departure_time` or `arrival_time`, but not both. + * Note that `arrival_time` must be specified as an integer. + */ + arrival_time?: Date | number; + /** + * Specifies the desired time of departure. You can specify the time as an integer in seconds since midnight, January 1, 1970 UTC. + * Alternatively, you can specify a value of `now`, which sets the departure time to the current time (correct to the nearest second). + * + * The departure time may be specified in two cases: + * - For requests where the travel mode is transit: You can optionally specify one of `departure_time` or `arrival_time`. + * If neither time is specified, the `departure_time` defaults to now (that is, the departure time defaults to the current time). + * - For requests where the travel mode is driving: You can specify the `departure_time` to receive a route and trip duration + * (response field: `duration_in_traffic`) that take traffic conditions into account. + * This option is only available if the request contains a valid API key, or a valid Google Maps APIs Premium Plan client ID + * and signature. The `departure_time` must be set to the current time or some time in the future. It cannot be in the past. + */ + departure_time?: Date | number; + /** + * Specifies the assumptions to use when calculating time in traffic. + * This setting affects the value returned in the `duration_in_traffic` field in the response, which contains the predicted time + * in traffic based on historical averages. The `traffic_model` parameter may only be specified for driving directions + * where the request includes a `departure_time`, and only if the request includes an API key or a Google Maps APIs Premium Plan client ID. + * + * The default value of `best_guess` will give the most useful predictions for the vast majority of use cases. + * It is possible the `best_guess` travel time prediction may be *shorter* than `optimistic`, or alternatively, + * *longer* than `pessimistic`, due to the way the `best_guess` prediction model integrates live traffic information. + * + * @default TrafficModel.best_guess + */ + traffic_model?: TrafficModel; + /** + * Specifies one or more preferred modes of transit. + * This parameter may only be specified for transit directions, and only if the request includes an API key or + * a Google Maps APIs Premium Plan client ID. + */ + transit_mode?: TransitMode[]; + /** + * Specifies preferences for transit routes. + * Using this parameter, you can bias the options returned, rather than accepting the default best route chosen by the API. + * This parameter may only be specified for transit directions, and only if the request includes an API key or + * a Google Maps APIs Premium Plan client ID. + */ + transit_routing_preference?: TransitRoutingPreference; + /** Wherever to optimize the provided route by rearranging the waypoints in a more efficient order. */ + optimize?: boolean; +} + +/** + * When you calculate directions, you may specify the transportation mode to use. + * By default, directions are calculated as `driving` directions. + * + * **Note:** Both walking and bicycling directions may sometimes not include clear pedestrian or bicycling paths, + * so these directions will return warnings in the returned result which you must display to the user. + */ +export type TravelMode = ( + /** (default) indicates standard driving directions using the road network. */ + 'driving' | + /** requests walking directions via pedestrian paths & sidewalks (where available). */ + 'walking' | + /** requests bicycling directions via bicycle paths & preferred streets (where available). */ + 'bicycling' | + /** + * requests directions via public transit routes (where available). + * If you set the mode to transit, you can optionally specify either a departure_time or an arrival_time. + * If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time). + * You can also optionally include a transit_mode and/or a transit_routing_preference. + */ + 'transit' +); + +export type TravelRestriction = ( + /** indicates that the calculated route should avoid toll roads/bridges. */ + 'tolls' | + /** indicates that the calculated route should avoid highways. */ + 'highways' | + /** indicates that the calculated route should avoid ferries. */ + 'ferries' | + /** + * indicates that the calculated route should avoid indoor steps for walking and transit directions. + * Only requests that include an API key or a Google Maps APIs Premium Plan client ID will receive indoor steps by default. + */ + 'indoor' +); + +/** + * Directions results contain text within distance fields that may be displayed to the user to indicate the distance of + * a particular "step" of the route. By default, this text uses the unit system of the origin's country or region. + */ +export type UnitSystem = ( + /** specifies usage of the metric system. Textual distances are returned using kilometers and meters. */ + 'metric' | + /** specifies usage of the Imperial (English) system. Textual distances are returned using miles and feet. */ + 'imperial' +); + +export interface DirectionsResponse { + /** contains metadata on the request. */ + status: DirectionsReponseStatus; + /** + * contains an array with details about the geocoding of origin, destination and waypoints. + * + * These details will not be present for waypoints specified as textual latitude/longitude values if the service returns no results. + * This is because such waypoints are only reverse geocoded to obtain their representative address after a route has been found. + * An empty JSON object will occupy the corresponding places in the `geocoded_waypoints` array. + */ + geocoded_waypoints: GeocodedWaypoint[]; + /** + * contains an array of routes from the origin to the destination. + * + * When the Directions API returns results, it places them within a (JSON) `routes` array. Even if the service returns no results + * (such as if the origin and/or destination doesn't exist) it still returns an empty `routes` array. + * (XML responses consist of zero or more `` elements.) + * + * Each element of the `routes` array contains a single result from the specified origin and destination. + * This route may consist of one or more `legs` depending on whether any waypoints were specified. + * As well, the route also contains copyright and warning information which must be displayed to the user in addition to the + * routing information. + */ + routes: DirectionsRoute[]; + /** + * contains an array of available travel modes. This field is returned when a request specifies a travel `mode` and gets no results. + * The array contains the available travel modes in the countries of the given set of waypoints. + * This field is not returned if one or more of the waypoints are `via:` waypoints. + */ + available_travel_modes: string[]; +} + +export type TrafficModel = ( + /** + * indicates that the returned `duration_in_traffic` should be the best estimate of travel time given what is known about + * both historical traffic conditions and live traffic. Live traffic becomes more important the closer the `departure_time` is to now. + */ + 'best_guess' | + /** + * indicates that the returned `duration_in_traffic` should be longer than the actual travel time on most days, + * though occasional days with particularly bad traffic conditions may exceed this value. + */ + 'pessimistic' | + /** + * indicates that the returned `duration_in_traffic` should be shorter than the actual travel time on most days, + * though occasional days with particularly good traffic conditions may be faster than this value. + */ + 'optimistic' +); + +export type TransitMode = ( + /** indicates that the calculated route should prefer travel by bus. */ + 'bus' | + /** indicates that the calculated route should prefer travel by subway. */ + 'subway' | + /** indicates that the calculated route should prefer travel by train. */ + 'train' | + /** indicates that the calculated route should prefer travel by tram and light rail. */ + 'tram' | + /** + * indicates that the calculated route should prefer travel by train, tram, light rail, and subway. + * This is equivalent to `transit_mode=train|tram|subway` + */ + 'rail' +); + +export type TransitRoutingPreference = ( + /** indicates that the calculated route should prefer limited amounts of walking. */ + 'less_walking' | + /** indicates that the calculated route should prefer a limited number of transfers. */ + 'fewer_transfers' +); + +/** + * The `status` field within the Directions response object contains the status of the request, and may contain debugging information + * to help you track down why the Directions service failed. + */ +export type DirectionsReponseStatus = ( + /** indicates the response contains a valid `result`. */ + 'OK' | + /** indicates at least one of the locations specified in the request's origin, destination, or waypoints could not be geocoded. */ + 'NOT_FOUND' | + /** indicates no route could be found between the origin and destination. */ + 'ZERO_RESULTS' | + /** + * indicates that too many `waypoints` were provided in the request. For applications using the Directions API as a web service, + * or the [directions service in the Maps JavaScript API](https://developers.google.com/maps/documentation/javascript/directions), + * the maximum allowed number of `waypoints` is 23, plus the origin and destination. + */ + 'MAX_WAYPOINTS_EXCEEDED' | + /** + * indicates the requested route is too long and cannot be processed. + * This error occurs when more complex directions are returned. + * Try reducing the number of waypoints, turns, or instructions. + */ + 'MAX_ROUTE_LENGTH_EXCEEDED ' | + /** indicates that the provided request was invalid. Common causes of this status include an invalid parameter or parameter value. */ + 'INVALID_REQUEST' | + /** + * indicates any of the following: + * - The API key is missing or invalid. + * - Billing has not been enabled on your account. + * - A self-imposed usage cap has been exceeded. + * - The provided method of payment is no longer valid (for example, a credit card has expired). + * See the [Maps FAQ](https://developers.google.com/maps/faq#over-limit-key-error) to learn how to fix this. + */ + 'OVER_DAILY_LIMIT' | + /** indicates the service has received too many requests from your application within the allowed time period. */ + 'OVER_QUERY_LIMIT' | + /** indicates that the service denied use of the directions service by your application. */ + 'REQUEST_DENIED' | + /** indicates a directions request could not be processed due to a server error. The request may succeed if you try again. */ + 'UNKNOWN_ERROR' +); + +/** + * Elements in the `geocoded_waypoints` array correspond, by their zero-based position, to the origin, + * the waypoints in the order they are specified, and the destination. + */ +export interface GeocodedWaypoint { + /** indicates the status code resulting from the geocoding operation. */ + geocoder_status: GeocodedWaypointStatus; + /** + * indicates that the geocoder did not return an exact match for the original request, though it was able to match part of the + * requested address. You may wish to examine the original request for misspellings and/or an incomplete address. + * + * Partial matches most often occur for street addresses that do not exist within the locality you pass in the request. + * Partial matches may also be returned when a request matches two or more locations in the same locality. + * For example, "21 Henr St, Bristol, UK" will return a partial match for both Henry Street and Henrietta Street. + * Note that if a request includes a misspelled address component, the geocoding service may suggest an alternative address. + * Suggestions triggered in this way will also be marked as a partial match. + */ + partial_match: boolean; + /** unique identifier that can be used with other Google APIs. */ + place_id: string; + /** + * indicates the *address type* of the geocoding result used for calculating directions. + * + * An empty list of types indicates there are no known types for the particular address component, for example, Lieu-dit in France. + */ + types: AddressType[]; +} + +export type GeocodedWaypointStatus = ( + /** indicates that no errors occurred; the address was successfully parsed and at least one geocode was returned. */ + 'OK' | + /** + * indicates that the geocode was successful but returned no results. + * This may occur if the geocoder was passed a non-existent `address`. + */ + 'ZERO_RESULTS' +); + +export type AddressType = ( + /** indicates a precise street address. */ + 'street_address' | + /** indicates a named route (such as "US 101"). */ + 'route' | + /** indicates a major intersection, usually of two major roads. */ + 'intersection' | + /** indicates a political entity. Usually, this type indicates a polygon of some civil administration. */ + 'political' | + /** indicates the national political entity, and is typically the highest order type returned by the Geocoder. */ + 'country' | + /** + * indicates a first-order civil entity below the country level. Within the United States, these administrative levels are states. + * Not all nations exhibit these administrative levels. In most cases, `administrative_area_level_1` short names will closely match + * ISO 3166-2 subdivisions and other widely circulated lists; however this is not guaranteed as our geocoding results are based + * on a variety of signals and location data. + */ + 'administrative_area_level_1' | + /** + * indicates a second-order civil entity below the country level. Within the United States, these administrative levels are counties. + * Not all nations exhibit these administrative levels. + */ + 'administrative_area_level_2' | + /** + * indicates a third-order civil entity below the country level. This type indicates a minor civil division. + * Not all nations exhibit these administrative levels. + */ + 'administrative_area_level_3' | + /** + * indicates a fourth-order civil entity below the country level. This type indicates a minor civil division. + * Not all nations exhibit these administrative levels. + */ + 'administrative_area_level_4' | + /** + * indicates a fifth-order civil entity below the country level. This type indicates a minor civil division. + * Not all nations exhibit these administrative levels. + */ + 'administrative_area_level_5' | + /** indicates a commonly-used alternative name for the entity. */ + 'colloquial_area' | + /** indicates an incorporated city or town political entity. */ + 'locality' | + /** + * indicates a specific type of Japanese locality, to facilitate distinction between multiple locality components within a + * Japanese address. + */ + 'ward' | + /** + * indicates a first-order civil entity below a locality. For some locations may receive one of the additional types: + * `sublocality_level_1` to `sublocality_level_5`. Each sublocality level is a civil entity. Larger numbers indicate a smaller + * geographic area. + */ + 'sublocality' | + /** indicates a named neighborhood */ + 'neighborhood' | + /** indicates a named location, usually a building or collection of buildings with a common name */ + 'premise' | + /** + * indicates a first-order entity below a named location, usually a singular building within a collection of buildings with a + * common name. + */ + 'subpremise' | + /** indicates a postal code as used to address postal mail within the country. */ + 'postal_code' | + /** indicates a prominent natural feature. */ + 'natural_feature' | + /** indicates an airport. */ + 'airport' | + /** indicates a named park. */ + 'park' | + /** + * indicates a named point of interest. Typically, these "POI"s are prominent local entities that don't easily fit in another category, + * such as "Empire State Building" or "Statue of Liberty". + */ + 'point_of_interest' +); + +/** + * This route may consist of one or more `legs` depending on whether any waypoints were specified. As well, the route also contains + * copyright and warning information which must be displayed to the user in addition to the routing information. + */ +export interface DirectionsRoute { + /** contains a short textual description for the route, suitable for naming and disambiguating the route from alternatives. */ + summary: string; + /** + * contains an array which contains information about a leg of the route, between two locations within the given route. + * A separate leg will be present for each waypoint or destination specified. + * (A route with no waypoints will contain exactly one leg within the `legs` array.) + * Each leg consists of a series of `steps`. + */ + legs: RouteLeg[]; + /** + * contains an array indicating the order of any waypoints in the calculated route. + * This waypoints may be reordered if the request was passed `optimize:true` within its `waypoints` parameter. + */ + waypoint_order: number[]; + /** + * contains a single `points` object that holds an encoded polyline representation of the route. + * This polyline is an approximate (smoothed) path of the resulting directions. + */ + overview_polyline: string; + /** contains the viewport bounding box of the `overview_polyline`. */ + bounds: LatLngBounds; + /** contains the copyrights text to be displayed for this route. You must handle and display this information yourself. */ + copyrights: string; + /** contains an array of warnings to be displayed when showing these directions. You must handle and display these warnings yourself. */ + warnings: string[]; + /** + * If present, contains the total fare (that is, the total ticket costs) on this route. + * This property is only returned for transit requests and only for routes where fare information is available for all transit legs. + * + * **Note:** The Directions API only returns fare information for requests that contain either an API key or a client ID + * and digital signature. + */ + fare: TransitFare; + /** + * An array of LatLngs representing the entire course of this route. The path is simplified in order to make + * it suitable in contexts where a small number of vertices is required (such as Static Maps API URLs). + */ + overview_path: LatLngLiteral[]; +} + +export interface TransitFare { + /** An [ISO 4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) indicating the currency that the amount is expressed in. */ + currency: string; + /** The total fare amount, in the currency specified above. */ + value: number; + /** The total fare amount, formatted in the requested language. */ + text: string; +} + +/** + * A single leg of the journey from the origin to the destination in the calculated route. + * For routes that contain no waypoints, the route will consist of a single "leg," but for routes that define one or more waypoints, + * the route will consist of one or more legs, corresponding to the specific legs of the journey. + */ +export interface RouteLeg { + /** contains an array of steps denoting information about each separate step of the leg of the journey. */ + steps: DirectionsStep[]; + /** + * indicates the total distance covered by this leg, as a field with the following elements. + * + * This field may be absent if the distance is unknown. + */ + distance: Distance; + /** + * indicates the total duration of this leg. + * + * This field may be absent if the duration is unknown. + */ + duration: Duration; + /** + * indicates the total duration of this leg. + * This value is an estimate of the time in traffic based on current and historical traffic conditions. + * See the `traffic_model` request parameter for the options you can use to request that the returned value is optimistic, pessimistic, + * or a best-guess estimate. The duration in traffic is returned only if all of the following are true: + * + * - The request includes a valid API key, or a valid Google Maps APIs Premium Plan client ID and signature. + * - The request does not include stopover waypoints. If the request includes waypoints, they must be prefixed with `via:` + * to avoid stopovers. + * - The request is specifically for driving directions—the `mode` parameter is set to `driving`. + * - The request includes a `departure_time` parameter. + * - Traffic conditions are available for the requested route. + */ + duration_in_traffic: Duration; + /** contains the estimated time of arrival for this leg. This property is only returned for transit directions. */ + arrival_time: Time; + /** + * contains the estimated time of departure for this leg, specified as a `Time` object. + * The `departure_time` is only available for transit directions. + */ + departure_time: Time; + /** + * contains the latitude/longitude coordinates of the origin of this leg. + * Because the Directions API calculates directions between locations by using the nearest transportation option (usually a road) + * at the start and end points, `start_location` may be different than the provided origin of this leg if, for example, + * a road is not near the origin. + */ + start_location: LatLngLiteral; + /** + * contains the latitude/longitude coordinates of the given destination of this leg. + * Because the Directions API calculates directions between locations by using the nearest transportation option (usually a road) + * at the start and end points, `end_location` may be different than the provided destination of this leg if, for example, + * a road is not near the destination. + */ + end_location: LatLngLiteral; + /** contains the human-readable address (typically a street address) resulting from reverse geocoding the `start_location` of this leg. */ + start_address: string; + /** contains the human-readable address (typically a street address) from reverse geocoding the `end_location` of this leg. */ + end_address: string; +} + +/** + * A step is the most atomic unit of a direction's route, containing a single step describing a specific, single instruction on the journey. + * E.g. "Turn left at W. 4th St." The step not only describes the instruction but also contains distance and duration information relating to + * how this step relates to the following step. For example, a step denoted as "Merge onto I-80 West" may contain a duration of + * "37 miles" and "40 minutes," indicating that the next step is 37 miles/40 minutes from this step. + * + * When using the Directions API to search for transit directions, the steps array will include additional transit details in the form of + * a `transit_details` array. If the directions include multiple modes of transportation, detailed directions will be provided for walking or + * driving steps in an inner `steps` array. For example, a walking step will include directions from the start and end locations: + * "Walk to Innes Ave & Fitch St". That step will include detailed walking directions for that route in the inner `steps` array, such as: + * "Head north-west", "Turn left onto Arelious Walker", and "Turn left onto Innes Ave". + */ +export interface DirectionsStep { + /** contains formatted instructions for this step, presented as an HTML text string. */ + html_instructions: string; + /** + * contains the distance covered by this step until the next step. (See the discussion of this field in Directions Legs) + * + * This field may be undefined if the distance is unknown. + */ + distance: Distance; + /** + * contains the typical time required to perform the step, until the next step. (See the description in Directions Legs) + * + * This field may be undefined if the duration is unknown + */ + duration: Duration; + /** contains the location of the starting point of this step, as a single set of `lat` and `lng` fields. */ + start_location: LatLngLiteral; + /** contains the location of the last point of this step, as a single set of `lat` and `lng` fields. */ + end_location: LatLngLiteral; + /** + * contains the action to take for the current step (turn left, merge, straight, etc.). + * This field is used to determine which icon to display. + */ + maneuver: Maneuver; + /** + * contains a single points object that holds an encoded polyline representation of the step. + * This polyline is an approximate (smoothed) path of the step. + */ + polyline: string; + /** + * contains detailed directions for walking or driving steps in transit directions. + * Substeps are only available when `travel_mode` is set to "transit". + * The inner `steps` array is of the same type as `steps`. + */ + steps: DirectionsStep; + /** contains transit specific information. This field is only returned with travel_mode is set to "transit". */ + transit_details: TransitDetails; +} + +export interface Distance { + /** indicates the distance in meters. */ + value: number; + /** + * contains a human-readable representation of the distance, displayed in units as used at the origin + * (or as overridden within the `units` parameter in the request). + * (For example, miles and feet will be used for any origin within the United States.) + */ + text: string; +} + +export interface Duration { + /** indicates the duration in seconds. */ + value: number; + /** contains a human-readable representation of the duration. */ + text: string; +} + +export interface Time { + /** the time specified as a JavaScript `Date` object. */ + value: Date; + /** the time specified as a string. The time is displayed in the time zone of the transit stop. */ + text: string; + /** + * contains the time zone of this station. The value is the name of the time zone as defined in the + * [IANA Time Zone Database](http://www.iana.org/time-zones), e.g. "America/New_York". + */ + time_zone: string; +} + +export type Maneuver = ( + 'turn-slight-left' | + 'turn-sharp-left' | + 'uturn-left' | + 'turn-left' | + 'turn-slight-right' | + 'turn-sharp-right' | + 'uturn-right' | + 'turn-right' | + 'straight' | + 'ramp-left' | + 'ramp-right' | + 'merge' | + 'fork-left' | + 'fork-right' | + 'ferry' | + 'ferry-train' | + 'roundabout-left' | + 'roundabout-right' +); + +/** + * Transit directions return additional information that is not relevant for other modes of transportation. + * These additional properties are exposed through the `transit_details` object, returned as a field of an element in the `steps[]` array. + * From the `TransitDetails` object you can access additional information about the transit stop, transit line and transit agency + */ +export interface TransitDetails { + /** contains information about the stop for this part of the trip. */ + arrival_stop: TransitStop; + /** contains information about the station for this part of the trip. */ + departure_stop: TransitStop; + /** contain the arrival time for this leg of the journey. */ + arrival_time: Time; + /** contain the departure time for this leg of the journey. */ + departure_time: Time; + /** + * specifies the direction in which to travel on this line, as it is marked on the vehicle or at the departure stop. + * This will often be the terminus station. + */ + headsign: string; + /** + * specifies the expected number of seconds between departures from the same stop at this time. + * For example, with a `headway` value of 600, you would expect a ten minute wait if you should miss your bus. + */ + headway: number; + /** + * contains the number of stops in this step, counting the arrival stop, but not the departure stop. + * For example, if your directions involve leaving from Stop A, passing through stops B and C, and arriving at stop D, + * `num_stops` will return 3. + */ + num_stops: number; + /** contains information about the transit line used in this step. */ + line: TransitLine; +} + +export interface TransitStop { + /** the name of the transit station/stop. eg. "Union Square". */ + name: string; + /** the location of the transit station/stop, represented as a `lat` and `lng` field. */ + location: LatLngLiteral; +} + +export interface TransitLine { + /** contains the full name of this transit line. eg. "7 Avenue Express". */ + name: string; + /** contains the short name of this transit line. This will normally be a line number, such as "M7" or "355". */ + short_name: string; + /** contains the color commonly used in signage for this transit line. The color will be specified as a hex string such as: #FF0033. */ + color: string; + /** + * is an array containing a single `TransitAgency` object. + * The `TransitAgency` object provides information about the operator of the line + */ + agencies: TransitAgency[]; + /** contains the URL for this transit line as provided by the transit agency. */ + url: string; + /** contains the URL for the icon associated with this line. */ + icon: string; + /** contains the color of text commonly used for signage of this line. The color will be specified as a hex string. */ + text_color: string; + /** contains the type of vehicle used on this line. */ + vehicle: TransitVehicle; +} + +/** You must display the names and URLs of the transit agencies servicing the trip results. */ +export interface TransitAgency { + /** contains the name of the transit agency. */ + name: string; + /** contains the phone number of the transit agency. */ + phone: string; + /** contains the URL for the transit agency. */ + url: string; +} + +export interface TransitVehicle { + /** contains the name of the vehicle on this line. eg. "Subway.". */ + name: string; + /** contains the type of vehicle that runs on this line. */ + type: VehicleType; + /** contains the URL for an icon associated with this vehicle type. */ + icon: string; + /** contains the URL for the icon associated with this vehicle type, based on the local transport signage. */ + local_icon: string; +} + +/** @see https://developers.google.com/maps/documentation/directions/intro#VehicleType. */ +export type VehicleType = ( + /** Rail. */ + 'RAIL' | + /** Light rail transit. */ + 'METRO_RAIL' | + /** Underground light rail. */ + 'SUBWAY' | + /** Above ground light rail. */ + 'TRAM' | + /** Monorail. */ + 'MONORAIL' | + /** Heavy rail. */ + 'HEAVY_RAIL' | + /** Commuter rail. */ + 'COMMUTER_TRAIN' | + /** High speed train. */ + 'HIGH_SPEED_TRAIN' | + /** Bus. */ + 'BUS' | + /** Intercity bus. */ + 'INTERCITY_BUS' | + /** Trolleybus. */ + 'TROLLEYBUS' | + /** Share taxi is a kind of bus with the ability to drop off and pick up passengers anywhere on its route. */ + 'SHARE_TAXI' | + /** Ferry. */ + 'FERRY' | + /** A vehicle that operates on a cable, usually on the ground. Aerial cable cars may be of the type `GONDOLA_LIFT`. */ + 'CABLE_CAR' | + /** An aerial cable car. */ + 'GONDOLA_LIFT' | + /** + * A vehicle that is pulled up a steep incline by a cable. + * A Funicular typically consists of two cars, with each car acting as a counterweight for the other. + */ + 'FUNICULAR' | + /** All other vehicles will return this type. */ + 'OTHER' +); + +export interface DistanceMatrixRequest { + /** + * The starting point for calculating travel distance and time. + * You can supply one or more locations separated by the pipe character (`|`), in the form of an address, latitude/longitude coordinates, + * or a place ID: + * - If you pass an address, the service geocodes the string and converts it to a latitude/longitude coordinate to calculate distance. + * This coordinate may be different from that returned by the Geocoding API, for example a building entrance rather than its center. + * + * `origins=Bobcaygeon+ON|24+Sussex+Drive+Ottawa+ON` + * + * - If you pass latitude/longitude coordinates, they are used unchanged to calculate distance. + * Ensure that no space exists between the latitude and longitude values. + * + * `origins=41.43206,-81.38992|-33.86748,151.20699` + * + * - If you supply a place ID, you must prefix it with `place_id:`. + * You can only specify a place ID if the request includes an API key or a Google Maps APIs Premium Plan client ID. + * You can retrieve place IDs from the Geocoding API and the Places SDK (including Place Autocomplete). + * + * `origins=place_id:ChIJ3S-JXmauEmsRUcIaWtf4MzE` + * + * - Alternatively, you can supply an encoded set of coordinates using the + * [Encoded Polyline Algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm). + * This is particularly useful if you have a large number of origin points, because the URL is significantly shorter when using + * an encoded polyline. + * + * - Encoded polylines must be prefixed with `enc:` and followed by a colon (`:`). For example: `origins=enc:gfo}EtohhU:` + * - You can also include multiple encoded polylines, separated by the pipe character (`|`). + * For example: `origins=enc:wc~oAwquwMdlTxiKtqLyiK:|enc:c~vnAamswMvlTor@tjGi}L:|enc:udymA{~bxM:` + */ + origins: LatLng[]; + /** + * One or more locations to use as the finishing point for calculating travel distance and time. + * The options for the destinations parameter are the same as for the origins parameter, described above. + */ + destinations: LatLng[]; + /** + * Specifies the mode of transport to use when calculating distance. + * Valid values and other request details are specified in the Travel Modes section of this document. + * + * @default TravelMode.driving + */ + mode?: TravelMode; + /** + * The language in which to return results. + * - If `language` is not supplied, the API attempts to use the preferred language as specified in the `Accept-Language` header, + * or the native language of the domain from which the request is sent. + * - The API does its best to provide a street address that is readable for both the user and locals. To achieve that goal, + * it returns street addresses in the local language, transliterated to a script readable by the user if necessary, + * observing the preferred language. All other addresses are returned in the preferred language. + * Address components are all returned in the same language, which is chosen from the first component. + * - If a name is not available in the preferred language, the API uses the closest match. + * - The preferred language has a small influence on the set of results that the API chooses to return, + * and the order in which they are returned. The geocoder interprets abbreviations differently depending on language, + * such as the abbreviations for street types, or synonyms that may be valid in one language but not in another. + * For example, utca and tér are synonyms for street in Hungarian. + */ + language?: string; + /** + * The region code, specified as a [ccTLD](https://en.wikipedia.org/wiki/CcTLD) (country code top-level domain) two-character value. + * Most ccTLD codes are identical to ISO 3166-1 codes, with some exceptions. + * This parameter will only influence, not fully restrict, results from the geocoder. + * If more relevant results exist outside of the specified region, they may be included. + */ + region?: string; + /** + * Introduces restrictions to the route. Valid values are specified in the Restrictions section of this document. + * Only one restriction can be specified. + */ + avoid?: TravelRestriction[]; + /** Specifies the unit system to use when expressing distance as text. */ + units?: UnitSystem; + /** + * Specifies the desired time of arrival for transit requests, in seconds since midnight, January 1, 1970 UTC. + * You can specify either `departure_time` or `arrival_time`, but not both. + * Note that `arrival_time` must be specified as an integer. + */ + arrival_time?: Date | number; + /** + * The desired time of departure. You can specify the time as an integer in seconds since midnight, January 1, 1970 UTC. + * Alternatively, you can specify a value of now, which sets the departure time to the current time (correct to the nearest second). + * + * The departure time may be specified in two cases: + * + * - For requests where the travel mode is transit: You can optionally specify one of `departure_time` or `arrival_time`. + * If neither time is specified, the `departure_time` defaults to now (that is, the departure time defaults to the current time). + * + * - For requests where the travel mode is driving: You can specify the `departure_time` to receive a route and trip duration + * (response field: `duration_in_traffic`) that take traffic conditions into account. + * This option is only available if the request contains a valid API key, or a valid + * Google Maps APIs Premium Plan client ID and signature. + * The `departure_time` must be set to the current time or some time in the future. It cannot be in the past. + * + * **Note:** Distance Matrix requests specifying `departure_time` when `mode=driving` are limited + * to a maximum of 100 elements per request. The number of origins times the number of destinations defines the number of elements. + */ + departure_time?: Date | number; + /** + * Specifies the assumptions to use when calculating time in traffic. + * This setting affects the value returned in the `duration_in_traffic` field in the response, + * which contains the predicted time in traffic based on historical averages. + * The `traffic_model` parameter may only be specified for requests where the travel mode is `driving`, + * and where the request includes a `departure_time`, and only if the request includes an API key or + * a Google Maps APIs Premium Plan client ID. + * + * @default TrafficModel.best_guess + */ + traffic_model?: TrafficModel; + /** Specifies one or more preferred modes of transit. This parameter may only be specified for requests where the `mode` is `transit`. */ + transit_mode?: TransitMode[]; + /** + * Specifies preferences for transit requests. Using this parameter, you can bias the options returned, + * rather than accepting the default best route chosen by the API. + * This parameter may only be specified for requests where the `mode` is `transit`. + */ + transit_routing_preference?: TransitRoutingPreference; +} + +export interface DistanceMatrixResponse { + /** contains metadata on the request. See Status Codes below. */ + status: DistanceMatrixResponseTopLevelStatus; + /** + * When the top-level status code is other than `OK`, this field contains more detailed information + * about the reasons behind the given status code. + */ + error_message: string; + /** + * contains an array of addresses as returned by the API from your original request. + * These are formatted by the geocoder and localized according to the language parameter passed with the request. + */ + origin_addresses: string; + /** + * contains an array of addresses as returned by the API from your original request. + * As with origin_addresses, these are localized if appropriate. + */ + destination_addresses: string[]; + /** contains an array of elements, which in turn each contain a status, duration, and distance element. */ + rows: DistanceMatrixRow[]; +} + +/** + * The status fields within the response object contain the status of the request, and may contain useful debugging information. + * The Distance Matrix API returns a top-level status field, with information about the request in general, + * as well as a status field for each element field, with information about that particular origin-destination pairing. + */ +export type DistanceMatrixResponseTopLevelStatus = ( + /** indicates the response contains a valid result. */ + 'OK' | + /** indicates that the provided request was invalid. */ + 'INVALID_REQUEST' | + /** indicates that the product of origins and destinations exceeds the per-query limit. */ + 'MAX_ELEMENTS_EXCEEDED' | + /** + * indicates any of the following: + * - The API key is missing or invalid. + * - Billing has not been enabled on your account. + * - A self-imposed usage cap has been exceeded. + * - The provided method of payment is no longer valid (for example, a credit card has expired). + * See the [Maps FAQ](https://developers.google.com/maps/faq#over-limit-key-error) to learn how to fix this. + */ + 'OVER_DAILY_LIMIT' | + /** indicates the service has received too many requests from your application within the allowed time period. */ + 'OVER_QUERY_LIMIT' | + /** indicates that the service denied use of the Distance Matrix service by your application. */ + 'REQUEST_DENIED' | + /** indicates a Distance Matrix request could not be processed due to a server error. The request may succeed if you try again. */ + 'UNKNOWN_ERROR' +); + +export type DistanceMatrixResponseElementLevelStatus = ( + /** indicates the response contains a valid result. */ + 'OK' | + /** indicates that the origin and/or destination of this pairing could not be geocoded. */ + 'NOT_FOUND' | + /** indicates no route could be found between the origin and destination. */ + 'ZERO_RESULTS' | + /** indicates the requested route is too long and cannot be processed. */ + 'MAX_ROUTE_LENGTH_EXCEEDED' +); + +/** + * When the Distance Matrix API returns results, it places them within a JSON `rows` array. + * Even if no results are returned (such as when the origins and/or destinations don't exist), it still returns an empty array. + * XML responses consist of zero or more `` elements. + * + * Rows are ordered according to the values in the `origin` parameter of the request. + * Each row corresponds to an origin, and each `element` within that row corresponds to a pairing of the origin with a `destination` value. + * + * Each `row` array contains one or more `element` entries, which in turn contain the information about a single origin-destination pairing. + */ +export interface DistanceMatrixRow { + elements: DistanceMatrixRowElement[]; +} + +/** The information about each origin-destination pairing is returned in an `element` entry. */ +export interface DistanceMatrixRowElement { + /** possible status codes */ + status: DistanceMatrixResponseElementLevelStatus; + /** + * The length of time it takes to travel this route, expressed in seconds (the `value` field) and as `text`. + * The textual representation is localized according to the query's `language` parameter. + */ + duration: Duration; + /** + * The length of time it takes to travel this route, based on current and historical traffic conditions. + * See the `traffic_model` request parameter for the options you can use to request that the returned value is + * `optimistic`, `pessimistic`, or a `best-guess` estimate. The duration is expressed in seconds (the `value` field) and as `text`. + * The textual representation is localized according to the query's `language` parameter. + * The duration in traffic is returned only if all of the following are true: + * - The request includes a `departure_time` parameter. + * - The request includes a valid API key, or a valid Google Maps APIs Premium Plan client ID and signature. + * - Traffic conditions are available for the requested route. + * - The `mode` parameter is set to `driving`. + */ + duration_in_traffic: Duration; + /** + * The total distance of this route, expressed in meters (`value`) and as `text`. + * The textual value uses the `unit` system specified with the unit parameter of the original request, or the origin's region. + */ + distance: Distance; + /** + * If present, contains the total fare (that is, the total ticket costs) on this route. + * This property is only returned for transit requests and only for transit providers where fare information is available. + */ + fare: TransitFare; +} + +export interface ElevationRequest { + /** + * defines the location(s) on the earth from which to return elevation data. + * This parameter takes either a single location as a comma-separated {latitude,longitude} pair (e.g. "40.714728,-73.998672") + * or multiple latitude/longitude pairs passed as an array or as an encoded polyline. + */ + locations: LatLng[]; +} + +export interface ElevationResponse { + /** An Elevation status code. */ + status: ElevationResponseStatus; + /** + * When the status code is other than `OK`, there may be an additional `error_message` field within the Elevation response object. + * This field contains more detailed information about the reasons behind the given status code. + */ + error_message: string; + /** An Elevation results array. */ + results: ElevationResult[]; +} + +export type ElevationResponseStatus = ( + /** indicating the API request was successful. */ + 'OK' | + /** indicating the API request was malformed. */ + 'INVALID_REQUEST' | + /** + * indicating any of the following: + * The API key is missing or invalid. + * - Billing has not been enabled on your account. + * - A self-imposed usage cap has been exceeded. + * - The provided method of payment is no longer valid (for example, a credit card has expired). + * See the [Maps FAQ](https://developers.google.com/maps/faq#over-limit-key-error) to learn how to fix this. + */ + 'OVER_DAILY_LIMIT' | + /** indicating the requestor has exceeded quota. */ + 'OVER_QUERY_LIMIT' | + /** indicating the API did not complete the request. */ + 'REQUEST_DENIED' | + /** indicating an unknown error. */ + 'UNKNOWN_ERROR' +); + +export interface ElevationResult { + /** + * A `location` element (containing `lat` and `lng` elements) of the position for which elevation data is being computed. + * Note that for path requests, the set of `location` elements will contain the sampled points along the path. + */ + location: LatLngLiteral; + /** An `elevation` element indicating the elevation of the location in meters. */ + elevation: number; + /** + * A `resolution` value, indicating the maximum distance between data points from which the elevation was interpolated, in meters. + * This property will be missing if the resolution is not known. + * Note that elevation data becomes more coarse (larger `resolution` values) when multiple points are passed. + * To obtain the most accurate elevation value for a point, it should be queried independently. + */ + resolution: number; +} + +export interface ElevationAlongPathRequest { + /** + * defines a path on the earth for which to return elevation data. + * This parameter defines a set of two or more ordered {latitude,longitude} pairs defining a path along the surface of the earth. + */ + path: LatLng[] | string; + /** + * specifies the number of sample points along a path for which to return elevation data. + * The samples parameter divides the given path into an ordered set of equidistant points along the path. + */ + samples: number; +} + +export interface FindPlaceRequest { + /** The text input specifying which place to search for (for example, a name, address, or phone number). */ + input: string; + /** The type of input. This can be one of either `textquery` or `phonenumber`. */ + inputtype: 'textquery' | 'phonenumber'; + /** + * The language code, indicating in which language the results should be returned, if possible. + * Searches are also biased to the selected language; results in the selected language may be given a higher ranking + */ + language?: Language; + /** + * The fields specifying the types of place data to return. + * + * **Note:** If you omit the fields parameter from a Find Place request, only the place_id for the result will be returned. + */ + fields?: Array; + /** + * Prefer results in a specified area, by specifying either a radius plus lat/lng, or two lat/lng pairs representing + * the points of a rectangle. If this parameter is not specified, the API uses IP address biasing by default. + */ + locationbias?: string; +} + +/** A Find Place response contains only the data types that were specified using the fields parameter, plus `html_attributions`. */ +export interface FindPlaceFromTextResponse { + status: SearchResponseStatus; + candidates: Array>; +} + +export interface PlaceSearchResponse { + /** contains metadata on the request. */ + status: SearchResponseStatus; + /** + * When the Google Places service returns a status code other than `OK`, there may be an additional `error_message` field + * within the search response object. This field contains more detailed information about the reasons behind the given status code. + */ + error_message: string; + /** + * contains an array of places, with information about each. + * The Places API returns up to 20 `establishment` results per query. + * Additionally, political results may be returned which serve to identify the area of the request. + */ + results: PlaceSearchResult[]; + /** may contain a set of attributions about this listing which must be displayed to the user (some listings may not have attribution). */ + html_attributions: string[]; + /** + * contains a token that can be used to return up to 20 additional results. + * A `next_page_token` will not be returned if there are no additional results to display. + * The maximum number of results that can be returned is 60. + * There is a short delay between when a `next_page_token` is issued, and when it will become valid. + */ + next_page_token: string; +} + +/** + * The `"status"` field within the search response object contains the status of the request, + * and may contain debugging information to help you track down why the request failed. + */ +export type SearchResponseStatus = ( + /** indicates that no errors occurred; the place was successfully detected and at least one result was returned. */ + 'OK' | + /** + * indicates that the search was successful but returned no results. + * This may occur if the search was passed a latlng in a remote location. + */ + 'ZERO_RESULTS' | + /** indicates that you are over your quota. */ + 'OVER_QUERY_LIMIT' | + /** indicates that your request was denied, generally because of lack of an invalid key parameter. */ + 'REQUEST_DENIED' | + /** generally indicates that a required query parameter (location or radius) is missing. */ + 'INVALID_REQUEST' | + /** indicates a server-side error; trying again may be successful. */ + 'UNKNOWN_ERROR' +); + +/** + * When the Google Places service returns JSON results from a search, it places them within a `results` array. + * Even if the service returns no results (such as if the `location` is remote) it still returns an empty `results` array. + * XML responses consist of zero or more `` elements. + */ +export interface PlaceSearchResult { + /** contains the URL of a recommended icon which may be displayed to the user when indicating this result. */ + icon: string; + /** + * contains geometry information about the result, generally including the `location` (geocode) + * of the place and (optionally) the viewport identifying its general area of coverage + */ + geometry: AddressGeometry; + /** + * is an encoded location reference, derived from latitude and longitude coordinates, that represents an area: + * 1/8000th of a degree by 1/8000th of a degree (about 14m x 14m at the equator) or smaller. + * Plus codes can be used as a replacement for street addresses in places where they do not exist + * (where buildings are not numbered or streets are not named). + * + * The plus code is formatted as a global code and a compound code: + * - `global_code` is a 4 character area code and 6 character or longer local code (849VCWC8+R9). + * - `compound_code` is a 6 character or longer local code with an explicit location (CWC8+R9, Mountain View, CA, USA). + * + * Typically, both the global code and compound code are returned. + * However, if the result is in a remote location (for example, an ocean or desert) only the global code may be returned. + * + * @see [Open Location Code](https://en.wikipedia.org/wiki/Open_Location_Code) + * @see [plus codes](https://plus.codes/) + */ + plus_code: PlusCode; + /** contains the human-readable name for the returned result. For `establishment` results, this is usually the business name. */ + name: string; + /** information on the opening hours. */ + opening_hours: OpeningHours; + /** + * an array of `photo` objects, each containing a reference to an image. + * A Place Search will return at most one `photo` object. + * Performing a Place Details request on the place may return up to ten photos. + * More information about Place Photos and how you can use the images in your application can be found in the + * [Place Photos](https://developers.google.com/places/web-service/photos) documentation. + */ + photos: PlacePhoto[]; + /** + * a textual identifier that uniquely identifies a place. + * To retrieve information about the place, pass this identifier in the `placeId` field of a Places API request + */ + place_id: string; + /** + * Indicates the scope of the `place_id`. + * + * **Note:** The `scope` field is included only in Nearby Search results and Place Details results. + * You can only retrieve app-scoped places via the Nearby Search and the Place Details requests. + * If the `scope` field is not present in a response, it is safe to assume the scope is `GOOGLE`. + */ + scope: PlaceIdScope; + /** + * An array of zero, one or more alternative place IDs for the place, with a scope related to each alternative ID. + * Note: This array may be empty or not present. + */ + alt_ids: AlternativePlaceId[]; + /** + * The price level of the place, on a scale of 0 to 4. + * The exact amount indicated by a specific value will vary from region to region. + * + * Price levels are interpreted as follows: + * - `0`: Free + * - `1`: Inexpensive + * - `2`: Moderate + * - `3`: Expensive + * - `4`: Very Expensive + */ + price_level: number; + /** contains the place's rating, from 1.0 to 5.0, based on aggregated user reviews. */ + rating: number; + /** + * contains an array of feature types describing the given result. + * XML responses include multiple `` elements if more than one type is assigned to the result. + */ + types: Array; + /** + * contains a feature name of a nearby location. Often this feature refers to a street or neighborhood within the given results. + * The `vicinity` property is only returned for a Nearby Search. + */ + vicinity: number; + /** + * is a string containing the human-readable address of this place. Often this address is equivalent to the "postal address". + * The `formatted_address` property is only returned for a Text Search. + */ + formatted_address: string; + /** + * is a boolean flag indicating whether the place has permanently shut down (value `true`). + * If the place is not permanently closed, the flag is absent from the response. + */ + permanently_closed: boolean; +} + +export interface OpeningHours { + /** is a boolean value indicating if the place is open at the current time. */ + open_now: boolean; + /** is an array of opening periods covering seven days, starting from Sunday, in chronological order. */ + periods: OpeningPeriod[]; +} + +export interface OpeningPeriod { + /** contains a pair of day and time objects describing when the place opens. */ + open: OpeningHoursTime; + /** + * may contain a pair of day and time objects describing when the place closes. + * **Note:** If a place is **always open**, the `close` section will be missing from the response. + * Clients can rely on always-open being represented as an `open` period containing `day` with value 0 + * and `time` with value 0000, and no `close`. + */ + close?: OpeningHoursTime; + /** + * is an array of seven strings representing the formatted opening hours for each day of the week. + * If a `language` parameter was specified in the Place Details request, the Places Service will format + * and localize the opening hours appropriately for that language. The ordering of the elements in this array + * depends on the `language` parameter. Some languages start the week on Monday while others start on Sunday. + */ + weekday_text: string[]; +} + +export interface OpeningHoursTime { + /** a number from 0–6, corresponding to the days of the week, starting on Sunday. For example, 2 means Tuesday. */ + day: number; + /** + * may contain a time of day in 24-hour hhmm format. Values are in the range 0000–2359. The `time` + * will be reported in the place's time zone. + */ + time?: string; +} + +/** + * All requests to the Place Photo service must include a `photoreference`, returned in the response to a Nearby Search, + * Text Search, or Place Details request. The response to these requests will contain a photos[] field if the place has related + * photographic content. + * + * **Note:** The number of photos returned varies by request. + * - A Nearby Search or a Text Search will return at most one photo element in the array. + * - Radar Searches do not return any photo information. + * - A Details request will return up to ten photo elements. + */ +export interface PlacePhoto { + /** a string used to identify the photo when you perform a Photo request. */ + photo_reference: string; + /** the maximum height of the image. */ + height: number; + /** the maximum width of the image. */ + width: number; + /** contains any required attributions. This field will always be present, but may be empty. */ + html_attributions: string[]; +} + +export type PlaceIdScope = ( + /** + * The place ID is recognised by your application only. + * This is because your application added the place, and the place has not yet passed the moderation process. + */ + 'APP' | + /** The place ID is available to other applications and on Google Maps. */ + 'GOOGLE' +); + +export interface AlternativePlaceId { + /** + * The most likely reason for a place to have an alternative place ID is if your application adds a place and receives + * an application-scoped place ID, then later receives a Google-scoped place ID after passing the moderation process. + */ + place_id: string; + /** + * The scope of an alternative place ID will always be `APP`, + * indicating that the alternative place ID is recognised by your application only. + */ + scope: 'APP'; +} + +/** + * Table 1: Types supported in place search and addition + * + * You can use the following values in the types filter for place searches and when adding a place. + * + * @see https://developers.google.com/places/web-service/supported_types#table1 + */ +export type PlaceType1 = ( + 'accounting' | + 'airport' | + 'amusement_park' | + 'aquarium' | + 'art_gallery' | + 'atm' | + 'bakery' | + 'bank' | + 'bar' | + 'beauty_salon' | + 'bicycle_store' | + 'book_store' | + 'bowling_alley' | + 'bus_station' | + 'cafe' | + 'campground' | + 'car_dealer' | + 'car_rental' | + 'car_repair' | + 'car_wash' | + 'casino' | + 'cemetery' | + 'church' | + 'city_hall' | + 'clothing_store' | + 'convenience_store' | + 'courthouse' | + 'dentist' | + 'department_store' | + 'doctor' | + 'electrician' | + 'electronics_store' | + 'embassy' | + 'fire_station' | + 'florist' | + 'funeral_home' | + 'furniture_store' | + 'gas_station' | + 'gym' | + 'hair_care' | + 'hardware_store' | + 'hindu_temple' | + 'home_goods_store' | + 'hospital' | + 'insurance_agency' | + 'jewelry_store' | + 'laundry' | + 'lawyer' | + 'library' | + 'liquor_store' | + 'local_government_office' | + 'locksmith' | + 'lodging' | + 'meal_delivery' | + 'meal_takeaway' | + 'mosque' | + 'movie_rental' | + 'movie_theater' | + 'moving_company' | + 'museum' | + 'night_club' | + 'painter' | + 'park' | + 'parking' | + 'pet_store' | + 'pharmacy' | + 'physiotherapist' | + 'plumber' | + 'police' | + 'post_office' | + 'real_estate_agency' | + 'restaurant' | + 'roofing_contractor' | + 'rv_park' | + 'school' | + 'shoe_store' | + 'shopping_mall' | + 'spa' | + 'stadium' | + 'storage' | + 'store' | + 'subway_station' | + 'supermarket' | + 'synagogue' | + 'taxi_stand' | + 'train_station' | + 'transit_station' | + 'travel_agency' | + 'veterinary_care' | + 'zoo' +); + +/** + * Table 2: Additional types returned by the Places service + * + * The following types may be returned in the results of a place search, in addition to the types in table 1 above. + * For more details on these types, refer to [Address Types](https://developers.google.com/maps/documentation/geocoding/intro#Types) + * in Geocoding Responses. + * + * @see https://developers.google.com/places/web-service/supported_types#table2 + */ +export type PlaceType2 = ( + 'administrative_area_level_1' | + 'administrative_area_level_2' | + 'administrative_area_level_3' | + 'administrative_area_level_4' | + 'administrative_area_level_5' | + 'colloquial_area' | + 'country' | + 'establishment' | + 'finance' | + 'floor' | + 'food' | + 'general_contractor' | + 'geocode' | + 'health' | + 'intersection' | + 'locality' | + 'natural_feature' | + 'neighborhood' | + 'place_of_worship' | + 'political' | + 'point_of_interest' | + 'post_box' | + 'postal_code' | + 'postal_code_prefix' | + 'postal_code_suffix' | + 'postal_town' | + 'premise' | + 'room' | + 'route' | + 'street_address' | + 'street_number' | + 'sublocality' | + 'sublocality_level_4' | + 'sublocality_level_5' | + 'sublocality_level_3' | + 'sublocality_level_2' | + 'sublocality_level_1' | + 'subpremise' +); + +export interface GeocodingRequest { + /** + * The street address that you want to geocode, in the format used by the national postal service of the country concerned. + * Additional address elements such as business names and unit, suite or floor numbers should be avoided. + */ + address?: string; + /** + * The bounding box of the viewport within which to bias geocode results more prominently. + * This parameter will only influence, not fully restrict, results from the geocoder. + */ + bounds?: LatLngBounds; + /** + * The language in which to return results. + * - If `language` is not supplied, the geocoder attempts to use the preferred language as specified in the `Accept-Language` header, + * or the native language of the domain from which the request is sent. + * - The geocoder does its best to provide a street address that is readable for both the user and locals. + * To achieve that goal, it returns street addresses in the local language, transliterated to a script readable + * by the user if necessary, observing the preferred language. All other addresses are returned in the preferred language. + * Address components are all returned in the same language, which is chosen from the first component. + * - If a name is not available in the preferred language, the geocoder uses the closest match. + * - The preferred language has a small influence on the set of results that the API chooses to return, + * and the order in which they are returned. The geocoder interprets abbreviations differently depending on language, + * such as the abbreviations for street types, or synonyms that may be valid in one language but not in another. + * For example, utca and tér are synonyms for street in Hungarian. + */ + language?: string; + /** + * The region code, specified as a ccTLD ("top-level domain") two-character value. + * This parameter will only influence, not fully restrict, results from the geocoder. + */ + region?: string; + /** + * A components filter with elements separated by a pipe (`|`). + * The components filter is *required* if the request doesn't include an `address`. + * Each element in the components filter consists of a `component:value` pair, and fully restricts the results from the geocoder. + */ + components?: GeocodingComponents; +} + +/** + * Notes about component filtering: + * + * - If the request contains multiple component filters, the API evaluates them as an AND, not an OR. + * For example, if the request includes multiple countries `components=country:GB|country:AU`, + * the API looks for locations where country=GB AND country=AU, and returns `ZERO_RESULTS`. + * - Results are consistent with Google Maps, which occasionally yields unexpected `ZERO_RESULTS` responses. + * Using Place Autocomplete may provide better results in some use cases. + * To learn more, see [this FAQ](https://developers.google.com/maps/documentation/geocoding/faq#trbl_component_filtering). + * - For each address component, either specify it in the `address` parameter or in a `components` filter, but not both. + * Specifying the same values in both may result in `ZERO_RESULTS`. + * + * A geocode for "High St, Hastings" with `components=country:GB` returns a result in Hastings, England rather than in Hastings-On-Hudson, USA + */ +export interface GeocodingComponents { + /** matches `postal_code` and `postal_code_prefix`. */ + postalCode?: string; + /** + * matches a country name or a two letter [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code. + * **Note:** The API follows the ISO standard for defining countries, and the filtering works best when using + * the corresponding ISO code of the country + */ + country?: string | string[]; + /** matches the long or short name of a route. */ + route?: string; + /** matches against `locality` and `sublocality` types. */ + locality?: string; + /** matches all the administrative_area levels. */ + administrativeArea?: string; +} + +export interface GeocodingResponse { + /** contains metadata on the request. */ + status: STATUSES; + /** + * When the geocoder returns a status code other than `OK`, there may be an additional `error_message` field + * within the Geocoding response object. This field contains more detailed information about the reasons behind the given status code. + */ + error_meesage: string; + /** + * contains an array of geocoded address information and geometry information. + * + * Generally, only one entry in the `"results"` array is returned for address lookups,though the geocoder may return several results + * when address queries are ambiguous. + */ + results: GeocodingResult[]; +} + +/** + * The `"status" `field within the Geocoding response object contains the status of the request, + * and may contain debugging information to help you track down why geocoding is not working. + */ +export type GeocodingResponseStatus = ( + /** indicates that no errors occurred; the address was successfully parsed and at least one geocode was returned. */ + 'OK' | + /** + * indicates that the geocode was successful but returned no results. + * This may occur if the geocoder was passed a non-existent `address`. + */ + 'ZERO_RESULTS' | + /** + * indicates any of the following: + * - The API key is missing or invalid. + * - Billing has not been enabled on your account. + * - A self-imposed usage cap has been exceeded. + * - The provided method of payment is no longer valid (for example, a credit card has expired). + * See the [Maps FAQ](https://developers.google.com/maps/faq#over-limit-key-error) to learn how to fix this. + */ + 'OVER_DAILY_LIMIT' | + /** indicates that you are over your quota. */ + 'OVER_QUERY_LIMIT' | + /** indicates that your request was denied. */ + 'REQUEST_DENIED' | + /** generally indicates that the query (`address`, `components` or `latlng`) is missing. */ + 'INVALID_REQUEST' | + /** indicates that the request could not be processed due to a server error. The request may succeed if you try again. */ + 'UNKNOWN_ERROR' +); + +/** + * When the geocoder returns results, it places them within a (JSON) `results` array. + * Even if the geocoder returns no results (such as if the address doesn't exist) it still returns an empty `results` array. + * (XML responses consist of zero or more `` elements.) + */ +export interface GeocodingResult { + /** + * array indicates the type of the returned result. + * This array contains a set of zero or more tags identifying the type of feature returned in the result. + * For example, a geocode of "Chicago" returns "locality" which indicates that "Chicago" is a city, + * and also returns "political" which indicates it is a political entity. + */ + types: AddressType[]; + /** + * is a string containing the human-readable address of this location. + * + * Often this address is equivalent to the postal address. Note that some countries, such as the United Kingdom, + * do not allow distribution of true postal addresses due to licensing restrictions. + * + * The formatted address is logically composed of one or more address components. + * For example, the address "111 8th Avenue, New York, NY" consists of the following components: "111" (the street number), + * "8th Avenue" (the route), "New York" (the city) and "NY" (the US state). + * + * Do not parse the formatted address programmatically. Instead you should use the individual address components, + * which the API response includes in addition to the formatted address field. + */ + formatted_address: string; + /** + * is an array containing the separate components applicable to this address. + * + * Note the following facts about the `address_components[]` array: + * - The array of address components may contain more components than the `formatted_address`. + * - The array does not necessarily include all the political entities that contain an address, + * apart from those included in the `formatted_address`. To retrieve all the political entities that contain a specific address, + * you should use reverse geocoding, passing the latitude/longitude of the address as a parameter to the request. + * - The format of the response is not guaranteed to remain the same between requests. + * In particular, the number of `address_components` varies based on the address requested and can change + * over time for the same address. A component can change position in the array. + * The type of the component can change. A particular component may be missing in a later response. + */ + address_components: AddressComponent[]; + /** + * is an array denoting all the localities contained in a postal code. + * This is only present when the result is a postal code that contains multiple localities. + */ + postcode_localities: string[]; + /** address geometry. */ + geometry: AddressGeometry; + /** + * is an encoded location reference, derived from latitude and longitude coordinates, + * that represents an area: 1/8000th of a degree by 1/8000th of a degree (about 14m x 14m at the equator) or smaller. + * Plus codes can be used as a replacement for street addresses in places where they do not exist + * (where buildings are not numbered or streets are not named). + * + * The plus code is formatted as a global code and a compound code: + * - `global_code` is a 4 character area code and 6 character or longer local code (849VCWC8+R9). + * - `compound_code` is a 6 character or longer local code with an explicit location (CWC8+R9, Mountain View, CA, USA). + * Typically, both the global code and compound code are returned. However, if the result is in a remote location + * (for example, an ocean or desert) only the global code may be returned. + * + * @see [Open Location Code](https://en.wikipedia.org/wiki/Open_Location_Code) + * @see [plus codes](https://plus.codes/) + */ + plus_code: PlusCode; + /** + * indicates that the geocoder did not return an exact match for the original request, + * though it was able to match part of the requested address. + * You may wish to examine the original request for misspellings and/or an incomplete address. + * + * Partial matches most often occur for street addresses that do not exist within the locality you pass in the request. + * Partial matches may also be returned when a request matches two or more locations in the same locality. + * For example, "21 Henr St, Bristol, UK" will return a partial match for both Henry Street and Henrietta Street. + * Note that if a request includes a misspelled address component, the geocoding service may suggest an alternative address. + * Suggestions triggered in this way will also be marked as a partial match. + */ + partial_match: boolean; + /** is a unique identifier that can be used with other Google APIs. */ + place_id: string; +} + +export type GeocodingAddressComponentType = ( + /** indicates the floor of a building address. */ + 'floor' | + /** typically indicates a place that has not yet been categorized. */ + 'establishment' | + /** indicates a named point of interest. */ + 'point_of_interest' | + /** indicates a parking lot or parking structure. */ + 'parking' | + /** indicates a specific postal box. */ + 'post_box' | + /** indicates a grouping of geographic areas, such as locality and sublocality, used for mailing addresses in some countries. */ + 'postal_town' | + /** indicates the room of a building address. */ + 'room' | + /** indicates the precise street number. */ + 'street_number' | + /** indicate the location of a bus. */ + 'bus_station' | + /** indicate the location of a train. */ + 'train_station' | + /** indicate the location of a public transit stop. */ + 'transit_station' +); + +export interface AddressComponent { + /** is an array indicating the *type* of the address component. */ + types: Array; + /** is the full text description or name of the address component as returned by the Geocoder. */ + long_name: string; + /** + * is an abbreviated textual name for the address component, if available. + * For example, an address component for the state of Alaska may have a `long_name` of "Alaska" and a `short_name` of "AK" + * using the 2-letter postal abbreviation. + */ + short_name: string; +} + +export interface AddressGeometry { + /** contains the geocoded latitude, longitude value. For normal address lookups, this field is typically the most important. */ + location: LatLngLiteral; + /** stores additional data about the specified location. */ + location_type: LocationType; + /** + * contains the recommended viewport for displaying the returned result, specified as two latitude, longitude values + * defining the `southwest` and `northeast` corner of the viewport bounding box. + * Generally the viewport is used to frame a result when displaying it to a user. + */ + viewport: LatLngBounds; + /** + * (optionally returned) stores the bounding box which can fully contain the returned result. + * Note that these bounds may not match the recommended viewport. + * (For example, San Francisco includes the [Farallon islands](https://en.wikipedia.org/wiki/Farallon_Islands), + * which are technically part of the city, but probably should not be returned in the viewport.) + */ + bounds: LatLngBounds; +} + +export type LocationType = ( + /** + * indicates that the returned result is a precise geocode for which we have location information + * accurate down to street address precision + */ + 'ROOFTOP' | + /** + * indicates that the returned result reflects an approximation (usually on a road) interpolated between two precise points + * (such as intersections). Interpolated results are generally returned when rooftop geocodes are unavailable for a street address. + */ + 'RANGE_INTERPOLATED' | + /** + * indicates that the returned result is the geometric center of a result such as a polyline + * (for example, a street) or polygon (region). + */ + 'GEOMETRIC_CENTER' | + /** indicates that the returned result is approximate. */ + 'APPROXIMATE' +); + +export interface PlusCode { + /** is a 4 character area code and 6 character or longer local code (849VCWC8+R9). */ + global_code: string; + /** is a 6 character or longer local code with an explicit location (CWC8+R9, Mountain View, CA, USA). */ + compound_code: string; +} + +export interface GeolocationRequest { + /** The mobile country code (MCC) for the device's home network. */ + homeMobileCountryCode?: number; + /** The mobile network code (MNC) for the device's home network. */ + homeMobileNetworkCode?: number; + /** The mobile radio type. While this field is optional, it should be included if a value is available, for more accurate results. */ + radioType?: RadioType; + /** The carrier name. */ + carrier?: string; + /** + * Specifies whether to fall back to IP geolocation if wifi and cell tower signals are not available. + * Defaults to `true`. Set `considerIp` to `false` to disable fall back. + */ + considerIp?: boolean; + /** An array of cell tower objects. */ + cellTowers?: CellTower[]; + /** An array of WiFi access point objects. */ + wifiAccessPoints?: WifiAccessPoint[]; +} + +export type RadioType = ( + 'lte' | + 'gsm' | + 'cdma' | + 'wcdma' +); + +export interface CellTower { + /** + * Unique identifier of the cell. + * On GSM, this is the Cell ID (CID); + * CDMA networks use the Base Station ID (BID). + * WCDMA networks use the UTRAN/GERAN Cell Identity (UC-Id), which is a 32-bit value concatenating the Radio Network Controller (RNC) + * and Cell ID. Specifying only the 16-bit Cell ID value in WCDMA networks may return inaccurate results. + */ + cellId: number; + /** The Location Area Code (LAC) for GSM and WCDMA networks. The Network ID (NID) for CDMA networks. */ + locationAreaCode: number; + /** The cell tower's Mobile Country Code (MCC). */ + mobileCountryCode: number; + /** The cell tower's Mobile Network Code. This is the MNC for GSM and WCDMA; CDMA uses the System ID (SID). */ + mobileNetworkCode: number; + /** The number of milliseconds since this cell was primary. If age is 0, the `cellId` represents a current measurement. */ + age?: number; + /** Radio signal strength measured in dBm. */ + signalStrength?: number; + /** The [timing advance](https://en.wikipedia.org/wiki/Timing_advance) value. */ + timingAdvance?: number; +} + +export interface WifiAccessPoint { + /** The MAC address of the WiFi node. It's typically called a BSS, BSSID or MAC address. Separators must be `:` (colon). */ + macAddress: string; + /** The current signal strength measured in dBm. */ + signalStrength?: number; + /** The number of milliseconds since this access point was detected. */ + age?: number; + /** The channel over which the client is communicating with the acces. */ + channel?: number; + /** The current signal to noise ratio measured in dB. */ + signalToNoiseRatio?: number; +} + +export interface GeolocationResponse { + /** The user's estimated latitude and longitude, in degrees. Contains one `lat` and one `lng` subfield. */ + location: LatLngLiteral; + /** The accuracy of the estimated location, in meters. This represents the radius of a circle around the given location. */ + accuracy: number; +} + +/** + * In the case of an error, a standard format error response body will be returned + * and the HTTP status code will be set to an error status. + */ +export interface GeolocationError { + error: { + /** This is the same as the HTTP status of the response. */ + code: number; + /** A short description of the error. */ + message: string; + /** + * A list of errors which occurred. Each error contains an identifier for the type of error (the `reason`) + * and a short description (the `message`). + */ + errors: Array<{ + domain: string; + reason: GeolocationErrorReason; + message: string; + }>; + }; +} + +export type GeolocationErrorReason = ( + /** + * You have exceeded your daily limit. + * Domain: usageLimits + * Code: 403 + */ + 'dailyLimitExceeded' | + /** + * Your API key is not valid for the Geolocation API. Please ensure that you've included the entire key, + * and that you've either purchased the API or have enabled billing and activated the API to obtain the free quota. + * Domain: usageLimits + * Code: 400 + */ + 'keyInvalid' | + /** + * You have exceeded the requests per second per user limit that you configured in the Google Cloud Platform Console. + * This limit should be configured to prevent a single or small group of users from exhausting your daily quota, + * while still allowing reasonable access to all users. + * Domain: usageLimits + * Code: 403 + */ + 'userRateLimitExceeded' | + /** + * The request was valid, but no results were returned. + * Domain: geolocation + * Code: 404 + */ + 'notFound' | + /** + * The request body is not valid JSON. Refer to the Request Body section for details on each field. + * Domain: global + * Code: 400 + */ + 'parseError' +); + +export interface NearestRoadsRequest { + /** + * A list of latitude/longitude pairs. Latitude and longitude values should be separated by commas. + * Coordinates should be separated by the pipe character: "|". + * For example: `points=60.170880,24.942795|60.170879,24.942796|60.170877,24.942796`. + */ + points: LatLng[]; +} + +export interface NearestRoadsResponse { + /** An array of snapped points. */ + snappedPoints: Array<{ + /** Contains a `latitude` and `longitude` value. */ + location: LatLngLiteralVerbose; + /** + * An integer that indicates the corresponding value in the original request. + * Each point in the request maps to at most two segmentsin the response: + * - If there are no nearby roads, no segment is returned. + * - If the nearest road is one-way, one segment is returned. + * - If the nearest road is bidirectional, two segments are returned. + */ + originalIndex: number; + /** + * A unique identifier for a place. All place IDs returned by the Roads API correspond to road segments. + * Place IDs can be used with other Google APIs, including the Places SDK and the Maps JavaScript API. + * For example, if you need to get road names for the snapped points returned by the Roads API, + * you can pass the `placeId` to the Places SDK or the Geocoding API. Within the Roads API, + * you can pass the `placeId` in a speed limits request to determine the speed limit along that road segment. + */ + placeId: string; + }>; +} + +export interface PlaceDetailsRequest { + /** A textual identifier that uniquely identifies a place, returned from a Place Search. */ + placeid: string; + /** + * The language code, indicating in which language the results should be returned, if possible. + * Note that some fields may not be available in the requested language. + * Note that we often update supported languages so this list may not be exhaustive. + */ + language?: Language; + /** + * The region code, specified as a ccTLD (country code top-level domain) two-character value. + * Most ccTLD codes are identical to ISO 3166-1 codes, with some exceptions. + * This parameter will only influence, not fully restrict, results. + * If more relevant results exist outside of the specified region, they may be included. + * When this parameter is used, the country name is omitted from the resulting `formatted_address` + * for results in the specified region. + */ + region?: string; + /** + * A random string which identifies an autocomplete session for billing purposes. + * Use this for Place Details requests that are called following an autocomplete request in the same user session + */ + sessiontoken?: string; + /** + * One or more fields, specifying the types of place data to return, separated by a comma. + * + * **Warning: If you do not specify at least one field with a request, or if you omit the **fields** + * parameter from a request, ALL possible fields will be returned, and you will be billed accordingly. + * This applies only to Place Details requests. + */ + fields?: Array; +} + +export interface PlaceDetailsResponse { + /** contains metadata on the request. */ + status: PlaceDetailsResponseStatus; + /** + * When the Google Places service returns a status code other than `OK`, there may be an additional `error_message` field + * within the details response object. This field contains more detailed information about the reasons behind the given status code. + */ + /** contains the detailed information about the place requested. */ + result: PlaceDetailsResult; + /** contains a set of attributions about this listing which must be displayed to the user. */ + html_attributions: string[]; +} + +/** + * The `"status"` field within the place response object contains the status of the request, + * and may contain debugging information to help you track down why the place request failed + */ +export type PlaceDetailsResponseStatus = ( + /** indicates that no errors occurred; the place was successfully detected and at least one result was returned. */ + 'OK' | + /** indicates a server-side error; trying again may be successful. */ + 'UNKNOWN_ERROR' | + /** + * indicates that the referenced location (placeid) was valid but no longer refers to a valid result. + * This may occur if the establishment is no longer in business. + */ + 'ZERO_RESULTS' | + /** + * indicates any of the following: + * - You have exceeded the QPS limits. + * - The request is missing an API key. + * - Billing has not been enabled on your account. + * - The monthly $200 credit, or a self-imposed usage cap, has been exceeded. + * - The provided method of payment is no longer valid (for example, a credit card has expired). + * See the [Maps FAQ](https://developers.google.com/maps/faq#over-limit-key-error) for more information + * about how to resolve this error. + */ + 'OVER_QUERY_LIMIT' | + /** indicates that your request was denied, generally because an invalid key parameter. */ + 'REQUEST_DENIED' | + /** generally indicates that the query (placeid) is missing. */ + 'INVALID_REQUEST' | + /** indicates that the referenced location (placeid) was not found in the Places database. */ + 'NOT_FOUND' +); + +/** When the Places service returns results from a details request, it places them within a single `result`. */ +export interface PlaceDetailsResult { + /** + * is an array containing the separate components applicable to this address. + * + * Note the following facts about the `address_components[]` array: + * - The array of address components may contain more components than the `formatted_address`. + * - The array does not necessarily include all the political entities that contain an address, + * apart from those included in the `formatted_address`. To retrieve all the political entities + * that contain a specific address, you should use reverse geocoding, passing the latitude/longitude + * of the address as a parameter to the request. + * - The format of the response is not guaranteed to remain the same between requests. + * In particular, the number of `address_components` varies based on the address requested + * and can change over time for the same address. A component can change position in the array. + * The type of the component can change. A particular component may be missing in a later response. + */ + address_components: AddressComponent[]; + /** + * is a string containing the human-readable address of this place. + * + * Often this address is equivalent to the postal address. Note that some countries, such as the United Kingdom, + * do not allow distribution of true postal addresses due to licensing restrictions. + * + * The formatted address is logically composed of one or more address components. + * For example, the address "111 8th Avenue, New York, NY" consists of the following components: "111" + * (the street number), "8th Avenue" (the route), "New York" (the city) and "NY" (the US state). + * + * Do not parse the formatted address programmatically. Instead you should use the individual address components, + * which the API response includes in addition to the formatted address field. + */ + formatted_address: string; + /** + * contains the place's phone number in its local format. + * For example, the `formatted_phone_number` for Google's Sydney, Australia office is `(02) 9374 4000`. + */ + formatted_phone_number: string; + /** is a representation of the place's address in the [adr microformat](http://microformats.org/wiki/adr). */ + adr_address: string; + /** + * contains the following information: + * - `location`: contains the geocoded latitude,longitude value for this place. + * - `viewport`: contains the preferred viewport when displaying this place on a map as a `LatLngBounds` if it is known. + */ + geometry: AddressGeometry; + /** + * is an encoded location reference, derived from latitude and longitude coordinates, that represents an area: + * 1/8000th of a degree by 1/8000th of a degree (about 14m x 14m at the equator) or smaller. + * Plus codes can be used as a replacement for street addresses in places where they do not exist + * (where buildings are not numbered or streets are not named). + * + * The plus code is formatted as a global code and a compound code: + * - `global_code` is a 4 character area code and 6 character or longer local code (849VCWC8+R9). + * - `compound_code` is a 6 character or longer local code with an explicit location (CWC8+R9, Mountain View, CA, USA). + * + * Typically, both the global code and compound code are returned. + * However, if the result is in a remote location (for example, an ocean or desert) only the global code may be returned. + * + * @see [Open Location Code](https://en.wikipedia.org/wiki/Open_Location_Code) + * @see [plus codes](https://plus.codes/) + */ + plus_code: PlusCode; + /** contains the URL of a suggested icon which may be displayed to the user when indicating this result on a map. */ + icon: string; + /** + * contains the place's phone number in international format. + * International format includes the country code, and is prefixed with the plus (+) sign. + * For example, the `international_phone_number` for Google's Sydney, Australia office is `+61 2 9374 4000`. + */ + international_phone_number: string; + /** + * contains the human-readable name for the returned result. + * For establishment results, this is usually the canonicalized business name. + */ + name: string; + /** place opening hours. */ + opening_hours: OpeningHours; + /** + * is a boolean flag indicating whether the place has permanently shut down (value `true`). + * If the place is not permanently closed, the flag is absent from the response. + */ + permanently_closed: boolean; + /** + * an array of photo objects, each containing a reference to an image. + * A Place Details request may return up to ten photos. + * More information about place photos and how you can use the images in your application can be found in the Place Photos documentation. + */ + photos: PlacePhoto[]; + /** + * A textual identifier that uniquely identifies a place. + * To retrieve information about the place, pass this identifier in the `placeId` field of a Places API request. + */ + place_id: string; + /** Indicates the scope of the `place_id`. */ + scope: PlaceIdScope; + /** + * An array of zero, one or more alternative place IDs for the place, with a scope related to each alternative ID. + * Note: This array may be empty or not present. + */ + alt_ids: AlternativePlaceId[]; + /** + * The price level of the place, on a scale of 0 to 4. + * The exact amount indicated by a specific value will vary from region to region. + * + * Price levels are interpreted as follows: + * - `0`: Free + * - `1`: Inexpensive + * - `2`: Moderate + * - `3`: Expensive + * - `4`: Very Expensive + */ + price_level: number; + /** contains the place's rating, from 1.0 to 5.0, based on aggregated user reviews. */ + rating: number; + /** + * a JSON array of up to five reviews. If a `language` parameter was specified in the Place Details request, + * the Places Service will bias the results to prefer reviews written in that language. + */ + reviews: PlaceReview[]; + /** + * contains an array of feature types describing the given result. + * XML responses include multiple `` elements if more than one type is assigned to the result. + */ + types: AddressType[]; + /** + * contains the URL of the official Google page for this place. + * This will be the Google-owned page that contains the best available information about the place. + * Applications must link to or embed this page on any screen that shows detailed results about the place to the user. + */ + url: string; + /** + * contains the number of minutes this place’s current timezone is offset from UTC. + * For example, for places in Sydney, Australia during daylight saving time this would be 660 (+11 hours from UTC), + * and for places in California outside of daylight saving time this would be -480 (-8 hours from UTC). + */ + utc_offset: number; + /** + * lists a simplified address for the place, including the street name, street number, and locality, + * but not the province/state, postal code, or country. For example, Google's Sydney, Australia office + * has a `vicinity` value of `48 Pirrama Road, Pyrmont`. + */ + vicinity: number; + /** lists the authoritative website for this place, such as a business' homepage. */ + website: string; +} + +export interface PlaceReview { + /** + * contains a collection of `AspectRating` objects, each of which provides a rating of a single attribute of the establishment. + * The first object in the collection is considered the primary aspect. + */ + aspects: AspectRating[]; + /** the name of the user who submitted the review. Anonymous reviews are attributed to "A Google user". */ + author_name: string; + /** the URL to the user's Google Maps Local Guides profile, if available. */ + author_url?: string; + /** + * an IETF language code indicating the language used in the user's review. + * This field contains the main language tag only, and not the secondary tag indicating country or region. + * For example, all the English reviews are tagged as 'en', and not 'en-AU' or 'en-UK' and so on. + */ + language: string; + /** the user's overall rating for this place. This is a whole number, ranging from 1 to 5. */ + rating: number; + /** + * the user's review. When reviewing a location with Google Places, text reviews are considered optional. + * Therefore, this field may by empty. Note that this field may include simple HTML markup. + * For example, the entity reference `&` may represent an ampersand character. + */ + text: string; + /** the time that the review was submitted, measured in the number of seconds since since midnight, January 1, 1970 UTC. */ + time: string; +} + +export interface AspectRating { + /** the name of the aspect that is being rated. */ + type: AspectRatingType; + /** the user's rating for this particular aspect, from 0 to 3. */ + rating: number; +} + +export type AspectRatingType = ( + 'appeal' | + 'atmosphere' | + 'decor' | + 'facilities' | + 'food' | + 'overall' | + 'quality' | + 'service' +); + +export interface PlacesRequest { + /** + * The text string on which to search, for example: "restaurant" or "123 Main Street". + * The Google Places service will return candidate matches based on this string and order the results + * based on their perceived relevance. This parameter becomes optional if the `type` parameter + * is also used in the search request. + */ + query: string; + /** + * The region code, specified as a ccTLD (country code top-level domain) two-character value. + * Most ccTLD codes are identical to ISO 3166-1 codes, with some exceptions. + * This parameter will only influence, not fully restrict, search results. + * If more relevant results exist outside of the specified region, they may be included. + * When this parameter is used, the country name is omitted from the resulting `formatted_address` + * for results in the specified region. + */ + region?: string; + /** + * The latitude/longitude around which to retrieve place information. + * This must be specified as latitude,longitude. If you specify a location parameter, + * you must also specify a radius parameter. + */ + location?: LatLng; + /** + * Defines the distance (in meters) within which to bias place results. + * The maximum allowed radius is 50 000 meters. + * Results inside of this region will be ranked higher than results outside of the search circle; + * however, prominent results from outside of the search radius may be included. + */ + radius?: number; + /** + * The language code, indicating in which language the results should be returned, if possible. + * Note that we often update supported languages so this list may not be exhaustive + */ + language?: Language; + /** + * Restricts results to only those places within the specified price level. + * Valid values are in the range from 0 (most affordable) to 4 (most expensive), inclusive. + * The exact amount indicated by a specific value will vary from region to region. + */ + minprice?: number; + /** + * Restricts results to only those places within the specified price level. + * Valid values are in the range from 0 (most affordable) to 4 (most expensive), inclusive. + * The exact amount indicated by a specific value will vary from region to region. + */ + maxprice?: number; + /** + * Returns only those places that are open for business at the time the query is sent. + * Places that do not specify opening hours in the Google Places database will not be returned + * if you include this parameter in your query. + */ + opennow?: boolean; + /** + * Returns the next 20 results from a previously run search. + * Setting a `pagetoken` parameter will execute a search with the same parameters used previously — + * all parameters other than `pagetoken` will be ignored. + */ + pagetoken?: string; + /** + * Restricts the results to places matching the specified type. + * Only one type may be specified (if more than one type is provided, all types following the first entry are ignored). + */ + type?: PlaceType1; +} + +/** + * The Place Autocomplete service can match on full words as well as substrings. + * Applications can therefore send queries as the user types, to provide on-the-fly place predictions. + * + * The returned predictions are designed to be presented to the user to aid them in selecting the desired place. + * You can send a [Place Details request](https://developers.google.com/places/web-service/details#PlaceDetailsRequests) + * for more information about any of the places which are returned. + */ +export interface PlaceAutocompleteRequest { + /** + * The text string on which to search. The Place Autocomplete service will return candidate matches + * based on this string and order results based on their perceived relevance. + */ + input: string; + /** + * A random string which identifies an autocomplete + * [session](https://developers.google.com/places/web-service/autocomplete#session_tokens) for billing purposes. + * If this parameter is omitted from an autocomplete request, the request is billed independently + */ + sessiontoken: string; + /** + * The position, in the input term, of the last character that the service uses to match predictions. + * For example, if the input is 'Google' and the `offset` is 3, the service will match on 'Goo'. + * The string determined by the `offset` is matched against the first word in the input term only. + * For example, if the input term is 'Google abc' and the offset is 3, the service will attempt to match against 'Goo abc'. + * If no `offset` is supplied, the service will use the whole term. + * The `offset` should generally be set to the position of the text caret. + */ + offset?: number; + /** The point around which you wish to retrieve place information. */ + location?: LatLng; + /** + * The distance (in meters) within which to return place results. Note that setting a radius biases results to the indicated area, + * but may not fully restrict results to the specified area. + */ + radius?: number; + /** + * The language code, indicating in which language the results should be returned, if possible. + * Searches are also biased to the selected language; results in the selected language may be given a higher ranking. + * See the list of supported languages and their codes. + * Note that we often update supported languages so this list may not be exhaustive. + * If language is not supplied, the Place Autocomplete service will attempt to use the native language + * of the domain from which the request is sent. + */ + language?: string; + /** The types of place results to return. */ + types?: PlaceAutocompleteType; + /** + * A grouping of places to which you would like to restrict your results. + * Currently, you can use `components` to filter by up to 5 countries. + * Countries must be passed as a two character, ISO 3166-1 Alpha-2 compatible country code. + * For example: `components=country:fr` would restrict your results to places within France. + * Multiple countries must be passed as multiple `country:XX` filters, with the pipe character (`|`) as a separator. + * For example: `components=country:us|country:pr|country:vi|country:gu|country:mp` would restrict your results + * to places within the United States and its unincorporated organized territories. + */ + components?: string[]; + /** + * Returns only those places that are strictly within the region defined by `location` and `radius`. + * This is a restriction, rather than a bias, meaning that results outside this region + * will not be returned even if they match the user input. + */ + strictbounds?: boolean; +} + +/** + * You may restrict results from a Place Autocomplete request to be of a certain type by passing a types parameter. + * The parameter specifies a type or a type collection, as listed in the supported types below. + * If nothing is specified, all types are returned. In general only a single type is allowed. + * The exception is that you can safely mix the geocode and establishment types, + * but note that this will have the same effect as specifying no types. + */ +export type PlaceAutocompleteType = ( + /** + * instructs the Place Autocomplete service to return only geocoding results, rather than business results. + * Generally, you use this request to disambiguate results where the location specified may be indeterminate. + */ + 'geocode' | + /** + * instructs the Place Autocomplete service to return only geocoding results with a precise address. + * Generally, you use this request when you know the user will be looking for a fully specified address. + */ + 'address' | + /** instructs the Place Autocomplete service to return only business results. */ + 'establishment' | + /** + * the `(regions)` type collection instructs the Places service to return any result matching the following types: + * - `locality` + * - `sublocality` + * - `postal_code` + * - `country` + * - `administrative_area_level_1` + * - `administrative_area_level_2` + */ + '(regions)' | + /** the (cities) type collection instructs the Places service to return results that match `locality` or `administrative_area_level_3`. */ + '(cities)' +); + +export interface PlaceAutocompleteResponse { + /** contains metadata on the request. */ + status: PlaceAutocompleteResponseStatus; + /** + * When the Places service returns a status code other than `OK`, there may be an additional `error_message` field + * within the response object. This field contains more detailed information about the reasons behind the given status code. + */ + error_message: string; + /** + * contains an array of places, with information about the place. + * See [Place Autocomplete Results](https://developers.google.com/places/web-service/autocomplete#place_autocomplete_results) + * for information about these results. The Places API returns up to 5 results. + */ + predictions: PlaceAutocompleteResult[]; +} + +/** + * The `status` field within the Place Autocomplete response object contains the status of the request, + * and may contain debugging information to help you track down why the Place Autocomplete request failed. + */ +export type PlaceAutocompleteResponseStatus = ( + /** indicates that no errors occurred and at least one result was returned. */ + 'OK' | + /** + * indicates that the search was successful but returned no results. + * This may occur if the search was passed a bounds in a remote location. + */ + 'ZERO_RESULTS' | + /** indicates that you are over your quota. */ + 'OVER_QUERY_LIMIT' | + /** indicates that your request was denied, generally because of lack of an invalid key parameter. */ + 'REQUEST_DENIED' | + /** generally indicates that the input parameter is missing. */ + 'INVALID_REQUEST' | + /** indicates a server-side error; trying again may be successful. */ + 'UNKNOWN_ERROR' +); + +/** + * When the Places service returns JSON results from a search, it places them within a `predictions` array. + * Even if the service returns no results (such as if the `location` is remote) it still returns an empty `predictions` array. + * XML responses consist of zero or more `` elements. + * + * **Note:** The Place Autocomplete response does not include the `scope` or `alt_ids` fields that you may see + * in search results or place details. This is because Autocomplete returns only Google-scoped place IDs. + * It does not return app-scoped place IDs that have not yet been accepted into the Google Places database. + */ +export interface PlaceAutocompleteResult { + /** + * contains the human-readable name for the returned result. + * For `establishment` results, this is usually the business name. + */ + description: string; + /** + * is a textual identifier that uniquely identifies a place. + * To retrieve information about the place, pass this identifier in the `placeId` field of a Places API request. + */ + place_id: string; + /** + * contains an array of terms identifying each section of the returned description + * (a section of the description is generally terminated with a comma). + */ + terms: PredictionTerm[]; + /** + * contains an array of types that apply to this place. + * For example: `[ "political", "locality" ]` or `[ "establishment", "geocode" ]`. + */ + types: AddressType[]; + /** + * contains an array with `offset` value and `length`. These describe the location of + * the entered term in the prediction result text, so that the term can be highlighted if desired. + */ + matched_substrings: PredictionSubstring[]; + /** contains details on the prediction. */ + structured_formatting: StructuredFormatting; +} + +export interface PredictionTerm { + /** containing the text of the term. */ + value: string; + /** start position of this term in the description, measured in Unicode characters. */ + offset: number; +} + +export interface PredictionSubstring { + /** location of the entered term. */ + offset: number; + /** length of the entered term. */ + length: number; +} + +export interface StructuredFormatting { + /** contains the main text of a prediction, usually the name of the place. */ + main_text: string; + /** + * contains an array with `offset` value and `length`. These describe the location of + * the entered term in the prediction result text, so that the term can be highlighted if desired. + */ + main_text_matched_substrings: PredictionSubstring[]; + /** contains the secondary text of a prediction, usually the location of the place. */ + secondary_text: string; +} + +export interface PlacesNearbyRequest { + /** The latitude/longitude around which to retrieve place information. This must be specified as latitude,longitude. */ + location: LatLng; + /** + * Defines the distance (in meters) within which to return place results. + * The maximum allowed radius is 50 000 meters. + * Note that `radius` must not be included if `rankby=distance` is specified. + */ + radius?: number; + /** + * A term to be matched against all content that Google has indexed for this place, including but not limited to + * name, type, and address, as well as customer reviews and other third-party content. + */ + keyword?: string; + /** + * The language code, indicating in which language the results should be returned, if possible. + * Note that we often update supported languages so this list may not be exhaustive. + */ + language?: Language; + /** + * Restricts results to only those places within the specified range. + * Valid values range between 0 (most affordable) to 4 (most expensive), inclusive. + * The exact amount indicated by a specific value will vary from region to region. + */ + minprice?: number; + /** + * Restricts results to only those places within the specified range. + * Valid values range between 0 (most affordable) to 4 (most expensive), inclusive. + * The exact amount indicated by a specific value will vary from region to region. + */ + maxprice?: number; + /** + * A term to be matched against all content that Google has indexed for this place. + * Equivalent to `keyword`. The `name` field is no longer restricted to place names. + * Values in this field are combined with values in the `keyword` field and passed as part of the same search string. + * We recommend using only the `keyword` parameter for all search terms. + */ + name?: string; + /** + * Returns only those places that are open for business at the time the query is sent. + * Places that do not specify opening hours in the Google Places database will not be returned if you include this parameter in your query. + */ + opennow?: boolean; + /** + * Specifies the order in which results are listed. + * Note that `rankby` must not be included if `radius` is specified. + * + * @default PlacesNearbyRanking.prominence + */ + rankby?: PlacesNearbyRanking; + /** + * Restricts the results to places matching the specified type. + * Only one type may be specified (if more than one type is provided, all types following the first entry are ignored). + */ + type?: AddressType; + /** + * Returns the next 20 results from a previously run search. + * Setting a pagetoken parameter will execute a search with the same parameters used previously — + * all parameters other than pagetoken will be ignored. + */ + pagetoken?: string; +} + +export type PlacesNearbyRanking = ( + /** + * This option sorts results based on their importance. Ranking will favor prominent places within the specified area. + * Prominence can be affected by a place's ranking in Google's index, global popularity, and other factors. + */ + 'prominence' | + /** + * This option biases search results in ascending order by their distance from the specified `location`. + * When distance is specified, one or more of `keyword`, `name`, or `type` is required. + */ + 'distance' +); + +export interface PlacePhotoRequest { + /** + * string identifier that uniquely identifies a photo. + * Photo references are returned from either a Place Search or Place Details request. + */ + photoreference: string; + /** + * Specifies the maximum desired height or width, in pixels, of the image returned by the Place Photos service. + * If the image is smaller than the values specified, the original image will be returned. + * If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, + * restricted to its original aspect ratio. Both the `maxheight` and `maxwidth` properties accept an integer between 1 and 1600. + */ + maxwidth?: number; + /** + * Specifies the maximum desired height or width, in pixels, of the image returned by the Place Photos service. + * If the image is smaller than the values specified, the original image will be returned. + * If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, + * restricted to its original aspect ratio. Both the `maxheight` and `maxwidth` properties accept an integer between 1 and 1600. + */ + maxheight?: number; +} + +/** + * The response of a successful Place Photo request will be an image. + * The type of the image will depend upon the type of the originally submitted photo. + * + * If your request exceeds your available quota, the server will return an HTTP 403 status to indicate that the quota has been exceeded. + * + * If the server is unable to understand your request, it will return HTTP 400 status, which indicates an invalid request. + * + * The most common reasons why you might see an invalid request include: + * - The submitted photo reference was incorrectly specified. + * - Your request did not include either a `maxwidth` or `maxheight` parameter. + */ +export type PlacePhotoResponse = string; + +export interface QueryAutocompleteRequest { + /** + * The text string on which to search. + * The Places service will return candidate matches based on this string and order results based on their perceived relevance. + */ + input: string; + /** + * The character position in the input term at which the service uses text for predictions. + * For example, if the input is 'Googl' and the completion point is 3, the service will match on 'Goo'. + * The offset should generally be set to the position of the text caret. + * If no offset is supplied, the service will use the entire term. + */ + offset?: number; + /** The point around which you wish to retrieve place information. Must be specified as latitude,longitude. */ + location?: LatLng; + /** + * The distance (in meters) within which to return place results. + * Note that setting a radius biases results to the indicated area, but may not fully restrict results to the specified area. + */ + radius?: number; + /** + * The language code, indicating in which language the results should be returned, if possible. + * Searches are also biased to the selected language; results in the selected language may be given a higher ranking. + * If language is not supplied, the Places service will attempt to use the native language of the domain from which the request is sent. + */ + language?: Language; +} + +export interface QueryAutocompleteResponse { + /** contains metadata on the request. */ + status: QueryAutocompleteResponseStatus; + /** + * When the Places service returns a status code other than `OK`, there may be an additional `error_message` field + * within the response object. This field contains more detailed information about the reasons behind the given status code. + */ + error_message: string; + /** containing information about a single query prediction. */ + predictions: QueryAutocompleteResult[]; +} + +/** + * The `status` field within the Query Autocomplete response object contains the status of the request, + * and may contain debugging information to help you track down why the request failed. + */ +export type QueryAutocompleteResponseStatus = ( + /** indicates that no errors occurred and at least one result was returned. */ + 'OK' | + /** + * indicates that the search was successful but returned no results. + * This may occur if the search was passed a bounds in a remote location. + */ + 'ZERO_RESULTS' | + /** indicates that you are over your quota. */ + 'OVER_QUERY_LIMIT' | + /** indicates that your request was denied, generally because the key parameter is missing or invalid. */ + 'REQUEST_DENIED' | + /** generally indicates that the input parameter is missing. */ + 'INVALID_REQUEST' | + /** indicates a server-side error; trying again may be successful. */ + 'UNKNOWN_ERROR' +); + +/** + * When the Places service returns JSON results from a search, it places them within a `predictions` array. + * Even if the service returns no results (such as if the `location` is remote) it still returns an empty `predictions` array. + * XML responses consist of zero or more `` elements. + * + * Note that some of the predictions may be places, and the `place_id` and `types` fields will be included with those predictions. + * See [Place Autocomplete Results](https://developers.google.com/places/web-service/autocomplete#place_autocomplete_results) + * for information about these results. + */ +export interface QueryAutocompleteResult { + /** contains the human-readable name for the returned result. For establishment results, this is usually the business name. */ + description: string; + /** + * contains an array of terms identifying each section of the returned description + * (a section of the description is generally terminated with a comma). + */ + terms: PredictionTerm[]; + /** + * contains an `offset` value and a `length`. + * These describe the location of the entered term in the prediction result text, so that the term can be highlighted if desired. + */ + matched_substring: PredictionSubstring[]; +} + +/** A Radar Search request must include at least one of `keyword`, `name`, or `type`. */ +export interface PlaceRadarRequest { + /** The latitude/longitude around which to retrieve place information. This must be specified as latitude,longitude. */ + location: LatLng; + /** Defines the distance (in meters) within which to return place results. The maximum allowed radius is 50 000 meters. */ + radius: number; + /** + * A term to be matched against all content that Google has indexed for this place, including but not limited to + * name, type, and address, as well as customer reviews and other third-party content. + */ + keyword?: string; + /** + * The language code, indicating in which language the results should be returned, if possible. + * Searches are also biased to the selected language; results in the selected language may be given a higher ranking. + * Note that we often update supported languages so this list may not be exhaustive. + */ + language?: string; + /** + * Restricts results to only those places within the specified price level. + * Valid values are in the range from 0 (most affordable) to 4 (most expensive), inclusive. + * The exact amount indicated by a specific value will vary from region to region. + */ + minprice?: number; + /** + * Restricts results to only those places within the specified price level. + * Valid values are in the range from 0 (most affordable) to 4 (most expensive), inclusive. + * The exact amount indicated by a specific value will vary from region to region. + */ + maxprice?: number; + /** + * A term to be matched against all content that Google has indexed for this place. + * Equivalent to keyword. The `name` field is no longer restricted to place names. + * Values in this field are combined with values in the `keyword` field and passed as part of the same search string. + * We recommend using only the `keyword` parameter for all search terms. + */ + name?: string; + /** + * Returns only those places that are open for business at the time the query is sent. + * Places that do not specify opening hours in the Google Places database will not be returned if you include this parameter in your query. + */ + opennow?: boolean; + /** + * Restricts the results to places matching the specified type. + * Only one type may be specified (if more than one type is provided, all types following the first entry are ignored). + */ + type?: AddressType; +} + +/** + * If both `result_type` and `location_type` filters are present then the API returns only those results that match both the + * `result_type` and the `location_type` values. If none of the filter values are acceptable, the API returns `ZERO_RESULTS`. + */ +export interface ReverseGeocodingRequest { + /** The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. */ + latlng?: LatLng; + /** + * The place ID of the place for which you wish to obtain the human-readable address. + * The place ID is a unique identifier that can be used with other Google APIs. + * For example, you can use the `placeID` returned by the Roads API to get the address for a snapped point. + * The place ID may only be specified if the request includes an API key or a Google Maps APIs Premium Plan client ID. + */ + place_id?: string; + /** + * The language in which to return results. + * - Google often updates the supported languages, so this list may not be exhaustive. + * - If `language` is not supplied, the geocoder attempts to use the preferred language as specified in the + * `Accept-Language` header, or the native language of the domain from which the request is sent. + * - The geocoder does its best to provide a street address that is readable for both the user and locals. + * To achieve that goal, it returns street addresses in the local language, transliterated to a script readable by the user + * if necessary, observing the preferred language. All other addresses are returned in the preferred language. + * Address components are all returned in the same language, which is chosen from the first component. + * - If a name is not available in the preferred language, the geocoder uses the closest match. + */ + language?: Language; + /** + * A filter of one or more address types, separated by a pipe (`|`). + * If the parameter contains multiple address types, the API returns all addresses that match any of the types. + * A note about processing: The `result_type` parameter does not restrict the search to the specified address type(s). + * Rather, the `result_type` acts as a post-search filter: the API fetches all results for the specified `latlng`, + * then discards those results that do not match the specified address type(s). + * Note: This parameter is available only for requests that include an API key or a client ID. + */ + result_type?: AddressType; + /** + * A filter of one or more location types, separated by a pipe (`|`). + * If the parameter contains multiple location types, the API returns all addresses that match any of the types. + * A note about processing: The `location_type` parameter does not restrict the search to the specified location type(s). + * Rather, the `location_type` acts as a post-search filter: the API fetches all results for the specified `latlng`, + * then discards those results that do not match the specified location type(s). + * Note: This parameter is available only for requests that include an API key or a client ID. + */ + location_type?: ReverseGeocodingLocationType; +} + +export type ReverseGeocodingLocationType = ( + /** returns only the addresses for which Google has location information accurate down to street address precision. */ + 'ROOFTOP' | + /** + * returns only the addresses that reflect an approximation (usually on a road) interpolated between two precise points + * (such as intersections). An interpolated range generally indicates that rooftop geocodes are unavailable for a street address. + */ + 'RANGE_INTERPOLATED' | + /** returns only geometric centers of a location such as a polyline (for example, a street) or polygon (region). */ + 'GEOMETRIC_CENTER' | + /** returns only the addresses that are characterized as approximate. */ + 'APPROXIMATE' +); + +export type ReverseGeocodingResponse = GeocodingResponse; + +/** + * The `"status"` field within the Geocoding response object contains the status of the request, + * and may contain debugging information to help you track down why reverse geocoding is not working. + */ +export type ReverseGeocodingResponseStatus = ( + /** indicates that no errors occurred and at least one address was returned. */ + 'OK' | + /** + * indicates that the reverse geocoding was successful but returned no results. + * This may occur if the geocoder was passed a latlng in a remote location. + */ + 'ZERO_RESULTS' | + /** indicates that you are over your quota. */ + 'OVER_QUERY_LIMIT' | + /** + * indicates that the request was denied. + * Possibly because the request includes a `result_type` or `location_type` parameter but does not include + * an API key or client ID. + */ + 'REQUEST_DENIED' | + /** + * generally indicates one of the following: + * - The query (`address`, `components` or `latlng`) is missing. + * - An invalid `result_type` or `location_type` was given. + */ + 'INVALID_REQUEST' | + /** indicates that the request could not be processed due to a server error. The request may succeed if you try again. */ + 'UNKNOWN_ERROR' +); + +export interface SnappedSpeedLimitsRequest { + /** + * A list of latitude/longitude pairs representing a path. Latitude and longitude values must be separated by commas. + * Latitude/longitude pairs must be separated by the pipe character: "|". + * When you supply the `path` parameter, the API first snaps the path to the most likely road traveled by a vehicle + * (as it does for the [snapToRoads](https://developers.google.com/maps/documentation/roads/snap) request), + * then determines the speed limit for the relevant road segment. + * If you don't want the API to snap the path, you must pass a `placeId` parameter as explained below. + * The following example shows the `path` parameter with three latitude/longitude pairs: + * `path=60.170880,24.942795|60.170879,24.942796|60.170877,24.942796`. + */ + path: LatLng[]; + /** + * Whether to return speed limits in kilometers or miles per hour. This can be set to either `KPH` or `MPH`. + * + * @default SpeedLimitUnit.KPH + */ + units?: SpeedLimitUnit; +} + +export interface SpeedLimitsRequest { + /** + * The place ID(s) representing one or more road segments. + * Make sure each place ID refers to a road segment and not a different type of place. + * You can pass up to 100 place IDs with each request. + * The API does not perform road-snapping on the supplied place IDs. + * The response includes a speed limit for each place ID in the request. + * You can send a [snapToRoads](https://developers.google.com/maps/documentation/roads/snap) or + * [nearestRoads](https://developers.google.com/maps/documentation/roads/nearest) request to find + * the relevant place IDs then supply them as input to the `speedLimits` request. + * The following example shows the `placeId` parameter with two place IDs: + * `placeId=ChIJX12duJAwGQ0Ra0d4Oi4jOGE&placeId=ChIJLQcticc0GQ0RoiNZJVa5GxU` + */ + placeId: string; + /** + * Whether to return speed limits in kilometers or miles per hour. This can be set to either `KPH` or `MPH`. + * + * @default SpeedLimitUnit.KPH + */ + units?: SpeedLimitUnit; +} + +export type SpeedLimitUnit = ( + 'KPH' | + 'MPH' +); + +export interface SpeedLimitsResponse { + /** An array of road metadata. */ + speedLimits: SpeedLimit[]; + /** an array of snapped points. This array is present only if the request contained a path parameter. */ + snappedPoints: SnappedPoint[]; +} + +export interface SpeedLimit { + /** A unique identifier for a place. All place IDs returned by the Roads API will correspond to road segments. */ + placeId: string; + /** The speed limit for that road segment. */ + speedLimit: number; + /** Returns either `KPH` or `MPH`. */ + units: SpeedLimitUnit; +} + +export interface SnappedPoint { + /** contains a `latitude` and `longitude` value. */ + location: LatLngLiteralVerbose; + /** + * An integer that indicates the corresponding value in the original request. + * Each value in the request should map to a snapped value in the response. + * These values are indexed from `0`, so a point with an `originalIndex` of `4` will be the snapped value + * of the 5th latitude/longitude passed to the `path` parameter. + */ + originalIndex: number; + /** + * A unique identifier for a place. All place IDs returned by the Roads API will correspond to road segments. + * The `placeId` can be passed in a speed limits request to determine the speed limit along that road segment. + */ + placeId: string; +} + +export interface SnapToRoadsRequest { + /** + * The path to be snapped. The `path` parameter accepts a list of latitude/longitude pairs. + * Latitude and longitude values should be separated by commas. Coordinates should be separated by the pipe character: `"|"`. + * For example: `path=60.170880,24.942795|60.170879,24.942796|60.170877,24.942796`. + * + * **Note:** The snapping algorithm works best for points that are not too far apart. + * If you observe odd snapping behavior, try creating paths that have points closer together. + * To ensure the best snap-to-road quality, you should aim to provide paths on which consecutive pairs + * of points are within 300m of each other. This will also help in handling any isolated, long jumps between + * consecutive points caused by GPS signal loss, or noise. + */ + path: LatLng[]; + /** + * Whether to interpolate a path to include all points forming the full road-geometry. + * When true, additional interpolated points will also be returned, resulting in a path that smoothly follows + * the geometry of the road, even around corners and through tunnels. + * Interpolated paths will most likely contain more points than the original path. + * + * @default false + */ + interpolate?: boolean; +} + +export interface SnapToRoadsResponse { + /** An array of snapped points. */ + snappedPoints: SnappedPoint[]; +} + +/** + * Time Zone API requests are constructed as a URL string. + * The API returns time zone data for a point on the earth, specified by a latitude/longitude pair. + * Note that time zone data may not be available for locations over water, such as oceans or seas. + */ +export interface TimeZoneRequest { + /** a comma-separated `lat,lng` tuple (eg. `location=-33.86,151.20`), representing the location to look up. */ + location: LatLng; + /** + * specifies the desired time as seconds since midnight, January 1, 1970 UTC. + * The Time Zone API uses the timestamp to determine whether or not Daylight Savings should be applied, + * based on the time zone of the location. Note that the API does not take historical time zones into account. + * That is, if you specify a past timestamp, the API does not take into account the possibility that + * the location was previously in a different time zone. + */ + timestamp?: Date | number; + /** + * The language in which to return results. + * Note that we often update supported languages so this list may not be exhaustive. + * + * @default Language.English + */ + language?: Language; +} + +/** For each valid request, the time zone service will return a response in the format indicated within the request URL. */ +export interface TimeZoneResponse { + /** + * the offset for daylight-savings time in seconds. + * This will be zero if the time zone is not in Daylight Savings Time during the specified `timestamp`. + */ + dstOffset: number; + /** the offset from UTC (in seconds) for the given location. This does not take into effect daylight savings. */ + rawOffset: number; + /** + * a string containing the ID of the time zone, such as "America/Los_Angeles" or "Australia/Sydney". + * These IDs are defined by [Unicode Common Locale Data Repository (CLDR) project](http://cldr.unicode.org/), + * and currently available in file [timezone.xml](http://unicode.org/repos/cldr/trunk/common/bcp47/timezone.xml). + * When a timezone has several IDs, the canonical one is returned. In timezone.xml, this is the first alias of each timezone. + * For example, "Asia/Calcutta" is returned, not "Asia/Kolkata". + */ + timeZoneId: string; + /** + * a string containing the long form name of the time zone. + * This field will be localized if the `language` parameter is set. + * eg. "Pacific Daylight Time" or "Australian Eastern Daylight Time" + */ + timeZoneName: string; + /** a string indicating the status of the response. */ + status: TimeZoneResponseStatus; + /** more detailed information about the reasons behind the given status code, if other than `OK`. */ + errorMessage: string; +} + +export type TimeZoneResponseStatus = ( + /** indicates that the request was successful. */ + 'OK' | + /** indicates that the request was malformed. */ + 'INVALID_REQUEST' | + /** + * indicates any of the following: + * - The API `key` is missing or invalid. + * - Billing has not been enabled on your account. + * - A self-imposed usage cap has been exceeded. + * - The provided method of payment is no longer valid (for example, a credit card has expired). + * See the [Maps FAQ](https://developers.google.com/maps/faq#over-limit-key-error) to learn how to fix this. + */ + 'OVER_DAILY_LIMIT' | + /** indicates the requestor has exceeded quota. */ + 'OVER_QUERY_LIMIT' | + /** indicates that the API did not complete the request. Confirm that the request was sent over HTTPS instead of HTTP. */ + 'REQUEST_DENIED' | + /** indicates an unknown error. */ + 'UNKNOWN_ERROR' | + /** + * indicates that no time zone data could be found for the specified position or time. Confirm that the request is for a location on land, + * and not over water. + */ + 'ZERO_RESULTS' +); diff --git a/types/google__maps/tsconfig.json b/types/google__maps/tsconfig.json new file mode 100644 index 0000000000..c3c1ee93b4 --- /dev/null +++ b/types/google__maps/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "paths": { + "@google/maps": [ + "google__maps" + ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "google__maps-tests.ts" + ] +} \ No newline at end of file diff --git a/types/google__maps/tslint.json b/types/google__maps/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/google__maps/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file From 52d1975b928bfd79f2ab76ee0101ad380bdaf2ce Mon Sep 17 00:00:00 2001 From: Emily Marigold Klassen Date: Fri, 12 Oct 2018 09:09:27 -0700 Subject: [PATCH 041/615] Add types for passport-windowsauth (#29630) * Add types for passport-windowsauth * Use class instead of interface for strategy-windowsauth --- types/passport-windowsauth/index.d.ts | 49 +++++++++++++++++++ .../passport-windowsauth-tests.ts | 28 +++++++++++ types/passport-windowsauth/tsconfig.json | 23 +++++++++ types/passport-windowsauth/tslint.json | 1 + 4 files changed, 101 insertions(+) create mode 100644 types/passport-windowsauth/index.d.ts create mode 100644 types/passport-windowsauth/passport-windowsauth-tests.ts create mode 100644 types/passport-windowsauth/tsconfig.json create mode 100644 types/passport-windowsauth/tslint.json diff --git a/types/passport-windowsauth/index.d.ts b/types/passport-windowsauth/index.d.ts new file mode 100644 index 0000000000..dd425a1f59 --- /dev/null +++ b/types/passport-windowsauth/index.d.ts @@ -0,0 +1,49 @@ +// Type definitions for passport-windowsauth 3.0 +// Project: https://github.com/auth0/passport-windowsauth#readme +// Definitions by: Emily Marigold Klassen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import * as express from 'express'; +import * as passport from 'passport'; +import * as ldapjs from 'ldapjs'; +import { TlsOptions } from 'tls'; + +declare namespace windowsauth { + interface Options { + ldap?: { + url?: string + maxConnections?: number + base?: string + bindDN?: string + bindCredentials?: string + tlsOptions?: TlsOptions; + reconnect?: boolean | { + initialDelay?: number, + maxDelay?: number, + failAfter?: number + }; + timeout?: number; + connectTimeout?: number; + idleTimeout?: number; + binder?: ldapjs.Client + client?: ldapjs.Client + }; + integrated?: boolean; + getUserNameFromHeader?(req: express.Request): string; + passReqToCallback?: boolean; + usernameField?: string; + passwordField?: string; + } + type Verified = (err: Error | undefined | null, user?: object, info?: object) => void; + type Verify = (profile: passport.Profile, done: Verified) => void; + type VerifyWithReq = (req: express.Request, profile: passport.Profile, done: Verified) => void; +} + +declare class windowsauth extends passport.Strategy { + constructor(options: windowsauth.Options & {passReqToCallback: true}, verify: windowsauth.VerifyWithReq); + constructor(options: windowsauth.Options, verify: windowsauth.Verify); + constructor(verify: windowsauth.Verify); +} + +export = windowsauth; diff --git a/types/passport-windowsauth/passport-windowsauth-tests.ts b/types/passport-windowsauth/passport-windowsauth-tests.ts new file mode 100644 index 0000000000..cca632ed60 --- /dev/null +++ b/types/passport-windowsauth/passport-windowsauth-tests.ts @@ -0,0 +1,28 @@ +import * as passport from 'passport'; +import * as WindowsStrategy from 'passport-windowsauth'; + +const auth = new passport.Authenticator(); +auth.use(new WindowsStrategy({integrated: true}, (profile, done) => { + console.log(profile); + done(null, profile); +})); + +passport.use(new WindowsStrategy({ + ldap: { + url: 'ldap://wellscordoba.wellscordobabank.com/DC=wellscordobabank,DC=com', + base: 'DC=wellscordobabank,DC=com', + bindDN: 'someAccount', + bindCredentials: 'andItsPass' + } +}, (profile, done) => { + console.log('logged in', profile.id); + done(null, profile); +})); + +passport.use(new WindowsStrategy({ + integrated: true, + passReqToCallback: true +}, (req, profile, done) => { + console.log('logged in', req, profile.id); + done(null, profile); +})); diff --git a/types/passport-windowsauth/tsconfig.json b/types/passport-windowsauth/tsconfig.json new file mode 100644 index 0000000000..070b3d98ed --- /dev/null +++ b/types/passport-windowsauth/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "passport-windowsauth-tests.ts" + ] +} diff --git a/types/passport-windowsauth/tslint.json b/types/passport-windowsauth/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/passport-windowsauth/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 2e84dad3b60000168ca92a1e5b9c15aeda6d064f Mon Sep 17 00:00:00 2001 From: Enzo Volkmann Date: Fri, 12 Oct 2018 18:14:14 +0200 Subject: [PATCH 042/615] Added more types --- types/pdfmake/index.d.ts | 95 +++++++++++++++++++++++++++++++++------- 1 file changed, 80 insertions(+), 15 deletions(-) diff --git a/types/pdfmake/index.d.ts b/types/pdfmake/index.d.ts index abcdce24cb..5c804e0409 100644 --- a/types/pdfmake/index.d.ts +++ b/types/pdfmake/index.d.ts @@ -16,14 +16,6 @@ declare module 'pdfmake/build/pdfmake' { let fonts: { [name: string]: TFontFamilyTypes }; function createPdf(documentDefinitions: TDocumentDefinitions): TCreatedPdf; - type pageSizeType = - '4A0' | '2A0' | 'A0' | 'A1' | 'A2' | 'A3' | 'A4' | 'A5' | 'A6' | 'A7' | 'A8' | 'A9' | 'A10' | - 'B0' | 'B1' | 'B2' | 'B3' | 'B4' | 'B5' | 'B6' | 'B7' | 'B8' | 'B9' | 'B10' | - 'C0' | 'C1' | 'C2' | 'C3' | 'C4' | 'C5' | 'C6' | 'C7' | 'C8' | 'C9' | 'C10' | - 'RA0' | 'RA1' | 'RA2' | 'RA3' | 'RA4' | - 'SRA0' | 'SRA1' | 'SRA2' | 'SRA3' | 'SRA4' | - 'EXECUTIVE' | 'FOLIO' | 'LEGAL' | 'LETTER' | 'TABLOID'; - enum PageSize { A0_x_4 = '4A0', A0_x_2 = '2A0', @@ -48,10 +40,37 @@ declare module 'pdfmake/build/pdfmake' { B7 = 'B7', B8 = 'B8', B9 = 'B9', - B1O = 'B10' + B1O = 'B10', + CO = 'C0', + C1 = 'C1', + C2 = 'C2', + C3 = 'C3', + C4 = 'C4', + C5 = 'C5', + C6 = 'C6', + C7 = 'C7', + C8 = 'C8', + C9 = 'C9', + C1O = 'C10', + RA1 = 'RA1', + RA2 = 'RA2', + RA3 = 'RA3', + RA4 = 'RA4', + SRA1 = 'SRA1', + SRA2 = 'SRA2', + SRA3 = 'SRA3', + SRA4 = 'SRA4', + EXECUTIVE = 'EXECUTIVE', + FOLIO = 'FOLIO', + LEGAL = 'LEGAL', + LETTER = 'LETTER', + TABLOID = 'TABLOID' } - type pageOrientationType = "portrait" | "landscape"; + enum PageOrientation { + PORTRAIT = 'PORTRAIT', + LANDSCAPE = 'LANDSCAPE' + } let pdfMake: pdfMakeStatic; @@ -104,18 +123,64 @@ declare module 'pdfmake/build/pdfmake' { leadingIndent?: any; } + type TableRowFunction = (row: number) => number; + + type TableLayoutFunctions = { + hLineWidth?: (i: number, node: any) => number; + vLineWidth?: (i: number, node: any) => number; + hLineColor?: (i: number, node: any) => string; + vLineColor?: (i: number, node: any) => string; + fillColor?: (i: number, node: any) => string; + paddingLeft?: (i: number, node: any) => number; + paddingRight?: (i: number, node: any) => number; + paddingTop?: (i: number, node: any) => number; + paddingBottom?: (i: number, node: any) => number; + }; + + interface TableCell { + text: string; + rowSpan?: number; + colSpan?: number; + fillColor?: string; + border?: [boolean, boolean, boolean, boolean] + } + + interface Table { + widths?: (string | number)[]; + heights?: (string | number)[] | TableRowFunction; + headerRows?: number; + body: Content[][] | TableCell[][]; + layout?: string | TableLayoutFunctions; + } + + interface Content { + style?: 'string'; + margin?: Margins; + text?: string | string[] | Content[]; + columns?: Content[]; + stack?: Content[]; + image?: string; + width?: string | number; + height?: string | number; + fit?: [number, number] + pageBreak?: 'before' | 'after'; + alignment?: Alignment; + table?: Table; + ul?: Content[]; + ol?: Content[]; + [additionalProperty: string]: any; + } + interface TDocumentDefinitions { info?: TDocumentInformation; header?: TDocumentHeaderFooterFunction; footer?: TDocumentHeaderFooterFunction; - content: any; + content: string | Content; styles?: Styles; pageSize?: PageSize; - pageOrientation?: pageOrientationType; + pageOrientation?: PageOrientation; pageMargins?: Margins; - defaultStyle?: { - font?: string; - }; + defaultStyle?: Styles; } type CreatedPdfParams = ( From 2ea4a1af588857e294a1d25a77c4ff75b63b22bd Mon Sep 17 00:00:00 2001 From: George Berezhnoy Date: Fri, 12 Oct 2018 19:30:03 +0300 Subject: [PATCH 043/615] @types/three: Add setRequestHeader into FileLoader interface (#29684) * Add setRequestHeader into FileLoader interface * Update index.d.ts --- types/three/index.d.ts | 2 +- types/three/three-core.d.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/three/index.d.ts b/types/three/index.d.ts index 5d37b7893b..74ce9ac0ee 100644 --- a/types/three/index.d.ts +++ b/types/three/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for three.js 0.92 +// Type definitions for three.js 0.93 // Project: https://threejs.org // Definitions by: Kon , // Satoru Kimura , diff --git a/types/three/three-core.d.ts b/types/three/three-core.d.ts index 27c3e043c6..0a1beadc5a 100755 --- a/types/three/three-core.d.ts +++ b/types/three/three-core.d.ts @@ -2239,6 +2239,7 @@ export class FileLoader { setPath(path: string) : FileLoader; setResponseType(responseType: string) : FileLoader; setWithCredentials(value: string): FileLoader; + setRequestHeader(value: {[header: string]: string}: FileLoader; } export class FontLoader { From 1a39ab2687e7167df52ddb750b8c910e9460976e Mon Sep 17 00:00:00 2001 From: Gustav Bylund Date: Fri, 12 Oct 2018 18:31:33 +0200 Subject: [PATCH 044/615] Add new @types/mutexify package (#29683) --- types/mutexify/index.d.ts | 20 ++++++++++++++++++++ types/mutexify/mutexify-tests.ts | 6 ++++++ types/mutexify/tsconfig.json | 16 ++++++++++++++++ types/mutexify/tslint.json | 1 + 4 files changed, 43 insertions(+) create mode 100644 types/mutexify/index.d.ts create mode 100644 types/mutexify/mutexify-tests.ts create mode 100644 types/mutexify/tsconfig.json create mode 100644 types/mutexify/tslint.json diff --git a/types/mutexify/index.d.ts b/types/mutexify/index.d.ts new file mode 100644 index 0000000000..4fa1dffe2a --- /dev/null +++ b/types/mutexify/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for mutexify 1.2 +// Project: https://github.com/mafintosh/mutexify +// Definitions by: Gustav Bylund +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +interface Lock { + (fn: Release): number; + locked: boolean; +} + +type Release = ( + cb: (err?: any, value?: any) => any, + err: any, + value: any +) => void; + +declare function mutexify(): Lock; + +export = mutexify; +export as namespace mutexify; diff --git a/types/mutexify/mutexify-tests.ts b/types/mutexify/mutexify-tests.ts new file mode 100644 index 0000000000..dc921cb246 --- /dev/null +++ b/types/mutexify/mutexify-tests.ts @@ -0,0 +1,6 @@ +import mutexify = require("mutexify"); +const lock = mutexify(); + +lock(release => { + release(); +}); diff --git a/types/mutexify/tsconfig.json b/types/mutexify/tsconfig.json new file mode 100644 index 0000000000..4c1ee302d0 --- /dev/null +++ b/types/mutexify/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "mutexify-tests.ts"] +} diff --git a/types/mutexify/tslint.json b/types/mutexify/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/mutexify/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 802bbfcfdcd1c823e1db67750851a1809a6e6f43 Mon Sep 17 00:00:00 2001 From: Gustav Bylund Date: Fri, 12 Oct 2018 18:32:10 +0200 Subject: [PATCH 045/615] Update tempy to v0.2.x (#29681) --- types/tempy/index.d.ts | 9 +++++---- types/tempy/tempy-tests.ts | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/types/tempy/index.d.ts b/types/tempy/index.d.ts index ec210e0829..15c1664409 100644 --- a/types/tempy/index.d.ts +++ b/types/tempy/index.d.ts @@ -1,9 +1,10 @@ -// Type definitions for tempy 0.1 +// Type definitions for tempy 0.2 // Project: https://github.com/sindresorhus/tempy#readme -// Definitions by: Douglas Duteil +// Definitions by: Douglas Duteil , Gustav Bylund // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export function directoryAsync(): Promise; export function directory(): string; -export function file(options?: {extension: string}): string; +export function file( + options?: { extension: string } | { name: string } +): string; export const root: string; diff --git a/types/tempy/tempy-tests.ts b/types/tempy/tempy-tests.ts index 56ec437e55..0af9467bb2 100644 --- a/types/tempy/tempy-tests.ts +++ b/types/tempy/tempy-tests.ts @@ -1,12 +1,12 @@ -import { directoryAsync, directory, file, root } from 'tempy'; +import { directory, file, root } from "tempy"; // -directoryAsync().then((tempDir1: string) => tempDir1 === '/tmp/123456789'); - const tempDir2: string = directory(); const tempFile: string = file(); -const pngFile: string = file({extension: 'png'}); +const pngFile: string = file({ extension: "png" }); + +const fileWithName: string = file({ name: "afile.txt" }); const tmpRoot: string = root; From cbc37b17c0c1557af7921e2d8a7adbfa86684be1 Mon Sep 17 00:00:00 2001 From: Cerberuser Date: Fri, 12 Oct 2018 23:32:37 +0700 Subject: [PATCH 046/615] plotly.js depends on older version of d3 (#29677) --- types/plotly.js/index.d.ts | 4 ++-- types/plotly.js/tsconfig.json | 3 +++ types/react-plotly.js/tsconfig.json | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts index 121001b49b..adf853af72 100644 --- a/types/plotly.js/index.d.ts +++ b/types/plotly.js/index.d.ts @@ -13,7 +13,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -/// +import * as _d3 from "d3"; export as namespace Plotly; export interface StaticPlots { @@ -189,7 +189,7 @@ export function plot(root: Root, data: Data[], layout?: Partial, config? export function relayout(root: Root, layout: Partial): Promise; export function redraw(root: Root): Promise; export function purge(root: Root): void; -export const d3: any; +export const d3: typeof _d3; export function restyle(root: Root, aobj: Data, traces?: number[] | number): Promise; export function update(root: Root, traceUpdate: Data, layoutUpdate: Partial, traces?: number[] | number): Promise; export function addTraces(root: Root, traces: Data | Data[], newIndices?: number[] | number): Promise; diff --git a/types/plotly.js/tsconfig.json b/types/plotly.js/tsconfig.json index dd21321c49..fe2dfd96bd 100644 --- a/types/plotly.js/tsconfig.json +++ b/types/plotly.js/tsconfig.json @@ -13,6 +13,9 @@ "typeRoots": [ "../" ], + "paths": { + "d3": [ "d3/v3" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true diff --git a/types/react-plotly.js/tsconfig.json b/types/react-plotly.js/tsconfig.json index e0ec629a4c..02d264a0e5 100644 --- a/types/react-plotly.js/tsconfig.json +++ b/types/react-plotly.js/tsconfig.json @@ -13,6 +13,9 @@ "typeRoots": [ "../" ], + "paths": { + "d3": [ "d3/v3" ] + }, "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true, From 7315e28618af291b8876c36ccab03a23c45677ed Mon Sep 17 00:00:00 2001 From: Christian Rackerseder Date: Fri, 12 Oct 2018 19:03:30 +0200 Subject: [PATCH 047/615] [pino-http] Add types (#29676) --- types/pino-http/index.d.ts | 28 ++++++++++++++++++++++++++++ types/pino-http/pino-http-tests.ts | 16 ++++++++++++++++ types/pino-http/tsconfig.json | 23 +++++++++++++++++++++++ types/pino-http/tslint.json | 1 + 4 files changed, 68 insertions(+) create mode 100644 types/pino-http/index.d.ts create mode 100644 types/pino-http/pino-http-tests.ts create mode 100644 types/pino-http/tsconfig.json create mode 100644 types/pino-http/tslint.json diff --git a/types/pino-http/index.d.ts b/types/pino-http/index.d.ts new file mode 100644 index 0000000000..a93abf406f --- /dev/null +++ b/types/pino-http/index.d.ts @@ -0,0 +1,28 @@ +// Type definitions for pino-http 4.0 +// Project: https://github.com/pinojs/pino-http#readme +// Definitions by: Christian Rackerseder +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { IncomingMessage, ServerResponse } from 'http'; +import { Level, Logger, LoggerOptions } from 'pino'; + +export = PinoHttp; + +declare function PinoHttp(opts?: PinoHttp.Options): PinoHttp.HttpLogger; + +declare namespace PinoHttp { + type HttpLogger = (req: IncomingMessage, res: ServerResponse) => void; + + interface Options extends LoggerOptions { + logger?: Logger; + genReqId?: (req: IncomingMessage) => number; + useLevel?: Level; + } +} + +declare module 'http' { + interface IncomingMessage { + log: Logger; + } +} diff --git a/types/pino-http/pino-http-tests.ts b/types/pino-http/pino-http-tests.ts new file mode 100644 index 0000000000..96207c8d9d --- /dev/null +++ b/types/pino-http/pino-http-tests.ts @@ -0,0 +1,16 @@ +import http = require('http'); +import pino = require('pino'); +import pinoHttp = require('pino-http'); + +const logger = pino(); +const httpLogger = pinoHttp(); + +function handle(req: http.IncomingMessage, res: http.ServerResponse) { + httpLogger(req, res); + req.log.info('something else'); +} + +pinoHttp({ logger }); +pinoHttp({ genReqId: (req) => req.statusCode || 200 }); +pinoHttp({ useLevel: 'error' }); +pinoHttp({ prettyPrint: true }); diff --git a/types/pino-http/tsconfig.json b/types/pino-http/tsconfig.json new file mode 100644 index 0000000000..3adac9b376 --- /dev/null +++ b/types/pino-http/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pino-http-tests.ts" + ] +} diff --git a/types/pino-http/tslint.json b/types/pino-http/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/pino-http/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From 79f404e22b43355cb2ba90ce3b042385b9756ec6 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 12 Oct 2018 19:05:49 +0200 Subject: [PATCH 048/615] Export types for react-sound package (#29671) --- types/react-sound/index.d.ts | 51 +++++++++++++------------ types/react-sound/react-sound-tests.tsx | 6 +-- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/types/react-sound/index.d.ts b/types/react-sound/index.d.ts index 4670feb5f9..9d0d85f141 100644 --- a/types/react-sound/index.d.ts +++ b/types/react-sound/index.d.ts @@ -6,29 +6,32 @@ import * as React from "react"; -declare namespace ReactSound { - type PlayStatus = 'PLAYING' | 'STOPPED' | 'PAUSED'; - - interface ReactSoundProps { - url: string; - playStatus: PlayStatus; - playFromPosition?: number; - position?: number; - volume?: number; - playbackRate?: number; - autoLoad?: boolean; - loop?: boolean; - onError?: () => void; - onLoading?: () => void; - onLoad?: () => void; - onPlaying?: () => void; - onPause?: () => void; - onResume?: () => void; - onStop?: () => void; - onFinishedPlaying?: () => void; - onBufferChange?: () => void; - } +export enum PlayStatus { + Playing = 'PLAYING', + Stopped = 'STOPPED', + Paused = 'PAUSED' } -declare const ReactSound: React.ComponentClass; -export = ReactSound; +export interface ReactSoundProps { + url: string; + playStatus: PlayStatus; + playFromPosition?: number; + position?: number; + volume?: number; + playbackRate?: number; + autoLoad?: boolean; + loop?: boolean; + onError?: () => void; + onLoading?: () => void; + onLoad?: () => void; + onPlaying?: () => void; + onPause?: () => void; + onResume?: () => void; + onStop?: () => void; + onFinishedPlaying?: () => void; + onBufferChange?: () => void; +} + +declare const ReactSound: React.ComponentClass; + +export default ReactSound; diff --git a/types/react-sound/react-sound-tests.tsx b/types/react-sound/react-sound-tests.tsx index 2775ac607a..358111dce1 100644 --- a/types/react-sound/react-sound-tests.tsx +++ b/types/react-sound/react-sound-tests.tsx @@ -1,10 +1,10 @@ -import ReactSound from "react-sound"; +import ReactSound, { PlayStatus } from "react-sound"; import * as React from "react"; const ReactSoundRequiredOptions: JSX.Element = ( ); @@ -13,7 +13,7 @@ const callbackFn = () => ({}); const ReactSoundAllOptions: JSX.Element = ( Date: Sat, 13 Oct 2018 04:06:30 +1100 Subject: [PATCH 049/615] @types/react-select: add theme property introduced in react-select v2.1 [WIP] (#29669) * add theme property introduced in react-select 2.1 * fix lint errors * added theme.tsx to tsconfig --- types/react-select/lib/Select.d.ts | 4 +++- types/react-select/lib/theme.d.ts | 5 +++++ types/react-select/lib/types.d.ts | 12 ++++++++++++ types/react-select/test/examples/Theme.tsx | 21 +++++++++++++++++++++ types/react-select/tsconfig.json | 3 ++- 5 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 types/react-select/test/examples/Theme.tsx diff --git a/types/react-select/lib/Select.d.ts b/types/react-select/lib/Select.d.ts index f6e5eba96e..b6298efa50 100644 --- a/types/react-select/lib/Select.d.ts +++ b/types/react-select/lib/Select.d.ts @@ -25,7 +25,7 @@ import { SelectComponentsConfig, } from './components/index'; import { StylesConfig } from './styles'; - +import { ThemeConfig } from './theme'; import { ActionMeta, ActionTypes, @@ -193,6 +193,8 @@ export interface Props { screenReaderStatus?: (obj: { count: number }) => string; /* Style modifier methods */ styles?: StylesConfig; + /* Theme modifier method */ + theme?: ThemeConfig; /* Sets the tabIndex attribute on the input */ tabIndex?: string | null; /* Select the currently focused option when the user presses tab */ diff --git a/types/react-select/lib/theme.d.ts b/types/react-select/lib/theme.d.ts index 7282dd20ad..25f9a44c85 100644 --- a/types/react-select/lib/theme.d.ts +++ b/types/react-select/lib/theme.d.ts @@ -1,3 +1,4 @@ +import { Theme } from './types'; export const borderRadius: number; export const colors: { @@ -51,3 +52,7 @@ export const spacing: { /* The amount of space between the control and menu */ menuGutter: number, }; + +export const defaultTheme: Theme; + +export type ThemeConfig = Theme | ((theme: Theme) => Theme); diff --git a/types/react-select/lib/types.d.ts b/types/react-select/lib/types.d.ts index 08ebfae965..f27f02a75a 100644 --- a/types/react-select/lib/types.d.ts +++ b/types/react-select/lib/types.d.ts @@ -98,3 +98,15 @@ export type OptionProps = PropsWithInnerRef & { onMouseOver: MouseEventHandler, value: any, }; + +export interface ThemeSpacing { + baseUnit: number; + controlHeight: number; + menuGutter: number; +} + +export interface Theme { + borderRadius: number; + colors: { [key: string]: string }; + spacing: ThemeSpacing; +} diff --git a/types/react-select/test/examples/Theme.tsx b/types/react-select/test/examples/Theme.tsx new file mode 100644 index 0000000000..3587b74c96 --- /dev/null +++ b/types/react-select/test/examples/Theme.tsx @@ -0,0 +1,21 @@ +import * as React from 'react'; + +import { flavourOptions } from '../data'; +import Select from 'react-select'; + +export default () => ( + field. For a form element, use dijit/form/DateTextBox instead. - * + * * Note that the parser takes all dates attributes passed in the * RFC 3339 format, e.g. 2005-06-30T08:05:00-07:00 * so that they are serializable and locale-independent. - * + * * Also note that this widget isn't keyboard accessible; use dijit.Calendar for that - * - * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. - * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree */ class CalendarLite extends dijit._WidgetBase implements dijit._TemplatedMixin { constructor(params?: Object, srcNodeRef?: HTMLElement); /** * Object to which attach points and events will be scoped. Defaults * to 'this'. - * + * */ "attachScope": Object; set(property:"attachScope", value: Object): void; @@ -4384,58 +4384,58 @@ declare module dijit { /** * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute * for each XXX attribute to be mapped to the DOM. - * + * * attributeMap sets up a "binding" between attributes (aka properties) * of the widget and the widget's DOM. * Changes to widget attributes listed in attributeMap will be * reflected into the DOM. - * + * * For example, calling set('title', 'hello') * on a TitlePane will automatically cause the TitlePane's DOM to update * with the new title. - * + * * attributeMap is a hash where the key is an attribute of the widget, * and the value reflects a binding to a: - * + * * DOM node attribute * focus: {node: "focusNode", type: "attribute"} * Maps this.focus to this.focusNode.focus - * + * * DOM node innerHTML * title: { node: "titleNode", type: "innerHTML" } * Maps this.title to this.titleNode.innerHTML - * + * * DOM node innerText * title: { node: "titleNode", type: "innerText" } * Maps this.title to this.titleNode.innerText - * + * * DOM node CSS class * myClass: { node: "domNode", type: "class" } * Maps this.myClass to this.domNode.className - * + * * If the value is an array, then each element in the array matches one of the * formats of the above list. - * + * * There are also some shorthands for backwards compatibility: - * + * * string --> { node: string, type: "attribute" }, for example: * "focusNode" ---> { node: "focusNode", type: "attribute" } * "" --> { node: "domNode", type: "attribute" } - * + * */ "attributeMap": Object; set(property:"attributeMap", value: Object): void; get(property:"attributeMap"): Object; watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** - * + * */ "baseClass": string; set(property:"baseClass", value: string): void; get(property:"baseClass"): string; watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "class": string; set(property:"class", value: string): void; @@ -4445,24 +4445,24 @@ declare module dijit { * Designates where children of the source DOM node will be placed. * "Children" in this case refers to both DOM nodes and widgets. * For example, for myWidget: - * + * *
* here's a plain DOM node * and a widget * and another plain DOM node *
* containerNode would point to: - * + * * here's a plain DOM node * and a widget * and another plain DOM node * In templated widgets, "containerNode" is set via a * data-dojo-attach-point assignment. - * + * * containerNode must be defined for any widget that accepts innerHTML * (like ContentPane or BorderContainer or even Button), and conversely * is null for widgets that don't, like TextBox. - * + * */ "containerNode": HTMLElement; set(property:"containerNode", value: HTMLElement): void; @@ -4472,7 +4472,7 @@ declare module dijit { * Date object containing the currently focused date, or the date which would be focused * if the calendar itself was focused. Also indicates which year and month to display, * i.e. the current "page" the calendar is on. - * + * */ "currentFocus": Date; set(property:"currentFocus", value: Date): void; @@ -4481,14 +4481,14 @@ declare module dijit { /** * JavaScript namespace to find calendar routines. If unspecified, uses Gregorian calendar routines * at dojo/date and dojo/date/locale. - * + * */ "datePackage": string; set(property:"datePackage", value: string): void; get(property:"datePackage"): string; watch(property:"datePackage", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "dateTemplateString": string; set(property:"dateTemplateString", value: string): void; @@ -4496,7 +4496,7 @@ declare module dijit { watch(property:"dateTemplateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * How to represent the days of the week in the calendar header. See locale - * + * */ "dayWidth": string; set(property:"dayWidth", value: string): void; @@ -4506,7 +4506,7 @@ declare module dijit { * Bi-directional support, as defined by the HTML DIR * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's * default direction. - * + * */ "dir": string; set(property:"dir", value: string): void; @@ -4517,14 +4517,14 @@ declare module dijit { * Nodes may by assigned to other properties, usually through the * template system's data-dojo-attach-point syntax, but the domNode * property is the canonical "top level" node in widget UI. - * + * */ "domNode": HTMLElement; set(property:"domNode", value: HTMLElement): void; get(property:"domNode"): HTMLElement; watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** - * + * */ "dowTemplateString": string; set(property:"dowTemplateString", value: string): void; @@ -4535,7 +4535,7 @@ declare module dijit { * system. If the developer passes an ID which is known not to be * unique, the specified ID is ignored and the system-generated ID is * used instead. - * + * */ "id": string; set(property:"id", value: string): void; @@ -4546,7 +4546,7 @@ declare module dijit { * as defined by the HTML LANG attribute. * Value must be among the list of locales specified during by the Dojo bootstrap, * formatted according to RFC 3066 (like en-us). - * + * */ "lang": string; set(property:"lang", value: string): void; @@ -4555,14 +4555,14 @@ declare module dijit { /** * The document this widget belongs to. If not specified to constructor, will default to * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global - * + * */ "ownerDocument": Object; set(property:"ownerDocument", value: Object): void; get(property:"ownerDocument"): Object; watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** - * + * */ "searchContainerNode": boolean; set(property:"searchContainerNode", value: boolean): void; @@ -4570,7 +4570,7 @@ declare module dijit { watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * pointer to original DOM node - * + * */ "srcNodeRef": HTMLElement; set(property:"srcNodeRef", value: HTMLElement): void; @@ -4578,7 +4578,7 @@ declare module dijit { watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** * HTML style attributes as cssText string or name/value hash - * + * */ "style": string; set(property:"style", value: string): void; @@ -4586,7 +4586,7 @@ declare module dijit { watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Order fields are traversed when user hits the tab key - * + * */ "tabIndex": string; set(property:"tabIndex", value: string): void; @@ -4595,14 +4595,14 @@ declare module dijit { /** * Path to template (HTML file) for this widget relative to dojo.baseUrl. * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead - * + * */ "templatePath": string; set(property:"templatePath", value: string): void; get(property:"templatePath"): string; watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "templateString": string; set(property:"templateString", value: string): void; @@ -4610,14 +4610,14 @@ declare module dijit { watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * HTML title attribute. - * + * * For form widgets this specifies a tooltip to display when hovering over * the widget (just like the native HTML title attribute). - * + * * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's * interpreted as HTML. - * + * */ "title": string; set(property:"title", value: string): void; @@ -4626,7 +4626,7 @@ declare module dijit { /** * When this widget's title attribute is used to for a tab label, accordion pane title, etc., * this specifies the tooltip to appear when the mouse is hovered over that text. - * + * */ "tooltip": string; set(property:"tooltip", value: string): void; @@ -4634,179 +4634,179 @@ declare module dijit { watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * The currently selected Date, initially set to invalid date to indicate no selection. - * + * */ "value": Date; set(property:"value", value: Date): void; get(property:"value"): Date; watch(property:"value", callback:{(property?:string, oldValue?:Date, newValue?: Date):void}) :{unwatch():void} /** - * + * */ "weekTemplateString": string; set(property:"weekTemplateString", value: string): void; get(property:"weekTemplateString"): string; watch(property:"weekTemplateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ buildRendering(): void; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: Function): any; /** * Wrapper to setTimeout to avoid deferred functions executing * after the originating widget has been destroyed. * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). - * - * @param fcn Function reference. - * @param delay OptionalDelay, defaults to 0. + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. */ defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). - * + * * This method will also destroy internal widgets such as those created from a template, * assuming those widgets exist inside of this.domNode but outside of this.containerNode. - * + * * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not * depend on the current ability to destroy a widget without destroying its descendants. Generally * they should use destroyRecursive() for widgets with children. - * - * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets */ destroy(preserveDom?: boolean): void; /** * Recursively destroy the children of this widget and their * descendants. - * - * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. */ destroyDescendants(preserveDom?: boolean): void; /** @@ -4814,41 +4814,41 @@ declare module dijit { * This is the generic "destructor" function that all widget users * should call to cleanly discard with a widget. Once a widget is * destroyed, it is removed from the manager object. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. */ destroyRecursive(preserveDom?: boolean): void; /** * Destroys the DOM nodes associated with this widget. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. */ destroyRendering(preserveDom?: boolean): void; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Disconnects handle created by connect. - * - * @param handle + * + * @param handle */ disconnect(handle: any): void; /** * Used by widgets to signal that a synthetic event occurred, ex: - * + * * myWidget.emit("attrmodified-selectedChildWidget", {}). * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. * Also calls onType() method, if present, and returns value from that method. * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). - * - * @param type - * @param eventObj Optional - * @param callbackArgs Optional + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional */ emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focus the calendar by focusing one of the calendar cells - * + * */ focus(): void; /** @@ -4856,15 +4856,15 @@ declare module dijit { * Get a named property from a widget. The property may * potentially be retrieved via a getter method. If no getter is defined, this * just retrieves the object's property. - * + * * For example, if the widget has properties foo and bar * and a method named _getFooAttr(), calling: * myWidget.get("foo") would be equivalent to calling * widget._getFooAttr() and myWidget.get("bar") * would be equivalent to the expression * widget.bar2 - * - * @param name The property to get. + * + * @param name The property to get. */ get(name: any): any; /** @@ -4872,49 +4872,49 @@ declare module dijit { * is this widget. Note that it does not return all descendants, but rather just direct children. * Analogous to Node.childNodes, * except containing widgets rather than DOMNodes. - * + * * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) * outside of this.containerNode. - * + * * Note that the array returned is a simple array. Application code should not assume * existence of methods like forEach(). - * + * */ getChildren(): any[]; /** * May be overridden to return CSS classes to associate with the date entry for the given dateObject, * for example to indicate a holiday in specified locale. - * - * @param dateObject - * @param locale Optional + * + * @param dateObject + * @param locale Optional */ getClassForDate(dateObject: Date, locale?: String): String; /** * Returns the parent widget of this widget. - * + * */ getParent(): any; /** * Sets calendar's value to today's date - * + * */ goToToday(): void; /** * May be overridden to disable certain dates in the calendar e.g. isDisabledDate=dojo.date.locale.isWeekend - * - * @param dateObject - * @param locale Optional + * + * @param dateObject + * @param locale Optional */ isDisabledDate(dateObject: Date, locale?: String): boolean; /** * Return true if this widget can currently be focused * and false if not - * + * */ isFocusable(): any; /** * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) - * + * */ isLeftToRight(): any; /** @@ -4922,9 +4922,9 @@ declare module dijit { * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). * Note that the function is not run in any particular scope, so if (for example) you want it to run in the * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). - * - * @param type Name of event (ex: "click") or extension event like touch.press. - * @param func + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func */ on(type: String, func: Function): any; /** @@ -4932,15 +4932,15 @@ declare module dijit { * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). * Note that the function is not run in any particular scope, so if (for example) you want it to run in the * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). - * - * @param type Name of event (ex: "click") or extension event like touch.press. - * @param func + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func */ on(type: Function, func: Function): any; /** * Track specified handles and remove/destroy them when this instance is destroyed, unless they were * already removed/destroyed manually. - * + * */ own(): any; /** @@ -4949,9 +4949,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: String): any; /** @@ -4960,9 +4960,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: String): any; /** @@ -4971,9 +4971,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: String): any; /** @@ -4982,9 +4982,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: number): any; /** @@ -4993,9 +4993,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: number): any; /** @@ -5004,13 +5004,13 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: number): any; /** - * + * */ postCreate(): void; /** @@ -5018,55 +5018,55 @@ declare module dijit { * but before the widget template is instantiated. Especially * useful to set properties that are referenced in the widget * template. - * + * */ postMixInProperties(): void; /** * Set a property on a widget * Sets named properties on a widget which may potentially be handled by a * setter in the widget. - * + * * For example, if the widget has properties foo and bar * and a method named _setFooAttr(), calling * myWidget.set("foo", "Howdy!") would be equivalent to calling * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) * would be equivalent to the statement widget.bar = 3; - * + * * set() may also be called with a hash of name/value pairs, ex: - * + * * myWidget.set({ * foo: "Howdy", * bar: 3 * }); * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) - * - * @param name The property to set. - * @param value The value to set in the property. + * + * @param name The property to set. + * @param value The value to set in the property. */ set(name: any, value: any): any; /** * Processing after the DOM fragment is added to the document * Called after a widget and its children have been created and added to the page, * and all related widgets have finished their create() cycle, up through postCreate(). - * + * * Note that startup() may be called while the widget is still hidden, for example if the widget is * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. * For widgets that need to do layout, it's best to put that layout code inside resize(), and then * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. - * + * */ startup(): void; /** * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. - * + * * Subscribes to the specified topic and calls the specified method * of this object and registers for unsubscribe() on widget destroy. - * + * * Provide widget-specific analog to dojo.subscribe, except with the * implicit use of this widget as the target object. - * - * @param t The topic - * @param method The callback + * + * @param t The topic + * @param method The callback */ subscribe(t: String, method: Function): any; /** @@ -5074,29 +5074,29 @@ declare module dijit { * When a widget is cast to a string, this method will be used to generate the * output. Currently, it does not implement any sort of reversible * serialization. - * + * */ toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. - * + * */ uninitialize(): boolean; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Unsubscribes handle created by this.subscribe. * Also removes handle from this widget's list of subscriptions - * - * @param handle + * + * @param handle */ unsubscribe(handle: Object): void; /** * Watches a property for changes - * - * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched - * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; /** @@ -5106,8 +5106,8 @@ declare module dijit { getCachedTemplate(): any; /** * Called only when the selected date has changed - * - * @param date + * + * @param date */ onChange(date: Date): void; } @@ -5117,60 +5117,60 @@ declare module dijit { * * Displays name of current month padded to the width of the month * w/the longest name, so that changing months doesn't change width. - * + * * Create as: - * + * * new Calendar._MonthWidget({ * lang: ..., * dateLocaleModule: ... * }) - * - * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. - * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree */ class _MonthWidget extends dijit._WidgetBase { constructor(params?: Object, srcNodeRef?: HTMLElement); /** * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute * for each XXX attribute to be mapped to the DOM. - * + * * attributeMap sets up a "binding" between attributes (aka properties) * of the widget and the widget's DOM. * Changes to widget attributes listed in attributeMap will be * reflected into the DOM. - * + * * For example, calling set('title', 'hello') * on a TitlePane will automatically cause the TitlePane's DOM to update * with the new title. - * + * * attributeMap is a hash where the key is an attribute of the widget, * and the value reflects a binding to a: - * + * * DOM node attribute * focus: {node: "focusNode", type: "attribute"} * Maps this.focus to this.focusNode.focus - * + * * DOM node innerHTML * title: { node: "titleNode", type: "innerHTML" } * Maps this.title to this.titleNode.innerHTML - * + * * DOM node innerText * title: { node: "titleNode", type: "innerText" } * Maps this.title to this.titleNode.innerText - * + * * DOM node CSS class * myClass: { node: "domNode", type: "class" } * Maps this.myClass to this.domNode.className - * + * * If the value is an array, then each element in the array matches one of the * formats of the above list. - * + * * There are also some shorthands for backwards compatibility: - * + * * string --> { node: string, type: "attribute" }, for example: * "focusNode" ---> { node: "focusNode", type: "attribute" } * "" --> { node: "domNode", type: "attribute" } - * + * */ "attributeMap": Object; set(property:"attributeMap", value: Object): void; @@ -5179,14 +5179,14 @@ declare module dijit { /** * Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate * widget state. - * + * */ "baseClass": string; set(property:"baseClass", value: string): void; get(property:"baseClass"): string; watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "class": string; set(property:"class", value: string): void; @@ -5196,24 +5196,24 @@ declare module dijit { * Designates where children of the source DOM node will be placed. * "Children" in this case refers to both DOM nodes and widgets. * For example, for myWidget: - * + * *
* here's a plain DOM node * and a widget * and another plain DOM node *
* containerNode would point to: - * + * * here's a plain DOM node * and a widget * and another plain DOM node * In templated widgets, "containerNode" is set via a * data-dojo-attach-point assignment. - * + * * containerNode must be defined for any widget that accepts innerHTML * (like ContentPane or BorderContainer or even Button), and conversely * is null for widgets that don't, like TextBox. - * + * */ "containerNode": HTMLElement; set(property:"containerNode", value: HTMLElement): void; @@ -5223,7 +5223,7 @@ declare module dijit { * Bi-directional support, as defined by the HTML DIR * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's * default direction. - * + * */ "dir": string; set(property:"dir", value: string): void; @@ -5234,7 +5234,7 @@ declare module dijit { * Nodes may by assigned to other properties, usually through the * template system's data-dojo-attach-point syntax, but the domNode * property is the canonical "top level" node in widget UI. - * + * */ "domNode": HTMLElement; set(property:"domNode", value: HTMLElement): void; @@ -5245,7 +5245,7 @@ declare module dijit { * system. If the developer passes an ID which is known not to be * unique, the specified ID is ignored and the system-generated ID is * used instead. - * + * */ "id": string; set(property:"id", value: string): void; @@ -5256,7 +5256,7 @@ declare module dijit { * as defined by the HTML LANG attribute. * Value must be among the list of locales specified during by the Dojo bootstrap, * formatted according to RFC 3066 (like en-us). - * + * */ "lang": string; set(property:"lang", value: string): void; @@ -5265,7 +5265,7 @@ declare module dijit { /** * The document this widget belongs to. If not specified to constructor, will default to * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global - * + * */ "ownerDocument": Object; set(property:"ownerDocument", value: Object): void; @@ -5273,7 +5273,7 @@ declare module dijit { watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * pointer to original DOM node - * + * */ "srcNodeRef": HTMLElement; set(property:"srcNodeRef", value: HTMLElement): void; @@ -5281,7 +5281,7 @@ declare module dijit { watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** * HTML style attributes as cssText string or name/value hash - * + * */ "style": string; set(property:"style", value: string): void; @@ -5289,14 +5289,14 @@ declare module dijit { watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * HTML title attribute. - * + * * For form widgets this specifies a tooltip to display when hovering over * the widget (just like the native HTML title attribute). - * + * * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's * interpreted as HTML. - * + * */ "title": string; set(property:"title", value: string): void; @@ -5305,7 +5305,7 @@ declare module dijit { /** * When this widget's title attribute is used to for a tab label, accordion pane title, etc., * this specifies the tooltip to appear when the mouse is hovered over that text. - * + * */ "tooltip": string; set(property:"tooltip", value: string): void; @@ -5314,165 +5314,165 @@ declare module dijit { /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. - * + * */ buildRendering(): void; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: Function): any; /** * Wrapper to setTimeout to avoid deferred functions executing * after the originating widget has been destroyed. * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). - * - * @param fcn Function reference. - * @param delay OptionalDelay, defaults to 0. + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. */ defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). - * + * * This method will also destroy internal widgets such as those created from a template, * assuming those widgets exist inside of this.domNode but outside of this.containerNode. - * + * * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not * depend on the current ability to destroy a widget without destroying its descendants. Generally * they should use destroyRecursive() for widgets with children. - * - * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets */ destroy(preserveDom?: boolean): void; /** * Recursively destroy the children of this widget and their * descendants. - * - * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. */ destroyDescendants(preserveDom?: boolean): void; /** @@ -5480,36 +5480,36 @@ declare module dijit { * This is the generic "destructor" function that all widget users * should call to cleanly discard with a widget. Once a widget is * destroyed, it is removed from the manager object. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. */ destroyRecursive(preserveDom?: boolean): void; /** * Destroys the DOM nodes associated with this widget. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. */ destroyRendering(preserveDom?: boolean): void; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Disconnects handle created by connect. - * - * @param handle + * + * @param handle */ disconnect(handle: any): void; /** * Used by widgets to signal that a synthetic event occurred, ex: - * + * * myWidget.emit("attrmodified-selectedChildWidget", {}). * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. * Also calls onType() method, if present, and returns value from that method. * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). - * - * @param type - * @param eventObj Optional - * @param callbackArgs Optional + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional */ emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** @@ -5517,15 +5517,15 @@ declare module dijit { * Get a named property from a widget. The property may * potentially be retrieved via a getter method. If no getter is defined, this * just retrieves the object's property. - * + * * For example, if the widget has properties foo and bar * and a method named _getFooAttr(), calling: * myWidget.get("foo") would be equivalent to calling * widget._getFooAttr() and myWidget.get("bar") * would be equivalent to the expression * widget.bar2 - * - * @param name The property to get. + * + * @param name The property to get. */ get(name: any): any; /** @@ -5533,29 +5533,29 @@ declare module dijit { * is this widget. Note that it does not return all descendants, but rather just direct children. * Analogous to Node.childNodes, * except containing widgets rather than DOMNodes. - * + * * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) * outside of this.containerNode. - * + * * Note that the array returned is a simple array. Application code should not assume * existence of methods like forEach(). - * + * */ getChildren(): any[]; /** * Returns the parent widget of this widget. - * + * */ getParent(): any; /** * Return true if this widget can currently be focused * and false if not - * + * */ isFocusable(): any; /** * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) - * + * */ isLeftToRight(): any; /** @@ -5563,9 +5563,9 @@ declare module dijit { * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). * Note that the function is not run in any particular scope, so if (for example) you want it to run in the * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). - * - * @param type Name of event (ex: "click") or extension event like touch.press. - * @param func + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func */ on(type: String, func: Function): any; /** @@ -5573,15 +5573,15 @@ declare module dijit { * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). * Note that the function is not run in any particular scope, so if (for example) you want it to run in the * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). - * - * @param type Name of event (ex: "click") or extension event like touch.press. - * @param func + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func */ on(type: Function, func: Function): any; /** * Track specified handles and remove/destroy them when this instance is destroyed, unless they were * already removed/destroyed manually. - * + * */ own(): any; /** @@ -5590,9 +5590,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: String): any; /** @@ -5601,9 +5601,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: String): any; /** @@ -5612,9 +5612,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: String): any; /** @@ -5623,9 +5623,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: number): any; /** @@ -5634,9 +5634,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: number): any; /** @@ -5645,9 +5645,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: number): any; /** @@ -5655,7 +5655,7 @@ declare module dijit { * Called after the DOM fragment has been created, but not necessarily * added to the document. Do not include any operations which rely on * node dimensions or placement. - * + * */ postCreate(): void; /** @@ -5663,55 +5663,55 @@ declare module dijit { * but before the widget template is instantiated. Especially * useful to set properties that are referenced in the widget * template. - * + * */ postMixInProperties(): void; /** * Set a property on a widget * Sets named properties on a widget which may potentially be handled by a * setter in the widget. - * + * * For example, if the widget has properties foo and bar * and a method named _setFooAttr(), calling * myWidget.set("foo", "Howdy!") would be equivalent to calling * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) * would be equivalent to the statement widget.bar = 3; - * + * * set() may also be called with a hash of name/value pairs, ex: - * + * * myWidget.set({ * foo: "Howdy", * bar: 3 * }); * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) - * - * @param name The property to set. - * @param value The value to set in the property. + * + * @param name The property to set. + * @param value The value to set in the property. */ set(name: any, value: any): any; /** * Processing after the DOM fragment is added to the document * Called after a widget and its children have been created and added to the page, * and all related widgets have finished their create() cycle, up through postCreate(). - * + * * Note that startup() may be called while the widget is still hidden, for example if the widget is * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. * For widgets that need to do layout, it's best to put that layout code inside resize(), and then * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. - * + * */ startup(): void; /** * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. - * + * * Subscribes to the specified topic and calls the specified method * of this object and registers for unsubscribe() on widget destroy. - * + * * Provide widget-specific analog to dojo.subscribe, except with the * implicit use of this widget as the target object. - * - * @param t The topic - * @param method The callback + * + * @param t The topic + * @param method The callback */ subscribe(t: String, method: Function): any; /** @@ -5719,29 +5719,29 @@ declare module dijit { * When a widget is cast to a string, this method will be used to generate the * output. Currently, it does not implement any sort of reversible * serialization. - * + * */ toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. - * + * */ uninitialize(): boolean; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Unsubscribes handle created by this.subscribe. * Also removes handle from this widget's list of subscriptions - * - * @param handle + * + * @param handle */ unsubscribe(handle: Object): void; /** * Watches a property for changes - * - * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched - * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; } @@ -5752,53 +5752,53 @@ declare module dijit { * * The Declaration widget allows a developer to declare new widget * classes directly from a snippet of markup. - * - * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. - * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree */ class Declaration extends dijit._Widget { constructor(params?: Object, srcNodeRef?: HTMLElement); /** * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute * for each XXX attribute to be mapped to the DOM. - * + * * attributeMap sets up a "binding" between attributes (aka properties) * of the widget and the widget's DOM. * Changes to widget attributes listed in attributeMap will be * reflected into the DOM. - * + * * For example, calling set('title', 'hello') * on a TitlePane will automatically cause the TitlePane's DOM to update * with the new title. - * + * * attributeMap is a hash where the key is an attribute of the widget, * and the value reflects a binding to a: - * + * * DOM node attribute * focus: {node: "focusNode", type: "attribute"} * Maps this.focus to this.focusNode.focus - * + * * DOM node innerHTML * title: { node: "titleNode", type: "innerHTML" } * Maps this.title to this.titleNode.innerHTML - * + * * DOM node innerText * title: { node: "titleNode", type: "innerText" } * Maps this.title to this.titleNode.innerText - * + * * DOM node CSS class * myClass: { node: "domNode", type: "class" } * Maps this.myClass to this.domNode.className - * + * * If the value is an array, then each element in the array matches one of the * formats of the above list. - * + * * There are also some shorthands for backwards compatibility: - * + * * string --> { node: string, type: "attribute" }, for example: * "focusNode" ---> { node: "focusNode", type: "attribute" } * "" --> { node: "domNode", type: "attribute" } - * + * */ "attributeMap": Object; set(property:"attributeMap", value: Object): void; @@ -5807,14 +5807,14 @@ declare module dijit { /** * Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate * widget state. - * + * */ "baseClass": string; set(property:"baseClass", value: string): void; get(property:"baseClass"): string; watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "class": string; set(property:"class", value: string): void; @@ -5824,31 +5824,31 @@ declare module dijit { * Designates where children of the source DOM node will be placed. * "Children" in this case refers to both DOM nodes and widgets. * For example, for myWidget: - * + * *
* here's a plain DOM node * and a widget * and another plain DOM node *
* containerNode would point to: - * + * * here's a plain DOM node * and a widget * and another plain DOM node * In templated widgets, "containerNode" is set via a * data-dojo-attach-point assignment. - * + * * containerNode must be defined for any widget that accepts innerHTML * (like ContentPane or BorderContainer or even Button), and conversely * is null for widgets that don't, like TextBox. - * + * */ "containerNode": HTMLElement; set(property:"containerNode", value: HTMLElement): void; get(property:"containerNode"): HTMLElement; watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** - * + * */ "defaults": Object; set(property:"defaults", value: Object): void; @@ -5858,7 +5858,7 @@ declare module dijit { * Bi-directional support, as defined by the HTML DIR * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's * default direction. - * + * */ "dir": string; set(property:"dir", value: string): void; @@ -5869,7 +5869,7 @@ declare module dijit { * Nodes may by assigned to other properties, usually through the * template system's data-dojo-attach-point syntax, but the domNode * property is the canonical "top level" node in widget UI. - * + * */ "domNode": HTMLElement; set(property:"domNode", value: HTMLElement): void; @@ -5878,7 +5878,7 @@ declare module dijit { /** * This widget or a widget it contains has focus, or is "active" because * it was recently clicked. - * + * */ "focused": boolean; set(property:"focused", value: boolean): void; @@ -5889,7 +5889,7 @@ declare module dijit { * system. If the developer passes an ID which is known not to be * unique, the specified ID is ignored and the system-generated ID is * used instead. - * + * */ "id": string; set(property:"id", value: string): void; @@ -5900,7 +5900,7 @@ declare module dijit { * as defined by the HTML LANG attribute. * Value must be among the list of locales specified during by the Dojo bootstrap, * formatted according to RFC 3066 (like en-us). - * + * */ "lang": string; set(property:"lang", value: string): void; @@ -5909,7 +5909,7 @@ declare module dijit { /** * List containing the prototype for this widget, and also any mixins, * ex: ["dijit._Widget", "dijit._Container"] - * + * */ "mixins": Object; set(property:"mixins", value: Object): void; @@ -5918,7 +5918,7 @@ declare module dijit { /** * The document this widget belongs to. If not specified to constructor, will default to * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global - * + * */ "ownerDocument": Object; set(property:"ownerDocument", value: Object): void; @@ -5926,7 +5926,7 @@ declare module dijit { watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * pointer to original DOM node - * + * */ "srcNodeRef": HTMLElement; set(property:"srcNodeRef", value: HTMLElement): void; @@ -5934,7 +5934,7 @@ declare module dijit { watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** * HTML style attributes as cssText string or name/value hash - * + * */ "style": string; set(property:"style", value: string): void; @@ -5942,14 +5942,14 @@ declare module dijit { watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * HTML title attribute. - * + * * For form widgets this specifies a tooltip to display when hovering over * the widget (just like the native HTML title attribute). - * + * * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's * interpreted as HTML. - * + * */ "title": string; set(property:"title", value: string): void; @@ -5958,7 +5958,7 @@ declare module dijit { /** * When this widget's title attribute is used to for a tab label, accordion pane title, etc., * this specifies the tooltip to appear when the mouse is hovered over that text. - * + * */ "tooltip": string; set(property:"tooltip", value: string): void; @@ -5966,7 +5966,7 @@ declare module dijit { watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Name of class being declared, ex: "acme.myWidget" - * + * */ "widgetClass": string; set(property:"widgetClass", value: string): void; @@ -5974,178 +5974,178 @@ declare module dijit { watch(property:"widgetClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: Object, value?: Object): any; /** - * + * */ buildRendering(): void; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: Function): any; /** * Wrapper to setTimeout to avoid deferred functions executing * after the originating widget has been destroyed. * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). - * - * @param fcn Function reference. - * @param delay OptionalDelay, defaults to 0. + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. */ defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). - * + * * This method will also destroy internal widgets such as those created from a template, * assuming those widgets exist inside of this.domNode but outside of this.containerNode. - * + * * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not * depend on the current ability to destroy a widget without destroying its descendants. Generally * they should use destroyRecursive() for widgets with children. - * - * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets */ destroy(preserveDom?: boolean): void; /** * Recursively destroy the children of this widget and their * descendants. - * - * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. */ destroyDescendants(preserveDom?: boolean): void; /** @@ -6153,36 +6153,36 @@ declare module dijit { * This is the generic "destructor" function that all widget users * should call to cleanly discard with a widget. Once a widget is * destroyed, it is removed from the manager object. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. */ destroyRecursive(preserveDom?: boolean): void; /** * Destroys the DOM nodes associated with this widget. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. */ destroyRendering(preserveDom?: boolean): void; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Disconnects handle created by connect. - * - * @param handle + * + * @param handle */ disconnect(handle: any): void; /** * Used by widgets to signal that a synthetic event occurred, ex: - * + * * myWidget.emit("attrmodified-selectedChildWidget", {}). * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. * Also calls onType() method, if present, and returns value from that method. * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). - * - * @param type - * @param eventObj Optional - * @param callbackArgs Optional + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional */ emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** @@ -6190,15 +6190,15 @@ declare module dijit { * Get a named property from a widget. The property may * potentially be retrieved via a getter method. If no getter is defined, this * just retrieves the object's property. - * + * * For example, if the widget has properties foo and bar * and a method named _getFooAttr(), calling: * myWidget.get("foo") would be equivalent to calling * widget._getFooAttr() and myWidget.get("bar") * would be equivalent to the expression * widget.bar2 - * - * @param name The property to get. + * + * @param name The property to get. */ get(name: any): any; /** @@ -6206,54 +6206,54 @@ declare module dijit { * is this widget. Note that it does not return all descendants, but rather just direct children. * Analogous to Node.childNodes, * except containing widgets rather than DOMNodes. - * + * * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) * outside of this.containerNode. - * + * * Note that the array returned is a simple array. Application code should not assume * existence of methods like forEach(). - * + * */ getChildren(): any[]; /** * Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. * This method should generally be avoided as it returns widgets declared in templates, which are * supposed to be internal/hidden, but it's left here for back-compat reasons. - * + * */ getDescendants(): any[]; /** * Returns the parent widget of this widget. - * + * */ getParent(): any; /** * Return true if this widget can currently be focused * and false if not - * + * */ isFocusable(): any; /** * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) - * + * */ isLeftToRight(): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: String, func: Function): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: Function, func: Function): any; /** * Track specified handles and remove/destroy them when this instance is destroyed, unless they were * already removed/destroyed manually. - * + * */ own(): any; /** @@ -6262,9 +6262,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: String): any; /** @@ -6273,9 +6273,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: String): any; /** @@ -6284,9 +6284,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: String): any; /** @@ -6295,9 +6295,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: number): any; /** @@ -6306,9 +6306,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: number): any; /** @@ -6317,13 +6317,13 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: number): any; /** - * + * */ postCreate(): void; /** @@ -6331,62 +6331,62 @@ declare module dijit { * but before the widget template is instantiated. Especially * useful to set properties that are referenced in the widget * template. - * + * */ postMixInProperties(): void; /** * Set a property on a widget * Sets named properties on a widget which may potentially be handled by a * setter in the widget. - * + * * For example, if the widget has properties foo and bar * and a method named _setFooAttr(), calling * myWidget.set("foo", "Howdy!") would be equivalent to calling * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) * would be equivalent to the statement widget.bar = 3; - * + * * set() may also be called with a hash of name/value pairs, ex: - * + * * myWidget.set({ * foo: "Howdy", * bar: 3 * }); * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) - * - * @param name The property to set. - * @param value The value to set in the property. + * + * @param name The property to set. + * @param value The value to set in the property. */ set(name: any, value: any): any; /** * Deprecated. Use set() instead. - * - * @param attr - * @param value + * + * @param attr + * @param value */ setAttribute(attr: String, value: any): void; /** * Processing after the DOM fragment is added to the document * Called after a widget and its children have been created and added to the page, * and all related widgets have finished their create() cycle, up through postCreate(). - * + * * Note that startup() may be called while the widget is still hidden, for example if the widget is * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. * For widgets that need to do layout, it's best to put that layout code inside resize(), and then * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. - * + * */ startup(): void; /** * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. - * + * * Subscribes to the specified topic and calls the specified method * of this object and registers for unsubscribe() on widget destroy. - * + * * Provide widget-specific analog to dojo.subscribe, except with the * implicit use of this widget as the target object. - * - * @param t The topic - * @param method The callback + * + * @param t The topic + * @param method The callback */ subscribe(t: String, method: Function): any; /** @@ -6394,29 +6394,29 @@ declare module dijit { * When a widget is cast to a string, this method will be used to generate the * output. Currently, it does not implement any sort of reversible * serialization. - * + * */ toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. - * + * */ uninitialize(): boolean; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Unsubscribes handle created by this.subscribe. * Also removes handle from this widget's list of subscriptions - * - * @param handle + * + * @param handle */ unsubscribe(handle: Object): void; /** * Watches a property for changes - * - * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched - * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; /** @@ -6424,114 +6424,114 @@ declare module dijit { * focus moved to something outside of it, or the user * clicked somewhere outside of it, or the widget was * hidden. - * + * */ onBlur(): void; /** * Connect to this function to receive notifications of mouse click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onClick(event: any): void; /** * Called when this widget is being displayed as a popup (ex: a Calendar popped * up from a DateTextBox), and it is hidden. * This is called from the dijit.popup code, and should not be called directly. - * + * * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. * Callback if a user tries to close the child. Child will be closed if this function returns true. - * + * */ onClose(): boolean; /** * Connect to this function to receive notifications of mouse double click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onDblClick(event: any): void; /** * Called when the widget becomes "active" because * it or a widget inside of it either has focus, or has recently * been clicked. - * + * */ onFocus(): void; /** * Called when another widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onHide(): void; /** * Connect to this function to receive notifications of keys being pressed down. - * - * @param event key Event + * + * @param event key Event */ onKeyDown(event: any): void; /** * Connect to this function to receive notifications of printable keys being typed. - * - * @param event key Event + * + * @param event key Event */ onKeyPress(event: any): void; /** * Connect to this function to receive notifications of keys being released. - * - * @param event key Event + * + * @param event key Event */ onKeyUp(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is pressed down. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseDown(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseEnter(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseLeave(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseMove(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOut(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOver(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is released. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseUp(event: any): void; /** * Called when this widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onShow(): void; } @@ -6540,26 +6540,26 @@ declare module dijit { * * A simple GUI for choosing a date in the context of a monthly calendar. * See CalendarLite for general description. Calendar extends CalendarLite, adding: - * + * * month drop down list * keyboard navigation * CSS classes for hover/mousepress on date, month, and year nodes * support of deprecated methods (will be removed in 2.0) - * - * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. - * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree */ class Calendar extends dijit.CalendarLite implements dijit._Widget, dijit._CssStateMixin { constructor(params?: Object, srcNodeRef?: HTMLElement); /** * Custom press, release, and click synthetic events * which trigger on a left mouse click, touch, or space/enter keyup. - * + * */ "a11yclick": Object; /** * True if mouse was pressed while over this widget, and hasn't been released yet - * + * */ "active": boolean; set(property:"active", value: boolean): void; @@ -6568,7 +6568,7 @@ declare module dijit { /** * Object to which attach points and events will be scoped. Defaults * to 'this'. - * + * */ "attachScope": Object; set(property:"attachScope", value: Object): void; @@ -6577,58 +6577,58 @@ declare module dijit { /** * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute * for each XXX attribute to be mapped to the DOM. - * + * * attributeMap sets up a "binding" between attributes (aka properties) * of the widget and the widget's DOM. * Changes to widget attributes listed in attributeMap will be * reflected into the DOM. - * + * * For example, calling set('title', 'hello') * on a TitlePane will automatically cause the TitlePane's DOM to update * with the new title. - * + * * attributeMap is a hash where the key is an attribute of the widget, * and the value reflects a binding to a: - * + * * DOM node attribute * focus: {node: "focusNode", type: "attribute"} * Maps this.focus to this.focusNode.focus - * + * * DOM node innerHTML * title: { node: "titleNode", type: "innerHTML" } * Maps this.title to this.titleNode.innerHTML - * + * * DOM node innerText * title: { node: "titleNode", type: "innerText" } * Maps this.title to this.titleNode.innerText - * + * * DOM node CSS class * myClass: { node: "domNode", type: "class" } * Maps this.myClass to this.domNode.className - * + * * If the value is an array, then each element in the array matches one of the * formats of the above list. - * + * * There are also some shorthands for backwards compatibility: - * + * * string --> { node: string, type: "attribute" }, for example: * "focusNode" ---> { node: "focusNode", type: "attribute" } * "" --> { node: "domNode", type: "attribute" } - * + * */ "attributeMap": Object; set(property:"attributeMap", value: Object): void; get(property:"attributeMap"): Object; watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** - * + * */ "baseClass": string; set(property:"baseClass", value: string): void; get(property:"baseClass"): string; watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "class": string; set(property:"class", value: string): void; @@ -6638,31 +6638,31 @@ declare module dijit { * Designates where children of the source DOM node will be placed. * "Children" in this case refers to both DOM nodes and widgets. * For example, for myWidget: - * + * *
* here's a plain DOM node * and a widget * and another plain DOM node *
* containerNode would point to: - * + * * here's a plain DOM node * and a widget * and another plain DOM node * In templated widgets, "containerNode" is set via a * data-dojo-attach-point assignment. - * + * * containerNode must be defined for any widget that accepts innerHTML * (like ContentPane or BorderContainer or even Button), and conversely * is null for widgets that don't, like TextBox. - * + * */ "containerNode": HTMLElement; set(property:"containerNode", value: HTMLElement): void; get(property:"containerNode"): HTMLElement; watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** - * + * */ "cssStateNodes": Object; set(property:"cssStateNodes", value: Object): void; @@ -6672,7 +6672,7 @@ declare module dijit { * Date object containing the currently focused date, or the date which would be focused * if the calendar itself was focused. Also indicates which year and month to display, * i.e. the current "page" the calendar is on. - * + * */ "currentFocus": Date; set(property:"currentFocus", value: Date): void; @@ -6681,14 +6681,14 @@ declare module dijit { /** * JavaScript namespace to find calendar routines. If unspecified, uses Gregorian calendar routines * at dojo/date and dojo/date/locale. - * + * */ "datePackage": string; set(property:"datePackage", value: string): void; get(property:"datePackage"): string; watch(property:"datePackage", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "dateTemplateString": string; set(property:"dateTemplateString", value: string): void; @@ -6696,7 +6696,7 @@ declare module dijit { watch(property:"dateTemplateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * How to represent the days of the week in the calendar header. See locale - * + * */ "dayWidth": string; set(property:"dayWidth", value: string): void; @@ -6706,7 +6706,7 @@ declare module dijit { * Bi-directional support, as defined by the HTML DIR * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's * default direction. - * + * */ "dir": string; set(property:"dir", value: string): void; @@ -6717,14 +6717,14 @@ declare module dijit { * Nodes may by assigned to other properties, usually through the * template system's data-dojo-attach-point syntax, but the domNode * property is the canonical "top level" node in widget UI. - * + * */ "domNode": HTMLElement; set(property:"domNode", value: HTMLElement): void; get(property:"domNode"): HTMLElement; watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** - * + * */ "dowTemplateString": string; set(property:"dowTemplateString", value: string): void; @@ -6732,7 +6732,7 @@ declare module dijit { watch(property:"dowTemplateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Defines a type of widget. - * + * */ "dndType": string; set(property:"dndType", value: string): void; @@ -6741,7 +6741,7 @@ declare module dijit { /** * This widget or a widget it contains has focus, or is "active" because * it was recently clicked. - * + * */ "focused": boolean; set(property:"focused", value: boolean): void; @@ -6749,7 +6749,7 @@ declare module dijit { watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * True if cursor is over this widget - * + * */ "hovering": boolean; set(property:"hovering", value: boolean): void; @@ -6760,7 +6760,7 @@ declare module dijit { * system. If the developer passes an ID which is known not to be * unique, the specified ID is ignored and the system-generated ID is * used instead. - * + * */ "id": string; set(property:"id", value: string): void; @@ -6771,14 +6771,14 @@ declare module dijit { * as defined by the HTML LANG attribute. * Value must be among the list of locales specified during by the Dojo bootstrap, * formatted according to RFC 3066 (like en-us). - * + * */ "lang": string; set(property:"lang", value: string): void; get(property:"lang"): string; watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "observer": string; set(property:"observer", value: string): void; @@ -6787,25 +6787,25 @@ declare module dijit { /** * The document this widget belongs to. If not specified to constructor, will default to * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global - * + * */ "ownerDocument": Object; set(property:"ownerDocument", value: Object): void; get(property:"ownerDocument"): Object; watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** - * + * */ "searchContainerNode": boolean; set(property:"searchContainerNode", value: boolean): void; get(property:"searchContainerNode"): boolean; watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** - * A parameter needed by RadioGroupSlide only. An optional paramter to force + * A parameter needed by RadioGroupSlide only. An optional parameter to force * the ContentPane to slide in from a set direction. Defaults * to "random", or specify one of "top", "left", "right", "bottom" * to slideFrom top, left, right, or bottom. - * + * */ "slideFrom": string; set(property:"slideFrom", value: string): void; @@ -6813,7 +6813,7 @@ declare module dijit { watch(property:"slideFrom", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * pointer to original DOM node - * + * */ "srcNodeRef": HTMLElement; set(property:"srcNodeRef", value: HTMLElement): void; @@ -6821,7 +6821,7 @@ declare module dijit { watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** * HTML style attributes as cssText string or name/value hash - * + * */ "style": string; set(property:"style", value: string): void; @@ -6829,7 +6829,7 @@ declare module dijit { watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Order fields are traversed when user hits the tab key - * + * */ "tabIndex": string; set(property:"tabIndex", value: string): void; @@ -6838,14 +6838,14 @@ declare module dijit { /** * Path to template (HTML file) for this widget relative to dojo.baseUrl. * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead - * + * */ "templatePath": string; set(property:"templatePath", value: string): void; get(property:"templatePath"): string; watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "templateString": string; set(property:"templateString", value: string): void; @@ -6853,14 +6853,14 @@ declare module dijit { watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * HTML title attribute. - * + * * For form widgets this specifies a tooltip to display when hovering over * the widget (just like the native HTML title attribute). - * + * * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's * interpreted as HTML. - * + * */ "title": string; set(property:"title", value: string): void; @@ -6869,7 +6869,7 @@ declare module dijit { /** * When this widget's title attribute is used to for a tab label, accordion pane title, etc., * this specifies the tooltip to appear when the mouse is hovered over that text. - * + * */ "tooltip": string; set(property:"tooltip", value: string): void; @@ -6877,14 +6877,14 @@ declare module dijit { watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * The currently selected Date, initially set to invalid date to indicate no selection. - * + * */ "value": Date; set(property:"value", value: Date): void; get(property:"value"): Date; watch(property:"value", callback:{(property?:string, oldValue?:Date, newValue?: Date):void}) :{unwatch():void} /** - * + * */ "weekTemplateString": string; set(property:"weekTemplateString", value: string): void; @@ -6892,178 +6892,178 @@ declare module dijit { watch(property:"weekTemplateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: Object, value?: Object): any; /** - * + * */ buildRendering(): void; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: Function): any; /** * Wrapper to setTimeout to avoid deferred functions executing * after the originating widget has been destroyed. * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). - * - * @param fcn Function reference. - * @param delay OptionalDelay, defaults to 0. + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. */ defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). - * + * * This method will also destroy internal widgets such as those created from a template, * assuming those widgets exist inside of this.domNode but outside of this.containerNode. - * + * * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not * depend on the current ability to destroy a widget without destroying its descendants. Generally * they should use destroyRecursive() for widgets with children. - * - * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets */ destroy(preserveDom?: boolean): void; /** * Recursively destroy the children of this widget and their * descendants. - * - * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. */ destroyDescendants(preserveDom?: boolean): void; /** @@ -7071,41 +7071,41 @@ declare module dijit { * This is the generic "destructor" function that all widget users * should call to cleanly discard with a widget. Once a widget is * destroyed, it is removed from the manager object. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. */ destroyRecursive(preserveDom?: boolean): void; /** * Destroys the DOM nodes associated with this widget. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. */ destroyRendering(preserveDom?: boolean): void; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Disconnects handle created by connect. - * - * @param handle + * + * @param handle */ disconnect(handle: any): void; /** * Used by widgets to signal that a synthetic event occurred, ex: - * + * * myWidget.emit("attrmodified-selectedChildWidget", {}). * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. * Also calls onType() method, if present, and returns value from that method. * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). - * - * @param type - * @param eventObj Optional - * @param callbackArgs Optional + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional */ emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focus the calendar by focusing one of the calendar cells - * + * */ focus(): void; /** @@ -7113,15 +7113,15 @@ declare module dijit { * Get a named property from a widget. The property may * potentially be retrieved via a getter method. If no getter is defined, this * just retrieves the object's property. - * + * * For example, if the widget has properties foo and bar * and a method named _getFooAttr(), calling: * myWidget.get("foo") would be equivalent to calling * widget._getFooAttr() and myWidget.get("bar") * would be equivalent to the expression * widget.bar2 - * - * @param name The property to get. + * + * @param name The property to get. */ get(name: any): any; /** @@ -7129,38 +7129,38 @@ declare module dijit { * is this widget. Note that it does not return all descendants, but rather just direct children. * Analogous to Node.childNodes, * except containing widgets rather than DOMNodes. - * + * * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) * outside of this.containerNode. - * + * * Note that the array returned is a simple array. Application code should not assume * existence of methods like forEach(). - * + * */ getChildren(): any[]; /** * May be overridden to return CSS classes to associate with the date entry for the given dateObject, * for example to indicate a holiday in specified locale. - * - * @param dateObject - * @param locale Optional + * + * @param dateObject + * @param locale Optional */ getClassForDate(dateObject: Date, locale: String): String; /** * Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. * This method should generally be avoided as it returns widgets declared in templates, which are * supposed to be internal/hidden, but it's left here for back-compat reasons. - * + * */ getDescendants(): any[]; /** * Returns the parent widget of this widget. - * + * */ getParent(): any; /** * Sets calendar's value to today's date - * + * */ goToToday(): void; /** @@ -7168,26 +7168,26 @@ declare module dijit { * Called from _onKeyDown() to handle keydown on a stand alone Calendar, * and also from dijit/form/_DateTimeTextBox to pass a keydown event * from the dijit/form/DateTextBox to be handled in this widget - * - * @param evt + * + * @param evt */ handleKey(evt: Event): any; /** * May be overridden to disable certain dates in the calendar e.g. isDisabledDate=dojo.date.locale.isWeekend - * - * @param dateObject - * @param locale Optional + * + * @param dateObject + * @param locale Optional */ isDisabledDate(dateObject: Date, locale?: String): boolean; /** * Return true if this widget can currently be focused * and false if not - * + * */ isFocusable(): any; /** * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) - * + * */ isLeftToRight(): any; /** @@ -7195,9 +7195,9 @@ declare module dijit { * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). * Note that the function is not run in any particular scope, so if (for example) you want it to run in the * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). - * - * @param type Name of event (ex: "click") or extension event like touch.press. - * @param func + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func */ on(type: String, func: Function): any; /** @@ -7205,15 +7205,15 @@ declare module dijit { * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). * Note that the function is not run in any particular scope, so if (for example) you want it to run in the * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). - * - * @param type Name of event (ex: "click") or extension event like touch.press. - * @param func + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func */ on(type: Function, func: Function): any; /** * Track specified handles and remove/destroy them when this instance is destroyed, unless they were * already removed/destroyed manually. - * + * */ own(): any; /** @@ -7222,9 +7222,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: String): any; /** @@ -7233,9 +7233,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: String): any; /** @@ -7244,9 +7244,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: String): any; /** @@ -7255,9 +7255,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: number): any; /** @@ -7266,9 +7266,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: number): any; /** @@ -7277,13 +7277,13 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: number): any; /** - * + * */ postCreate(): void; /** @@ -7291,68 +7291,68 @@ declare module dijit { * but before the widget template is instantiated. Especially * useful to set properties that are referenced in the widget * template. - * + * */ postMixInProperties(): void; /** * Set a property on a widget * Sets named properties on a widget which may potentially be handled by a * setter in the widget. - * + * * For example, if the widget has properties foo and bar * and a method named _setFooAttr(), calling * myWidget.set("foo", "Howdy!") would be equivalent to calling * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) * would be equivalent to the statement widget.bar = 3; - * + * * set() may also be called with a hash of name/value pairs, ex: - * + * * myWidget.set({ * foo: "Howdy", * bar: 3 * }); * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) - * - * @param name The property to set. - * @param value The value to set in the property. + * + * @param name The property to set. + * @param value The value to set in the property. */ set(name: any, value: any): any; /** * Deprecated. Use set() instead. - * - * @param attr - * @param value + * + * @param attr + * @param value */ setAttribute(attr: String, value: any): void; /** * Deprecated. Use set('value', ...) instead. - * - * @param value + * + * @param value */ setValue(value: Date): void; /** * Processing after the DOM fragment is added to the document * Called after a widget and its children have been created and added to the page, * and all related widgets have finished their create() cycle, up through postCreate(). - * + * * Note that startup() may be called while the widget is still hidden, for example if the widget is * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. * For widgets that need to do layout, it's best to put that layout code inside resize(), and then * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. - * + * */ startup(): void; /** * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. - * + * * Subscribes to the specified topic and calls the specified method * of this object and registers for unsubscribe() on widget destroy. - * + * * Provide widget-specific analog to dojo.subscribe, except with the * implicit use of this widget as the target object. - * - * @param t The topic - * @param method The callback + * + * @param t The topic + * @param method The callback */ subscribe(t: String, method: Function): any; /** @@ -7360,29 +7360,29 @@ declare module dijit { * When a widget is cast to a string, this method will be used to generate the * output. Currently, it does not implement any sort of reversible * serialization. - * + * */ toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. - * + * */ uninitialize(): boolean; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Unsubscribes handle created by this.subscribe. * Also removes handle from this widget's list of subscriptions - * - * @param handle + * + * @param handle */ unsubscribe(handle: Object): void; /** * Watches a property for changes - * - * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched - * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; /** @@ -7395,127 +7395,127 @@ declare module dijit { * focus moved to something outside of it, or the user * clicked somewhere outside of it, or the widget was * hidden. - * + * */ onBlur(): void; /** - * - * @param value + * + * @param value */ onChange(value: any): void; /** * Connect to this function to receive notifications of mouse click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onClick(event: any): void; /** * Called when this widget is being displayed as a popup (ex: a Calendar popped * up from a DateTextBox), and it is hidden. * This is called from the dijit.popup code, and should not be called directly. - * + * * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. * Callback if a user tries to close the child. Child will be closed if this function returns true. - * + * */ onClose(): boolean; /** * Connect to this function to receive notifications of mouse double click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onDblClick(event: any): void; /** * Called when the widget becomes "active" because * it or a widget inside of it either has focus, or has recently * been clicked. - * + * */ onFocus(): void; /** * Called when another widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onHide(): void; /** * Connect to this function to receive notifications of keys being pressed down. - * - * @param event key Event + * + * @param event key Event */ onKeyDown(event: any): void; /** * Connect to this function to receive notifications of printable keys being typed. - * - * @param event key Event + * + * @param event key Event */ onKeyPress(event: any): void; /** * Connect to this function to receive notifications of keys being released. - * - * @param event key Event + * + * @param event key Event */ onKeyUp(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is pressed down. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseDown(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseEnter(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseLeave(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseMove(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOut(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOver(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is released. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseUp(event: any): void; /** * Called when this widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onShow(): void; /** * Deprecated. Notification that a date cell was selected. It may be the same as the previous value. * Formerly used by dijit/form/_DateTimeTextBox (and thus dijit/form/DateTextBox) * to get notification when the user has clicked a date. Now onExecute() (above) is used. - * - * @param date + * + * @param date */ onValueSelected(date: Date): void; } @@ -7524,16 +7524,16 @@ declare module dijit { * Permalink: http://dojotoolkit.org/api/1.9/dijit/Calendar._MonthDropDown.html * * The list-of-months drop down from the MonthDropDownButton - * - * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. - * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree */ class _MonthDropDown extends dijit._Widget implements dijit._TemplatedMixin { constructor(params?: Object, srcNodeRef?: HTMLElement); /** * Object to which attach points and events will be scoped. Defaults * to 'this'. - * + * */ "attachScope": Object; set(property:"attachScope", value: Object): void; @@ -7542,44 +7542,44 @@ declare module dijit { /** * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute * for each XXX attribute to be mapped to the DOM. - * + * * attributeMap sets up a "binding" between attributes (aka properties) * of the widget and the widget's DOM. * Changes to widget attributes listed in attributeMap will be * reflected into the DOM. - * + * * For example, calling set('title', 'hello') * on a TitlePane will automatically cause the TitlePane's DOM to update * with the new title. - * + * * attributeMap is a hash where the key is an attribute of the widget, * and the value reflects a binding to a: - * + * * DOM node attribute * focus: {node: "focusNode", type: "attribute"} * Maps this.focus to this.focusNode.focus - * + * * DOM node innerHTML * title: { node: "titleNode", type: "innerHTML" } * Maps this.title to this.titleNode.innerHTML - * + * * DOM node innerText * title: { node: "titleNode", type: "innerText" } * Maps this.title to this.titleNode.innerText - * + * * DOM node CSS class * myClass: { node: "domNode", type: "class" } * Maps this.myClass to this.domNode.className - * + * * If the value is an array, then each element in the array matches one of the * formats of the above list. - * + * * There are also some shorthands for backwards compatibility: - * + * * string --> { node: string, type: "attribute" }, for example: * "focusNode" ---> { node: "focusNode", type: "attribute" } * "" --> { node: "domNode", type: "attribute" } - * + * */ "attributeMap": Object; set(property:"attributeMap", value: Object): void; @@ -7588,14 +7588,14 @@ declare module dijit { /** * Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate * widget state. - * + * */ "baseClass": string; set(property:"baseClass", value: string): void; get(property:"baseClass"): string; watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "class": string; set(property:"class", value: string): void; @@ -7605,24 +7605,24 @@ declare module dijit { * Designates where children of the source DOM node will be placed. * "Children" in this case refers to both DOM nodes and widgets. * For example, for myWidget: - * + * *
* here's a plain DOM node * and a widget * and another plain DOM node *
* containerNode would point to: - * + * * here's a plain DOM node * and a widget * and another plain DOM node * In templated widgets, "containerNode" is set via a * data-dojo-attach-point assignment. - * + * * containerNode must be defined for any widget that accepts innerHTML * (like ContentPane or BorderContainer or even Button), and conversely * is null for widgets that don't, like TextBox. - * + * */ "containerNode": HTMLElement; set(property:"containerNode", value: HTMLElement): void; @@ -7632,7 +7632,7 @@ declare module dijit { * Bi-directional support, as defined by the HTML DIR * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's * default direction. - * + * */ "dir": string; set(property:"dir", value: string): void; @@ -7643,7 +7643,7 @@ declare module dijit { * Nodes may by assigned to other properties, usually through the * template system's data-dojo-attach-point syntax, but the domNode * property is the canonical "top level" node in widget UI. - * + * */ "domNode": HTMLElement; set(property:"domNode", value: HTMLElement): void; @@ -7652,7 +7652,7 @@ declare module dijit { /** * This widget or a widget it contains has focus, or is "active" because * it was recently clicked. - * + * */ "focused": boolean; set(property:"focused", value: boolean): void; @@ -7663,7 +7663,7 @@ declare module dijit { * system. If the developer passes an ID which is known not to be * unique, the specified ID is ignored and the system-generated ID is * used instead. - * + * */ "id": string; set(property:"id", value: string): void; @@ -7674,7 +7674,7 @@ declare module dijit { * as defined by the HTML LANG attribute. * Value must be among the list of locales specified during by the Dojo bootstrap, * formatted according to RFC 3066 (like en-us). - * + * */ "lang": string; set(property:"lang", value: string): void; @@ -7683,7 +7683,7 @@ declare module dijit { /** * List of names of months, possibly w/some undefined entries for Hebrew leap months * (ex: ["January", "February", undefined, "April", ...]) - * + * */ "months": Object; set(property:"months", value: Object): void; @@ -7692,14 +7692,14 @@ declare module dijit { /** * The document this widget belongs to. If not specified to constructor, will default to * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global - * + * */ "ownerDocument": Object; set(property:"ownerDocument", value: Object): void; get(property:"ownerDocument"): Object; watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** - * + * */ "searchContainerNode": boolean; set(property:"searchContainerNode", value: boolean): void; @@ -7707,7 +7707,7 @@ declare module dijit { watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * pointer to original DOM node - * + * */ "srcNodeRef": HTMLElement; set(property:"srcNodeRef", value: HTMLElement): void; @@ -7715,7 +7715,7 @@ declare module dijit { watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** * HTML style attributes as cssText string or name/value hash - * + * */ "style": string; set(property:"style", value: string): void; @@ -7724,14 +7724,14 @@ declare module dijit { /** * Path to template (HTML file) for this widget relative to dojo.baseUrl. * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead - * + * */ "templatePath": string; set(property:"templatePath", value: string): void; get(property:"templatePath"): string; watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "templateString": string; set(property:"templateString", value: string): void; @@ -7739,14 +7739,14 @@ declare module dijit { watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * HTML title attribute. - * + * * For form widgets this specifies a tooltip to display when hovering over * the widget (just like the native HTML title attribute). - * + * * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's * interpreted as HTML. - * + * */ "title": string; set(property:"title", value: string): void; @@ -7755,7 +7755,7 @@ declare module dijit { /** * When this widget's title attribute is used to for a tab label, accordion pane title, etc., * this specifies the tooltip to appear when the mouse is hovered over that text. - * + * */ "tooltip": string; set(property:"tooltip", value: string): void; @@ -7763,180 +7763,180 @@ declare module dijit { watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. - * + * */ buildRendering(): void; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: Function): any; /** * Wrapper to setTimeout to avoid deferred functions executing * after the originating widget has been destroyed. * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). - * - * @param fcn Function reference. - * @param delay OptionalDelay, defaults to 0. + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. */ defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). - * + * * This method will also destroy internal widgets such as those created from a template, * assuming those widgets exist inside of this.domNode but outside of this.containerNode. - * + * * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not * depend on the current ability to destroy a widget without destroying its descendants. Generally * they should use destroyRecursive() for widgets with children. - * - * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets */ destroy(preserveDom?: boolean): void; /** * Recursively destroy the children of this widget and their * descendants. - * - * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. */ destroyDescendants(preserveDom?: boolean): void; /** @@ -7944,36 +7944,36 @@ declare module dijit { * This is the generic "destructor" function that all widget users * should call to cleanly discard with a widget. Once a widget is * destroyed, it is removed from the manager object. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. */ destroyRecursive(preserveDom?: boolean): void; /** * Destroys the DOM nodes associated with this widget. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. */ destroyRendering(preserveDom?: boolean): void; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Disconnects handle created by connect. - * - * @param handle + * + * @param handle */ disconnect(handle: any): void; /** * Used by widgets to signal that a synthetic event occurred, ex: - * + * * myWidget.emit("attrmodified-selectedChildWidget", {}). * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. * Also calls onType() method, if present, and returns value from that method. * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). - * - * @param type - * @param eventObj Optional - * @param callbackArgs Optional + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional */ emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** @@ -7981,15 +7981,15 @@ declare module dijit { * Get a named property from a widget. The property may * potentially be retrieved via a getter method. If no getter is defined, this * just retrieves the object's property. - * + * * For example, if the widget has properties foo and bar * and a method named _getFooAttr(), calling: * myWidget.get("foo") would be equivalent to calling * widget._getFooAttr() and myWidget.get("bar") * would be equivalent to the expression * widget.bar2 - * - * @param name The property to get. + * + * @param name The property to get. */ get(name: any): any; /** @@ -7997,54 +7997,54 @@ declare module dijit { * is this widget. Note that it does not return all descendants, but rather just direct children. * Analogous to Node.childNodes, * except containing widgets rather than DOMNodes. - * + * * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) * outside of this.containerNode. - * + * * Note that the array returned is a simple array. Application code should not assume * existence of methods like forEach(). - * + * */ getChildren(): any[]; /** * Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. * This method should generally be avoided as it returns widgets declared in templates, which are * supposed to be internal/hidden, but it's left here for back-compat reasons. - * + * */ getDescendants(): any[]; /** * Returns the parent widget of this widget. - * + * */ getParent(): any; /** * Return true if this widget can currently be focused * and false if not - * + * */ isFocusable(): any; /** * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) - * + * */ isLeftToRight(): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: String, func: Function): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: Function, func: Function): any; /** * Track specified handles and remove/destroy them when this instance is destroyed, unless they were * already removed/destroyed manually. - * + * */ own(): any; /** @@ -8053,9 +8053,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: String): any; /** @@ -8064,9 +8064,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: String): any; /** @@ -8075,9 +8075,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: String): any; /** @@ -8086,9 +8086,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: number): any; /** @@ -8097,9 +8097,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: number): any; /** @@ -8108,13 +8108,13 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: number): any; /** - * + * */ postCreate(): void; /** @@ -8122,62 +8122,62 @@ declare module dijit { * but before the widget template is instantiated. Especially * useful to set properties that are referenced in the widget * template. - * + * */ postMixInProperties(): void; /** * Set a property on a widget * Sets named properties on a widget which may potentially be handled by a * setter in the widget. - * + * * For example, if the widget has properties foo and bar * and a method named _setFooAttr(), calling * myWidget.set("foo", "Howdy!") would be equivalent to calling * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) * would be equivalent to the statement widget.bar = 3; - * + * * set() may also be called with a hash of name/value pairs, ex: - * + * * myWidget.set({ * foo: "Howdy", * bar: 3 * }); * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) - * - * @param name The property to set. - * @param value The value to set in the property. + * + * @param name The property to set. + * @param value The value to set in the property. */ set(name: any, value: any): any; /** * Deprecated. Use set() instead. - * - * @param attr - * @param value + * + * @param attr + * @param value */ setAttribute(attr: String, value: any): void; /** * Processing after the DOM fragment is added to the document * Called after a widget and its children have been created and added to the page, * and all related widgets have finished their create() cycle, up through postCreate(). - * + * * Note that startup() may be called while the widget is still hidden, for example if the widget is * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. * For widgets that need to do layout, it's best to put that layout code inside resize(), and then * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. - * + * */ startup(): void; /** * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. - * + * * Subscribes to the specified topic and calls the specified method * of this object and registers for unsubscribe() on widget destroy. - * + * * Provide widget-specific analog to dojo.subscribe, except with the * implicit use of this widget as the target object. - * - * @param t The topic - * @param method The callback + * + * @param t The topic + * @param method The callback */ subscribe(t: String, method: Function): any; /** @@ -8185,29 +8185,29 @@ declare module dijit { * When a widget is cast to a string, this method will be used to generate the * output. Currently, it does not implement any sort of reversible * serialization. - * + * */ toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. - * + * */ uninitialize(): boolean; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Unsubscribes handle created by this.subscribe. * Also removes handle from this widget's list of subscriptions - * - * @param handle + * + * @param handle */ unsubscribe(handle: Object): void; /** * Watches a property for changes - * - * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched - * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; /** @@ -8220,120 +8220,120 @@ declare module dijit { * focus moved to something outside of it, or the user * clicked somewhere outside of it, or the widget was * hidden. - * + * */ onBlur(): void; /** * Callback when month is selected from drop down - * - * @param month + * + * @param month */ onChange(month: number): void; /** * Connect to this function to receive notifications of mouse click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onClick(event: any): void; /** * Called when this widget is being displayed as a popup (ex: a Calendar popped * up from a DateTextBox), and it is hidden. * This is called from the dijit.popup code, and should not be called directly. - * + * * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. * Callback if a user tries to close the child. Child will be closed if this function returns true. - * + * */ onClose(): boolean; /** * Connect to this function to receive notifications of mouse double click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onDblClick(event: any): void; /** * Called when the widget becomes "active" because * it or a widget inside of it either has focus, or has recently * been clicked. - * + * */ onFocus(): void; /** * Called when another widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onHide(): void; /** * Connect to this function to receive notifications of keys being pressed down. - * - * @param event key Event + * + * @param event key Event */ onKeyDown(event: any): void; /** * Connect to this function to receive notifications of printable keys being typed. - * - * @param event key Event + * + * @param event key Event */ onKeyPress(event: any): void; /** * Connect to this function to receive notifications of keys being released. - * - * @param event key Event + * + * @param event key Event */ onKeyUp(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is pressed down. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseDown(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseEnter(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseLeave(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseMove(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOut(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOver(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is released. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseUp(event: any): void; /** * Called when this widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onShow(): void; } @@ -8342,15 +8342,15 @@ declare module dijit { * * DropDownButton for the current month. Displays name of current month * and a list of month names in the drop down - * - * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. - * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree */ class _MonthDropDownButton extends dijit.form.DropDownButton { constructor(params?: Object, srcNodeRef?: HTMLElement); /** * True if mouse was pressed while over this widget, and hasn't been released yet - * + * */ "active": boolean; set(property:"active", value: boolean): void; @@ -8358,14 +8358,14 @@ declare module dijit { watch(property:"active", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * Corresponds to the native HTML element's attribute. - * + * */ "alt": string; set(property:"alt", value: string): void; get(property:"alt"): string; watch(property:"alt", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "aria-label": string; set(property:"aria-label", value: string): void; @@ -8374,7 +8374,7 @@ declare module dijit { /** * Object to which attach points and events will be scoped. Defaults * to 'this'. - * + * */ "attachScope": Object; set(property:"attachScope", value: Object): void; @@ -8383,44 +8383,44 @@ declare module dijit { /** * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute * for each XXX attribute to be mapped to the DOM. - * + * * attributeMap sets up a "binding" between attributes (aka properties) * of the widget and the widget's DOM. * Changes to widget attributes listed in attributeMap will be * reflected into the DOM. - * + * * For example, calling set('title', 'hello') * on a TitlePane will automatically cause the TitlePane's DOM to update * with the new title. - * + * * attributeMap is a hash where the key is an attribute of the widget, * and the value reflects a binding to a: - * + * * DOM node attribute * focus: {node: "focusNode", type: "attribute"} * Maps this.focus to this.focusNode.focus - * + * * DOM node innerHTML * title: { node: "titleNode", type: "innerHTML" } * Maps this.title to this.titleNode.innerHTML - * + * * DOM node innerText * title: { node: "titleNode", type: "innerText" } * Maps this.title to this.titleNode.innerText - * + * * DOM node CSS class * myClass: { node: "domNode", type: "class" } * Maps this.myClass to this.domNode.className - * + * * If the value is an array, then each element in the array matches one of the * formats of the above list. - * + * * There are also some shorthands for backwards compatibility: - * + * * string --> { node: string, type: "attribute" }, for example: * "focusNode" ---> { node: "focusNode", type: "attribute" } * "" --> { node: "domNode", type: "attribute" } - * + * */ "attributeMap": Object; set(property:"attributeMap", value: Object): void; @@ -8430,21 +8430,21 @@ declare module dijit { * Set to true to make the drop down at least as wide as this * widget. Set to false if the drop down should just be its * default width. - * + * */ "autoWidth": boolean; set(property:"autoWidth", value: boolean): void; get(property:"autoWidth"): boolean; watch(property:"autoWidth", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** - * + * */ "baseClass": string; set(property:"baseClass", value: string): void; get(property:"baseClass"): string; watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "class": string; set(property:"class", value: string): void; @@ -8454,24 +8454,24 @@ declare module dijit { * Designates where children of the source DOM node will be placed. * "Children" in this case refers to both DOM nodes and widgets. * For example, for myWidget: - * + * *
* here's a plain DOM node * and a widget * and another plain DOM node *
* containerNode would point to: - * + * * here's a plain DOM node * and a widget * and another plain DOM node * In templated widgets, "containerNode" is set via a * data-dojo-attach-point assignment. - * + * * containerNode must be defined for any widget that accepts innerHTML * (like ContentPane or BorderContainer or even Button), and conversely * is null for widgets that don't, like TextBox. - * + * */ "containerNode": HTMLElement; set(property:"containerNode", value: HTMLElement): void; @@ -8480,18 +8480,18 @@ declare module dijit { /** * Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that * need CSS classes applied on mouse hover/press and focus. - * + * * Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name * (like "dijitUpArrowButton"). Example: - * + * * { * "upArrowButton": "dijitUpArrowButton", * "downArrowButton": "dijitDownArrowButton" * } * The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it - * + * * is hovered, etc. - * + * */ "cssStateNodes": Object; set(property:"cssStateNodes", value: Object): void; @@ -8501,7 +8501,7 @@ declare module dijit { * Bi-directional support, as defined by the HTML DIR * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's * default direction. - * + * */ "dir": string; set(property:"dir", value: string): void; @@ -8510,7 +8510,7 @@ declare module dijit { /** * Should this widget respond to user input? * In markup, this is specified as "disabled='disabled'", or just "disabled". - * + * */ "disabled": boolean; set(property:"disabled", value: boolean): void; @@ -8521,7 +8521,7 @@ declare module dijit { * Nodes may by assigned to other properties, usually through the * template system's data-dojo-attach-point syntax, but the domNode * property is the canonical "top level" node in widget UI. - * + * */ "domNode": HTMLElement; set(property:"domNode", value: HTMLElement): void; @@ -8530,7 +8530,7 @@ declare module dijit { /** * The widget to display as a popup. This widget must be * defined before the startup function is called. - * + * */ "dropDown": Object; set(property:"dropDown", value: Object): void; @@ -8539,7 +8539,7 @@ declare module dijit { /** * This variable controls the position of the drop down. * It's an array of strings with the following values: - * + * * before: places drop down to the left of the target node/widget, or to the right in * the case of RTL scripts like Hebrew and Arabic * after: places drop down to the right of the target node/widget, or to the left in @@ -8548,7 +8548,7 @@ declare module dijit { * below: drop down goes below target node * The list is positions is tried, in order, until a position is found where the drop down fits * within the viewport. - * + * */ "dropDownPosition": Object; set(property:"dropDownPosition", value: Object): void; @@ -8557,7 +8557,7 @@ declare module dijit { /** * This widget or a widget it contains has focus, or is "active" because * it was recently clicked. - * + * */ "focused": boolean; set(property:"focused", value: boolean): void; @@ -8566,7 +8566,7 @@ declare module dijit { /** * Set to true to make the drop down exactly as wide as this * widget. Overrides autoWidth. - * + * */ "forceWidth": boolean; set(property:"forceWidth", value: boolean): void; @@ -8574,7 +8574,7 @@ declare module dijit { watch(property:"forceWidth", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * True if cursor is over this widget - * + * */ "hovering": boolean; set(property:"hovering", value: boolean): void; @@ -8582,7 +8582,7 @@ declare module dijit { watch(property:"hovering", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * Class to apply to DOMNode in button to make it display an icon - * + * */ "iconClass": string; set(property:"iconClass", value: string): void; @@ -8593,7 +8593,7 @@ declare module dijit { * system. If the developer passes an ID which is known not to be * unique, the specified ID is ignored and the system-generated ID is * used instead. - * + * */ "id": string; set(property:"id", value: string): void; @@ -8601,7 +8601,7 @@ declare module dijit { watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Fires onChange for each value change or only on demand - * + * */ "intermediateChanges": boolean; set(property:"intermediateChanges", value: boolean): void; @@ -8609,7 +8609,7 @@ declare module dijit { watch(property:"intermediateChanges", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * Content to display in button. - * + * */ "label": string; set(property:"label", value: string): void; @@ -8620,7 +8620,7 @@ declare module dijit { * as defined by the HTML LANG attribute. * Value must be among the list of locales specified during by the Dojo bootstrap, * formatted according to RFC 3066 (like en-us). - * + * */ "lang": string; set(property:"lang", value: string): void; @@ -8630,7 +8630,7 @@ declare module dijit { * The max height for our dropdown. * Any dropdown taller than this will have scrollbars. * Set to 0 for no max height, or -1 to limit height to available space in viewport - * + * */ "maxHeight": number; set(property:"maxHeight", value: number): void; @@ -8638,7 +8638,7 @@ declare module dijit { watch(property:"maxHeight", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} /** * Name used when submitting form; same as "name" attribute or plain HTML elements - * + * */ "name": string; set(property:"name", value: string): void; @@ -8647,7 +8647,7 @@ declare module dijit { /** * The document this widget belongs to. If not specified to constructor, will default to * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global - * + * */ "ownerDocument": Object; set(property:"ownerDocument", value: Object): void; @@ -8655,14 +8655,14 @@ declare module dijit { watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * On focus, should this widget scroll into view? - * + * */ "scrollOnFocus": boolean; set(property:"scrollOnFocus", value: boolean): void; get(property:"scrollOnFocus"): boolean; watch(property:"scrollOnFocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** - * + * */ "searchContainerNode": boolean; set(property:"searchContainerNode", value: boolean): void; @@ -8673,10 +8673,10 @@ declare module dijit { * (If showLabel=false then iconClass must be specified.) * Especially useful for toolbars. * If showLabel=true, the label will become the title (a.k.a. tooltip/hint) of the icon. - * + * * The exception case is for computers in high-contrast mode, where the label * will still be displayed, since the icon doesn't appear. - * + * */ "showLabel": boolean; set(property:"showLabel", value: boolean): void; @@ -8684,7 +8684,7 @@ declare module dijit { watch(property:"showLabel", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * pointer to original DOM node - * + * */ "srcNodeRef": HTMLElement; set(property:"srcNodeRef", value: HTMLElement): void; @@ -8692,7 +8692,7 @@ declare module dijit { watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** * HTML style attributes as cssText string or name/value hash - * + * */ "style": string; set(property:"style", value: string): void; @@ -8700,7 +8700,7 @@ declare module dijit { watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Order fields are traversed when user hits the tab key - * + * */ "tabIndex": string; set(property:"tabIndex", value: string): void; @@ -8709,14 +8709,14 @@ declare module dijit { /** * Path to template (HTML file) for this widget relative to dojo.baseUrl. * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead - * + * */ "templatePath": string; set(property:"templatePath", value: string): void; get(property:"templatePath"): string; watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "templateString": string; set(property:"templateString", value: string): void; @@ -8724,14 +8724,14 @@ declare module dijit { watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * HTML title attribute. - * + * * For form widgets this specifies a tooltip to display when hovering over * the widget (just like the native HTML title attribute). - * + * * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's * interpreted as HTML. - * + * */ "title": string; set(property:"title", value: string): void; @@ -8740,7 +8740,7 @@ declare module dijit { /** * When this widget's title attribute is used to for a tab label, accordion pane title, etc., * this specifies the tooltip to appear when the mouse is hovered over that text. - * + * */ "tooltip": string; set(property:"tooltip", value: string): void; @@ -8748,7 +8748,7 @@ declare module dijit { watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Corresponds to the native HTML element's attribute. - * + * */ "type": string; set(property:"type", value: string): void; @@ -8756,7 +8756,7 @@ declare module dijit { watch(property:"type", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Corresponds to the native HTML element's attribute. - * + * */ "value": string; set(property:"value", value: string): void; @@ -8766,200 +8766,200 @@ declare module dijit { * Makes the given widget a child of this widget. * Inserts specified child widget's dom node as a child of this widget's * container node, and possibly does other processing (such as layout). - * - * @param widget - * @param insertIndex Optional + * + * @param widget + * @param insertIndex Optional */ addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. - * + * */ buildRendering(): void; /** * Closes the drop down on this widget - * - * @param focus If true, refocuses the button widget + * + * @param focus If true, refocuses the button widget */ closeDropDown(focus: boolean): void; /** * Compare 2 values (as returned by get('value') for this widget). - * - * @param val1 - * @param val2 + * + * @param val1 + * @param val2 */ compare(val1: any, val2: any): number; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: Function): any; /** * Wrapper to setTimeout to avoid deferred functions executing * after the originating widget has been destroyed. * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). - * - * @param fcn Function reference. - * @param delay OptionalDelay, defaults to 0. + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. */ defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). - * + * * This method will also destroy internal widgets such as those created from a template, * assuming those widgets exist inside of this.domNode but outside of this.containerNode. - * + * * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not * depend on the current ability to destroy a widget without destroying its descendants. Generally * they should use destroyRecursive() for widgets with children. - * - * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets */ destroy(preserveDom?: boolean): void; /** * Recursively destroy the children of this widget and their * descendants. - * - * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. */ destroyDescendants(preserveDom?: boolean): void; /** @@ -8967,41 +8967,41 @@ declare module dijit { * This is the generic "destructor" function that all widget users * should call to cleanly discard with a widget. Once a widget is * destroyed, it is removed from the manager object. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. */ destroyRecursive(preserveDom?: boolean): void; /** * Destroys the DOM nodes associated with this widget. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. */ destroyRendering(preserveDom?: boolean): void; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Disconnects handle created by connect. - * - * @param handle + * + * @param handle */ disconnect(handle: any): void; /** * Used by widgets to signal that a synthetic event occurred, ex: - * + * * myWidget.emit("attrmodified-selectedChildWidget", {}). * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. * Also calls onType() method, if present, and returns value from that method. * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). - * - * @param type - * @param eventObj Optional - * @param callbackArgs Optional + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional */ emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Put focus on this widget - * + * */ focus(): void; /** @@ -9009,15 +9009,15 @@ declare module dijit { * Get a named property from a widget. The property may * potentially be retrieved via a getter method. If no getter is defined, this * just retrieves the object's property. - * + * * For example, if the widget has properties foo and bar * and a method named _getFooAttr(), calling: * myWidget.get("foo") would be equivalent to calling * widget._getFooAttr() and myWidget.get("bar") * would be equivalent to the expression * widget.bar2 - * - * @param name The property to get. + * + * @param name The property to get. */ get(name: any): any; /** @@ -9025,54 +9025,54 @@ declare module dijit { * is this widget. Note that it does not return all descendants, but rather just direct children. * Analogous to Node.childNodes, * except containing widgets rather than DOMNodes. - * + * * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) * outside of this.containerNode. - * + * * Note that the array returned is a simple array. Application code should not assume * existence of methods like forEach(). - * + * */ getChildren(): any[]; /** * Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. * This method should generally be avoided as it returns widgets declared in templates, which are * supposed to be internal/hidden, but it's left here for back-compat reasons. - * + * */ getDescendants(): any[]; /** * Gets the index of the child in this container or -1 if not found - * - * @param child + * + * @param child */ getIndexOfChild(child: dijit._WidgetBase): any; /** * Returns the parent widget of this widget. - * + * */ getParent(): any; /** * Deprecated. Use get('value') instead. - * + * */ getValue(): any; /** * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. - * + * */ hasChildren(): boolean; /** - * + * */ isFocusable(): any; /** * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) - * + * */ isLeftToRight(): any; /** - * + * */ isLoaded(): boolean; /** @@ -9080,36 +9080,36 @@ declare module dijit { * if there's an href and it hasn't been loaded yet, and * then opens the drop down. This is basically a callback when the * user presses the down arrow button to open the drop down. - * + * */ loadAndOpenDropDown(): any; /** - * - * @param callback + * + * @param callback */ loadDropDown(callback: Function): void; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: String, func: Function): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: Function, func: Function): any; /** * Opens the dropdown for this widget. To be called only when this.dropDown * has been created and is ready to display (ie, it's data is loaded). - * + * */ openDropDown(): any; /** * Track specified handles and remove/destroy them when this instance is destroyed, unless they were * already removed/destroyed manually. - * + * */ own(): any; /** @@ -9118,9 +9118,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: String): any; /** @@ -9129,9 +9129,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: String): any; /** @@ -9140,9 +9140,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: String): any; /** @@ -9151,9 +9151,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: number): any; /** @@ -9162,9 +9162,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: number): any; /** @@ -9173,105 +9173,105 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: number): any; /** - * + * */ postCreate(): void; /** - * + * */ postMixInProperties(): void; /** * Removes the passed widget instance from this widget but does * not destroy it. You can also pass in an integer indicating * the index within the container to remove (ie, removeChild(5) removes the sixth widget). - * - * @param widget + * + * @param widget */ removeChild(widget: dijit._WidgetBase): void; /** * Removes the passed widget instance from this widget but does * not destroy it. You can also pass in an integer indicating * the index within the container to remove (ie, removeChild(5) removes the sixth widget). - * - * @param widget + * + * @param widget */ removeChild(widget: number): void; /** * Set a property on a widget * Sets named properties on a widget which may potentially be handled by a * setter in the widget. - * + * * For example, if the widget has properties foo and bar * and a method named _setFooAttr(), calling * myWidget.set("foo", "Howdy!") would be equivalent to calling * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) * would be equivalent to the statement widget.bar = 3; - * + * * set() may also be called with a hash of name/value pairs, ex: - * + * * myWidget.set({ * foo: "Howdy", * bar: 3 * }); * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) - * - * @param name The property to set. - * @param value The value to set in the property. + * + * @param name The property to set. + * @param value The value to set in the property. */ set(name: any, value: any): any; /** * Deprecated. Use set() instead. - * - * @param attr - * @param value + * + * @param attr + * @param value */ setAttribute(attr: String, value: any): void; /** * Deprecated. Use set('disabled', ...) instead. - * - * @param disabled + * + * @param disabled */ setDisabled(disabled: boolean): void; /** * Deprecated. Use set('label', ...) instead. - * - * @param content + * + * @param content */ setLabel(content: String): void; /** * Deprecated. Use set('value', ...) instead. - * - * @param value + * + * @param value */ setValue(value: String): void; /** - * + * */ startup(): void; /** * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. - * + * * Subscribes to the specified topic and calls the specified method * of this object and registers for unsubscribe() on widget destroy. - * + * * Provide widget-specific analog to dojo.subscribe, except with the * implicit use of this widget as the target object. - * - * @param t The topic - * @param method The callback + * + * @param t The topic + * @param method The callback */ subscribe(t: String, method: Function): any; /** * Callback when the user presses the down arrow button or presses * the down arrow key to open/close the drop down. * Toggle the drop-down widget; if it is up, close it, if not, open it - * + * */ toggleDropDown(): void; /** @@ -9279,29 +9279,29 @@ declare module dijit { * When a widget is cast to a string, this method will be used to generate the * output. Currently, it does not implement any sort of reversible * serialization. - * + * */ toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. - * + * */ uninitialize(): boolean; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Unsubscribes handle created by this.subscribe. * Also removes handle from this widget's list of subscriptions - * - * @param handle + * + * @param handle */ unsubscribe(handle: Object): void; /** * Watches a property for changes - * - * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched - * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; /** @@ -9314,124 +9314,124 @@ declare module dijit { * focus moved to something outside of it, or the user * clicked somewhere outside of it, or the widget was * hidden. - * + * */ onBlur(): void; /** * Callback when this widget's value is changed. - * - * @param newValue + * + * @param newValue */ onChange(newValue: any): void; /** * Connect to this function to receive notifications of mouse click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onClick(event: any): boolean; /** * Called when this widget is being displayed as a popup (ex: a Calendar popped * up from a DateTextBox), and it is hidden. * This is called from the dijit.popup code, and should not be called directly. - * + * * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. * Callback if a user tries to close the child. Child will be closed if this function returns true. - * + * */ onClose(): boolean; /** * Connect to this function to receive notifications of mouse double click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onDblClick(event: any): void; /** * Called when the widget becomes "active" because * it or a widget inside of it either has focus, or has recently * been clicked. - * + * */ onFocus(): void; /** * Called when another widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onHide(): void; /** * Connect to this function to receive notifications of keys being pressed down. - * - * @param event key Event + * + * @param event key Event */ onKeyDown(event: any): void; /** * Connect to this function to receive notifications of printable keys being typed. - * - * @param event key Event + * + * @param event key Event */ onKeyPress(event: any): void; /** * Connect to this function to receive notifications of keys being released. - * - * @param event key Event + * + * @param event key Event */ onKeyUp(event: any): void; /** - * + * */ onMonthSelect(): void; /** * Connect to this function to receive notifications of when the mouse button is pressed down. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseDown(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseEnter(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseLeave(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseMove(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOut(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOver(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is released. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseUp(event: any): void; /** * Called when this widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onShow(): void; } @@ -9441,19 +9441,19 @@ declare module dijit { * Permalink: http://dojotoolkit.org/api/1.9/dijit/CheckedMenuItem.html * * A checkbox-like menu item for toggling on and off - * - * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. - * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree */ class CheckedMenuItem extends dijit.MenuItem { constructor(params?: Object, srcNodeRef?: HTMLElement); /** * Text for the accelerator (shortcut) key combination, a control, alt, etc. modified keystroke meant to * execute the menu item regardless of where the focus is on the page. - * + * * Note that although Menu can display accelerator keys, there is no infrastructure to actually catch and * execute those accelerators. - * + * */ "accelKey": string; set(property:"accelKey", value: string): void; @@ -9461,7 +9461,7 @@ declare module dijit { watch(property:"accelKey", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * True if mouse was pressed while over this widget, and hasn't been released yet - * + * */ "active": boolean; set(property:"active", value: boolean): void; @@ -9470,7 +9470,7 @@ declare module dijit { /** * Object to which attach points and events will be scoped. Defaults * to 'this'. - * + * */ "attachScope": Object; set(property:"attachScope", value: Object): void; @@ -9479,51 +9479,51 @@ declare module dijit { /** * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute * for each XXX attribute to be mapped to the DOM. - * + * * attributeMap sets up a "binding" between attributes (aka properties) * of the widget and the widget's DOM. * Changes to widget attributes listed in attributeMap will be * reflected into the DOM. - * + * * For example, calling set('title', 'hello') * on a TitlePane will automatically cause the TitlePane's DOM to update * with the new title. - * + * * attributeMap is a hash where the key is an attribute of the widget, * and the value reflects a binding to a: - * + * * DOM node attribute * focus: {node: "focusNode", type: "attribute"} * Maps this.focus to this.focusNode.focus - * + * * DOM node innerHTML * title: { node: "titleNode", type: "innerHTML" } * Maps this.title to this.titleNode.innerHTML - * + * * DOM node innerText * title: { node: "titleNode", type: "innerText" } * Maps this.title to this.titleNode.innerText - * + * * DOM node CSS class * myClass: { node: "domNode", type: "class" } * Maps this.myClass to this.domNode.className - * + * * If the value is an array, then each element in the array matches one of the * formats of the above list. - * + * * There are also some shorthands for backwards compatibility: - * + * * string --> { node: string, type: "attribute" }, for example: * "focusNode" ---> { node: "focusNode", type: "attribute" } * "" --> { node: "domNode", type: "attribute" } - * + * */ "attributeMap": Object; set(property:"attributeMap", value: Object): void; get(property:"attributeMap"): Object; watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** - * + * */ "baseClass": string; set(property:"baseClass", value: string): void; @@ -9531,7 +9531,7 @@ declare module dijit { watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Our checked state - * + * */ "checked": boolean; set(property:"checked", value: boolean): void; @@ -9539,14 +9539,14 @@ declare module dijit { watch(property:"checked", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * Character (or string) used in place of checkbox icon when display in high contrast mode - * + * */ "checkedChar": string; set(property:"checkedChar", value: string): void; get(property:"checkedChar"): string; watch(property:"checkedChar", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "class": string; set(property:"class", value: string): void; @@ -9556,24 +9556,24 @@ declare module dijit { * Designates where children of the source DOM node will be placed. * "Children" in this case refers to both DOM nodes and widgets. * For example, for myWidget: - * + * *
* here's a plain DOM node * and a widget * and another plain DOM node *
* containerNode would point to: - * + * * here's a plain DOM node * and a widget * and another plain DOM node * In templated widgets, "containerNode" is set via a * data-dojo-attach-point assignment. - * + * * containerNode must be defined for any widget that accepts innerHTML * (like ContentPane or BorderContainer or even Button), and conversely * is null for widgets that don't, like TextBox. - * + * */ "containerNode": HTMLElement; set(property:"containerNode", value: HTMLElement): void; @@ -9582,18 +9582,18 @@ declare module dijit { /** * Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that * need CSS classes applied on mouse hover/press and focus. - * + * * Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name * (like "dijitUpArrowButton"). Example: - * + * * { * "upArrowButton": "dijitUpArrowButton", * "downArrowButton": "dijitDownArrowButton" * } * The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it - * + * * is hovered, etc. - * + * */ "cssStateNodes": Object; set(property:"cssStateNodes", value: Object): void; @@ -9603,7 +9603,7 @@ declare module dijit { * Bi-directional support, as defined by the HTML DIR * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's * default direction. - * + * */ "dir": string; set(property:"dir", value: string): void; @@ -9612,7 +9612,7 @@ declare module dijit { /** * If true, the menu item is disabled. * If false, the menu item is enabled. - * + * */ "disabled": boolean; set(property:"disabled", value: boolean): void; @@ -9623,7 +9623,7 @@ declare module dijit { * Nodes may by assigned to other properties, usually through the * template system's data-dojo-attach-point syntax, but the domNode * property is the canonical "top level" node in widget UI. - * + * */ "domNode": HTMLElement; set(property:"domNode", value: HTMLElement): void; @@ -9632,7 +9632,7 @@ declare module dijit { /** * This widget or a widget it contains has focus, or is "active" because * it was recently clicked. - * + * */ "focused": boolean; set(property:"focused", value: boolean): void; @@ -9640,14 +9640,14 @@ declare module dijit { watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * True if cursor is over this widget - * + * */ "hovering": boolean; set(property:"hovering", value: boolean): void; get(property:"hovering"): boolean; watch(property:"hovering", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** - * + * */ "iconClass": string; set(property:"iconClass", value: string): void; @@ -9658,7 +9658,7 @@ declare module dijit { * system. If the developer passes an ID which is known not to be * unique, the specified ID is ignored and the system-generated ID is * used instead. - * + * */ "id": string; set(property:"id", value: string): void; @@ -9666,7 +9666,7 @@ declare module dijit { watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Menu text as HTML - * + * */ "label": string; set(property:"label", value: string): void; @@ -9677,7 +9677,7 @@ declare module dijit { * as defined by the HTML LANG attribute. * Value must be among the list of locales specified during by the Dojo bootstrap, * formatted according to RFC 3066 (like en-us). - * + * */ "lang": string; set(property:"lang", value: string): void; @@ -9686,21 +9686,21 @@ declare module dijit { /** * The document this widget belongs to. If not specified to constructor, will default to * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global - * + * */ "ownerDocument": Object; set(property:"ownerDocument", value: Object): void; get(property:"ownerDocument"): Object; watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** - * + * */ "role": string; set(property:"role", value: string): void; get(property:"role"): string; watch(property:"role", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "searchContainerNode": boolean; set(property:"searchContainerNode", value: boolean): void; @@ -9711,7 +9711,7 @@ declare module dijit { * also known as a mnemonic. * This is denoted in the label by surrounding the single character with {}. * For example, if label="{F}ile", then shortcutKey="F". - * + * */ "shortcutKey": string; set(property:"shortcutKey", value: string): void; @@ -9719,7 +9719,7 @@ declare module dijit { watch(property:"shortcutKey", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * pointer to original DOM node - * + * */ "srcNodeRef": HTMLElement; set(property:"srcNodeRef", value: HTMLElement): void; @@ -9727,7 +9727,7 @@ declare module dijit { watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** * HTML style attributes as cssText string or name/value hash - * + * */ "style": string; set(property:"style", value: string): void; @@ -9736,14 +9736,14 @@ declare module dijit { /** * Path to template (HTML file) for this widget relative to dojo.baseUrl. * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead - * + * */ "templatePath": string; set(property:"templatePath", value: string): void; get(property:"templatePath"): string; watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "templateString": string; set(property:"templateString", value: string): void; @@ -9751,14 +9751,14 @@ declare module dijit { watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * HTML title attribute. - * + * * For form widgets this specifies a tooltip to display when hovering over * the widget (just like the native HTML title attribute). - * + * * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's * interpreted as HTML. - * + * */ "title": string; set(property:"title", value: string): void; @@ -9767,7 +9767,7 @@ declare module dijit { /** * When this widget's title attribute is used to for a tab label, accordion pane title, etc., * this specifies the tooltip to appear when the mouse is hovered over that text. - * + * */ "tooltip": string; set(property:"tooltip", value: string): void; @@ -9775,178 +9775,178 @@ declare module dijit { watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: Object, value?: Object): any; /** - * + * */ buildRendering(): void; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: Function): any; /** * Wrapper to setTimeout to avoid deferred functions executing * after the originating widget has been destroyed. * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). - * - * @param fcn Function reference. - * @param delay OptionalDelay, defaults to 0. + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. */ defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). - * + * * This method will also destroy internal widgets such as those created from a template, * assuming those widgets exist inside of this.domNode but outside of this.containerNode. - * + * * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not * depend on the current ability to destroy a widget without destroying its descendants. Generally * they should use destroyRecursive() for widgets with children. - * - * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets */ destroy(preserveDom?: boolean): void; /** * Recursively destroy the children of this widget and their * descendants. - * - * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. */ destroyDescendants(preserveDom?: boolean): void; /** @@ -9954,41 +9954,41 @@ declare module dijit { * This is the generic "destructor" function that all widget users * should call to cleanly discard with a widget. Once a widget is * destroyed, it is removed from the manager object. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. */ destroyRecursive(preserveDom?: boolean): void; /** * Destroys the DOM nodes associated with this widget. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. */ destroyRendering(preserveDom?: boolean): void; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Disconnects handle created by connect. - * - * @param handle + * + * @param handle */ disconnect(handle: any): void; /** * Used by widgets to signal that a synthetic event occurred, ex: - * + * * myWidget.emit("attrmodified-selectedChildWidget", {}). * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. * Also calls onType() method, if present, and returns value from that method. * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). - * - * @param type - * @param eventObj Optional - * @param callbackArgs Optional + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional */ emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focus on this MenuItem - * + * */ focus(): void; /** @@ -9996,15 +9996,15 @@ declare module dijit { * Get a named property from a widget. The property may * potentially be retrieved via a getter method. If no getter is defined, this * just retrieves the object's property. - * + * * For example, if the widget has properties foo and bar * and a method named _getFooAttr(), calling: * myWidget.get("foo") would be equivalent to calling * widget._getFooAttr() and myWidget.get("bar") * would be equivalent to the expression * widget.bar2 - * - * @param name The property to get. + * + * @param name The property to get. */ get(name: any): any; /** @@ -10012,73 +10012,73 @@ declare module dijit { * is this widget. Note that it does not return all descendants, but rather just direct children. * Analogous to Node.childNodes, * except containing widgets rather than DOMNodes. - * + * * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) * outside of this.containerNode. - * + * * Note that the array returned is a simple array. Application code should not assume * existence of methods like forEach(). - * + * */ getChildren(): any[]; /** * Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. * This method should generally be avoided as it returns widgets declared in templates, which are * supposed to be internal/hidden, but it's left here for back-compat reasons. - * + * */ getDescendants(): any[]; /** * Returns the index of this widget within its container parent. * It returns -1 if the parent does not exist, or if the parent * is not a dijit/_Container - * + * */ getIndexInParent(): any; /** * Returns null if this is the last child of the parent, * otherwise returns the next element sibling to the "right". - * + * */ getNextSibling(): any; /** * Returns the parent widget of this widget. - * + * */ getParent(): any; /** * Returns null if this is the first child of the parent, * otherwise returns the next element sibling to the "left". - * + * */ getPreviousSibling(): any; /** * Return true if this widget can currently be focused * and false if not - * + * */ isFocusable(): any; /** * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) - * + * */ isLeftToRight(): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: String, func: Function): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: Function, func: Function): any; /** * Track specified handles and remove/destroy them when this instance is destroyed, unless they were * already removed/destroyed manually. - * + * */ own(): any; /** @@ -10087,9 +10087,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: String): any; /** @@ -10098,9 +10098,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: String): any; /** @@ -10109,9 +10109,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: String): any; /** @@ -10120,9 +10120,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: number): any; /** @@ -10131,9 +10131,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: number): any; /** @@ -10142,13 +10142,13 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: number): any; /** - * + * */ postCreate(): void; /** @@ -10156,74 +10156,74 @@ declare module dijit { * but before the widget template is instantiated. Especially * useful to set properties that are referenced in the widget * template. - * + * */ postMixInProperties(): void; /** * Set a property on a widget * Sets named properties on a widget which may potentially be handled by a * setter in the widget. - * + * * For example, if the widget has properties foo and bar * and a method named _setFooAttr(), calling * myWidget.set("foo", "Howdy!") would be equivalent to calling * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) * would be equivalent to the statement widget.bar = 3; - * + * * set() may also be called with a hash of name/value pairs, ex: - * + * * myWidget.set({ * foo: "Howdy", * bar: 3 * }); * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) - * - * @param name The property to set. - * @param value The value to set in the property. + * + * @param name The property to set. + * @param value The value to set in the property. */ set(name: any, value: any): any; /** * Deprecated. Use set() instead. - * - * @param attr - * @param value + * + * @param attr + * @param value */ setAttribute(attr: String, value: any): void; /** * Deprecated. Use set('disabled', bool) instead. - * - * @param disabled + * + * @param disabled */ setDisabled(disabled: boolean): void; /** * Deprecated. Use set('label', ...) instead. - * - * @param content + * + * @param content */ setLabel(content: String): void; /** * Processing after the DOM fragment is added to the document * Called after a widget and its children have been created and added to the page, * and all related widgets have finished their create() cycle, up through postCreate(). - * + * * Note that startup() may be called while the widget is still hidden, for example if the widget is * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. * For widgets that need to do layout, it's best to put that layout code inside resize(), and then * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. - * + * */ startup(): void; /** * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. - * + * * Subscribes to the specified topic and calls the specified method * of this object and registers for unsubscribe() on widget destroy. - * + * * Provide widget-specific analog to dojo.subscribe, except with the * implicit use of this widget as the target object. - * - * @param t The topic - * @param method The callback + * + * @param t The topic + * @param method The callback */ subscribe(t: String, method: Function): any; /** @@ -10231,29 +10231,29 @@ declare module dijit { * When a widget is cast to a string, this method will be used to generate the * output. Currently, it does not implement any sort of reversible * serialization. - * + * */ toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. - * + * */ uninitialize(): boolean; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Unsubscribes handle created by this.subscribe. * Also removes handle from this widget's list of subscriptions - * - * @param handle + * + * @param handle */ unsubscribe(handle: Object): void; /** * Watches a property for changes - * - * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched - * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; /** @@ -10266,119 +10266,119 @@ declare module dijit { * focus moved to something outside of it, or the user * clicked somewhere outside of it, or the widget was * hidden. - * + * */ onBlur(): void; /** * User defined function to handle check/uncheck events - * - * @param checked + * + * @param checked */ onChange(checked: boolean): void; /** * User defined function to handle clicks - * + * */ onClick(): void; /** * Called when this widget is being displayed as a popup (ex: a Calendar popped * up from a DateTextBox), and it is hidden. * This is called from the dijit.popup code, and should not be called directly. - * + * * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. * Callback if a user tries to close the child. Child will be closed if this function returns true. - * + * */ onClose(): boolean; /** * Connect to this function to receive notifications of mouse double click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onDblClick(event: any): void; /** * Called when the widget becomes "active" because * it or a widget inside of it either has focus, or has recently * been clicked. - * + * */ onFocus(): void; /** * Called when another widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onHide(): void; /** * Connect to this function to receive notifications of keys being pressed down. - * - * @param event key Event + * + * @param event key Event */ onKeyDown(event: any): void; /** * Connect to this function to receive notifications of printable keys being typed. - * - * @param event key Event + * + * @param event key Event */ onKeyPress(event: any): void; /** * Connect to this function to receive notifications of keys being released. - * - * @param event key Event + * + * @param event key Event */ onKeyUp(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is pressed down. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseDown(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseEnter(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseLeave(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseMove(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOut(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOver(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is released. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseUp(event: any): void; /** * Called when this widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onShow(): void; } @@ -10386,26 +10386,26 @@ declare module dijit { * Permalink: http://dojotoolkit.org/api/1.9/dijit/DialogUnderlay.html * * A component used to block input behind a dijit/Dialog. - * + * * Normally this class should not be instantiated directly, but rather shown and hidden via * DialogUnderlay.show() and DialogUnderlay.hide(). And usually the module is not accessed directly * at all, since the underlay is shown and hidden by Dialog.DialogLevelManager. - * + * * The underlay itself can be styled based on and id: - * + * * #myDialog_underlay { background-color:red; } * In the case of dijit.Dialog, this id is based on the id of the Dialog, * suffixed with _underlay. - * - * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. - * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree */ class DialogUnderlay extends dijit._Widget implements dijit._TemplatedMixin { constructor(params?: Object, srcNodeRef?: HTMLElement); /** * Object to which attach points and events will be scoped. Defaults * to 'this'. - * + * */ "attachScope": Object; set(property:"attachScope", value: Object): void; @@ -10414,44 +10414,44 @@ declare module dijit { /** * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute * for each XXX attribute to be mapped to the DOM. - * + * * attributeMap sets up a "binding" between attributes (aka properties) * of the widget and the widget's DOM. * Changes to widget attributes listed in attributeMap will be * reflected into the DOM. - * + * * For example, calling set('title', 'hello') * on a TitlePane will automatically cause the TitlePane's DOM to update * with the new title. - * + * * attributeMap is a hash where the key is an attribute of the widget, * and the value reflects a binding to a: - * + * * DOM node attribute * focus: {node: "focusNode", type: "attribute"} * Maps this.focus to this.focusNode.focus - * + * * DOM node innerHTML * title: { node: "titleNode", type: "innerHTML" } * Maps this.title to this.titleNode.innerHTML - * + * * DOM node innerText * title: { node: "titleNode", type: "innerText" } * Maps this.title to this.titleNode.innerText - * + * * DOM node CSS class * myClass: { node: "domNode", type: "class" } * Maps this.myClass to this.domNode.className - * + * * If the value is an array, then each element in the array matches one of the * formats of the above list. - * + * * There are also some shorthands for backwards compatibility: - * + * * string --> { node: string, type: "attribute" }, for example: * "focusNode" ---> { node: "focusNode", type: "attribute" } * "" --> { node: "domNode", type: "attribute" } - * + * */ "attributeMap": Object; set(property:"attributeMap", value: Object): void; @@ -10460,14 +10460,14 @@ declare module dijit { /** * Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate * widget state. - * + * */ "baseClass": string; set(property:"baseClass", value: string): void; get(property:"baseClass"): string; watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "class": string; set(property:"class", value: string): void; @@ -10477,24 +10477,24 @@ declare module dijit { * Designates where children of the source DOM node will be placed. * "Children" in this case refers to both DOM nodes and widgets. * For example, for myWidget: - * + * *
* here's a plain DOM node * and a widget * and another plain DOM node *
* containerNode would point to: - * + * * here's a plain DOM node * and a widget * and another plain DOM node * In templated widgets, "containerNode" is set via a * data-dojo-attach-point assignment. - * + * * containerNode must be defined for any widget that accepts innerHTML * (like ContentPane or BorderContainer or even Button), and conversely * is null for widgets that don't, like TextBox. - * + * */ "containerNode": HTMLElement; set(property:"containerNode", value: HTMLElement): void; @@ -10502,7 +10502,7 @@ declare module dijit { watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** * Id of the dialog.... DialogUnderlay's id is based on this id - * + * */ "dialogId": string; set(property:"dialogId", value: string): void; @@ -10512,7 +10512,7 @@ declare module dijit { * Bi-directional support, as defined by the HTML DIR * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's * default direction. - * + * */ "dir": string; set(property:"dir", value: string): void; @@ -10523,7 +10523,7 @@ declare module dijit { * Nodes may by assigned to other properties, usually through the * template system's data-dojo-attach-point syntax, but the domNode * property is the canonical "top level" node in widget UI. - * + * */ "domNode": HTMLElement; set(property:"domNode", value: HTMLElement): void; @@ -10532,7 +10532,7 @@ declare module dijit { /** * This widget or a widget it contains has focus, or is "active" because * it was recently clicked. - * + * */ "focused": boolean; set(property:"focused", value: boolean): void; @@ -10543,7 +10543,7 @@ declare module dijit { * system. If the developer passes an ID which is known not to be * unique, the specified ID is ignored and the system-generated ID is * used instead. - * + * */ "id": string; set(property:"id", value: string): void; @@ -10554,7 +10554,7 @@ declare module dijit { * as defined by the HTML LANG attribute. * Value must be among the list of locales specified during by the Dojo bootstrap, * formatted according to RFC 3066 (like en-us). - * + * */ "lang": string; set(property:"lang", value: string): void; @@ -10563,14 +10563,14 @@ declare module dijit { /** * The document this widget belongs to. If not specified to constructor, will default to * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global - * + * */ "ownerDocument": Object; set(property:"ownerDocument", value: Object): void; get(property:"ownerDocument"): Object; watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** - * + * */ "searchContainerNode": boolean; set(property:"searchContainerNode", value: boolean): void; @@ -10578,7 +10578,7 @@ declare module dijit { watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * pointer to original DOM node - * + * */ "srcNodeRef": HTMLElement; set(property:"srcNodeRef", value: HTMLElement): void; @@ -10586,7 +10586,7 @@ declare module dijit { watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** * HTML style attributes as cssText string or name/value hash - * + * */ "style": string; set(property:"style", value: string): void; @@ -10595,14 +10595,14 @@ declare module dijit { /** * Path to template (HTML file) for this widget relative to dojo.baseUrl. * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead - * + * */ "templatePath": string; set(property:"templatePath", value: string): void; get(property:"templatePath"): string; watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "templateString": string; set(property:"templateString", value: string): void; @@ -10610,14 +10610,14 @@ declare module dijit { watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * HTML title attribute. - * + * * For form widgets this specifies a tooltip to display when hovering over * the widget (just like the native HTML title attribute). - * + * * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's * interpreted as HTML. - * + * */ "title": string; set(property:"title", value: string): void; @@ -10626,7 +10626,7 @@ declare module dijit { /** * When this widget's title attribute is used to for a tab label, accordion pane title, etc., * this specifies the tooltip to appear when the mouse is hovered over that text. - * + * */ "tooltip": string; set(property:"tooltip", value: string): void; @@ -10634,170 +10634,170 @@ declare module dijit { watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. - * + * */ buildRendering(): void; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: Function): any; /** * Wrapper to setTimeout to avoid deferred functions executing * after the originating widget has been destroyed. * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). - * - * @param fcn Function reference. - * @param delay OptionalDelay, defaults to 0. + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. */ defer(fcn: Function, delay?: number): Object; /** - * + * */ destroy(): void; /** * Recursively destroy the children of this widget and their * descendants. - * - * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. */ destroyDescendants(preserveDom?: boolean): void; /** @@ -10805,36 +10805,36 @@ declare module dijit { * This is the generic "destructor" function that all widget users * should call to cleanly discard with a widget. Once a widget is * destroyed, it is removed from the manager object. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. */ destroyRecursive(preserveDom?: boolean): void; /** * Destroys the DOM nodes associated with this widget. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. */ destroyRendering(preserveDom?: boolean): void; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Disconnects handle created by connect. - * - * @param handle + * + * @param handle */ disconnect(handle: any): void; /** * Used by widgets to signal that a synthetic event occurred, ex: - * + * * myWidget.emit("attrmodified-selectedChildWidget", {}). * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. * Also calls onType() method, if present, and returns value from that method. * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). - * - * @param type - * @param eventObj Optional - * @param callbackArgs Optional + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional */ emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** @@ -10842,15 +10842,15 @@ declare module dijit { * Get a named property from a widget. The property may * potentially be retrieved via a getter method. If no getter is defined, this * just retrieves the object's property. - * + * * For example, if the widget has properties foo and bar * and a method named _getFooAttr(), calling: * myWidget.get("foo") would be equivalent to calling * widget._getFooAttr() and myWidget.get("bar") * would be equivalent to the expression * widget.bar2 - * - * @param name The property to get. + * + * @param name The property to get. */ get(name: any): any; /** @@ -10858,59 +10858,59 @@ declare module dijit { * is this widget. Note that it does not return all descendants, but rather just direct children. * Analogous to Node.childNodes, * except containing widgets rather than DOMNodes. - * + * * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) * outside of this.containerNode. - * + * * Note that the array returned is a simple array. Application code should not assume * existence of methods like forEach(). - * + * */ getChildren(): any[]; /** * Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. * This method should generally be avoided as it returns widgets declared in templates, which are * supposed to be internal/hidden, but it's left here for back-compat reasons. - * + * */ getDescendants(): any[]; /** * Returns the parent widget of this widget. - * + * */ getParent(): any; /** * Hide the underlay. - * + * */ hide(): void; /** * Return true if this widget can currently be focused * and false if not - * + * */ isFocusable(): any; /** * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) - * + * */ isLeftToRight(): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: String, func: Function): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: Function, func: Function): any; /** * Track specified handles and remove/destroy them when this instance is destroyed, unless they were * already removed/destroyed manually. - * + * */ own(): any; /** @@ -10919,9 +10919,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: String): any; /** @@ -10930,9 +10930,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: String): any; /** @@ -10941,9 +10941,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: String): any; /** @@ -10952,9 +10952,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: number): any; /** @@ -10963,9 +10963,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: number): any; /** @@ -10974,13 +10974,13 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: number): any; /** - * + * */ postCreate(): void; /** @@ -10988,75 +10988,75 @@ declare module dijit { * but before the widget template is instantiated. Especially * useful to set properties that are referenced in the widget * template. - * + * */ postMixInProperties(): void; /** * Set a property on a widget * Sets named properties on a widget which may potentially be handled by a * setter in the widget. - * + * * For example, if the widget has properties foo and bar * and a method named _setFooAttr(), calling * myWidget.set("foo", "Howdy!") would be equivalent to calling * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) * would be equivalent to the statement widget.bar = 3; - * + * * set() may also be called with a hash of name/value pairs, ex: - * + * * myWidget.set({ * foo: "Howdy", * bar: 3 * }); * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) - * - * @param name The property to set. - * @param value The value to set in the property. + * + * @param name The property to set. + * @param value The value to set in the property. */ set(name: any, value: any): any; /** * Deprecated. Use set() instead. - * - * @param attr - * @param value + * + * @param attr + * @param value */ setAttribute(attr: String, value: any): void; /** * Show the dialog underlay - * + * */ show(): void; /** * Display the underlay with the given attributes set. If the underlay is already displayed, * then adjust it's attributes as specified. - * - * @param attrs The parameters to create DialogUnderlay with. - * @param zIndex zIndex of the underlay + * + * @param attrs The parameters to create DialogUnderlay with. + * @param zIndex zIndex of the underlay */ show(attrs: Object, zIndex: number): void; /** * Processing after the DOM fragment is added to the document * Called after a widget and its children have been created and added to the page, * and all related widgets have finished their create() cycle, up through postCreate(). - * + * * Note that startup() may be called while the widget is still hidden, for example if the widget is * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. * For widgets that need to do layout, it's best to put that layout code inside resize(), and then * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. - * + * */ startup(): void; /** * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. - * + * * Subscribes to the specified topic and calls the specified method * of this object and registers for unsubscribe() on widget destroy. - * + * * Provide widget-specific analog to dojo.subscribe, except with the * implicit use of this widget as the target object. - * - * @param t The topic - * @param method The callback + * + * @param t The topic + * @param method The callback */ subscribe(t: String, method: Function): any; /** @@ -11064,29 +11064,29 @@ declare module dijit { * When a widget is cast to a string, this method will be used to generate the * output. Currently, it does not implement any sort of reversible * serialization. - * + * */ toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. - * + * */ uninitialize(): boolean; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Unsubscribes handle created by this.subscribe. * Also removes handle from this widget's list of subscriptions - * - * @param handle + * + * @param handle */ unsubscribe(handle: Object): void; /** * Watches a property for changes - * - * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched - * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; /** @@ -11099,114 +11099,114 @@ declare module dijit { * focus moved to something outside of it, or the user * clicked somewhere outside of it, or the widget was * hidden. - * + * */ onBlur(): void; /** * Connect to this function to receive notifications of mouse click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onClick(event: any): void; /** * Called when this widget is being displayed as a popup (ex: a Calendar popped * up from a DateTextBox), and it is hidden. * This is called from the dijit.popup code, and should not be called directly. - * + * * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. * Callback if a user tries to close the child. Child will be closed if this function returns true. - * + * */ onClose(): boolean; /** * Connect to this function to receive notifications of mouse double click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onDblClick(event: any): void; /** * Called when the widget becomes "active" because * it or a widget inside of it either has focus, or has recently * been clicked. - * + * */ onFocus(): void; /** * Called when another widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onHide(): void; /** * Connect to this function to receive notifications of keys being pressed down. - * - * @param event key Event + * + * @param event key Event */ onKeyDown(event: any): void; /** * Connect to this function to receive notifications of printable keys being typed. - * - * @param event key Event + * + * @param event key Event */ onKeyPress(event: any): void; /** * Connect to this function to receive notifications of keys being released. - * - * @param event key Event + * + * @param event key Event */ onKeyUp(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is pressed down. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseDown(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseEnter(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseLeave(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseMove(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOut(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOver(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is released. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseUp(event: any): void; /** * Called when this widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onShow(): void; } @@ -11214,38 +11214,38 @@ declare module dijit { * Permalink: http://dojotoolkit.org/api/1.10/dijit/_ConfirmDialogMixin.html * * Mixin for Dialog/TooltipDialog with OK/Cancel buttons. - * + * */ class _ConfirmDialogMixin extends dijit._WidgetsInTemplateMixin { constructor(); /** - * + * */ "actionBarTemplate": Object; /** * Label of cancel button - * + * */ "buttonCancel": string; /** * Label of OK button - * + * */ "buttonOk": string; /** * Used to provide a context require to the dojo/parser in order to be * able to use relative MIDs (e.g. ./Widget) in the widget's template. - * + * */ "contextRequire": Function; /** * Should we parse the template to find widgets that might be * declared in markup inside it? (Remove for 2.0 and assume true) - * + * */ "widgetsInTemplate": boolean; /** - * + * */ startup(): void; } @@ -11253,9 +11253,9 @@ declare module dijit { * Permalink: http://dojotoolkit.org/api/1.10/dijit/ConfirmDialog.html * * A Dialog with OK/Cancel buttons. - * - * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. - * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree */ class ConfirmDialog extends dijit.Dialog implements dijit._ConfirmDialogMixin { constructor(params: Object, srcNodeRef?: HTMLElement); @@ -11265,7 +11265,7 @@ declare module dijit { /** * HTML snippet to show the action bar (gray bar with OK/cancel buttons). * Blank by default, but used by ConfirmDialog/ConfirmTooltipDialog subclasses. - * + * */ "actionBarTemplate": string; set(property:"actionBarTemplate", value: string): void; @@ -11273,7 +11273,7 @@ declare module dijit { watch(property:"actionBarTemplate", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * True if mouse was pressed while over this widget, and hasn't been released yet - * + * */ "active": boolean; set(property:"active", value: boolean): void; @@ -11282,7 +11282,7 @@ declare module dijit { /** * Object to which attach points and events will be scoped. Defaults * to 'this'. - * + * */ "attachScope": Object; set(property:"attachScope", value: Object): void; @@ -11291,44 +11291,44 @@ declare module dijit { /** * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute * for each XXX attribute to be mapped to the DOM. - * + * * attributeMap sets up a "binding" between attributes (aka properties) * of the widget and the widget's DOM. * Changes to widget attributes listed in attributeMap will be * reflected into the DOM. - * + * * For example, calling set('title', 'hello') * on a TitlePane will automatically cause the TitlePane's DOM to update * with the new title. - * + * * attributeMap is a hash where the key is an attribute of the widget, * and the value reflects a binding to a: - * + * * DOM node attribute * focus: {node: "focusNode", type: "attribute"} * Maps this.focus to this.focusNode.focus - * + * * DOM node innerHTML * title: { node: "titleNode", type: "innerHTML" } * Maps this.title to this.titleNode.innerHTML - * + * * DOM node innerText * title: { node: "titleNode", type: "innerText" } * Maps this.title to this.titleNode.innerText - * + * * DOM node CSS class * myClass: { node: "domNode", type: "class" } * Maps this.myClass to this.domNode.className - * + * * If the value is an array, then each element in the array matches one of the * formats of the above list. - * + * * There are also some shorthands for backwards compatibility: - * + * * string --> { node: string, type: "attribute" }, for example: * "focusNode" ---> { node: "focusNode", type: "attribute" } * "" --> { node: "domNode", type: "attribute" } - * + * */ "attributeMap": Object; set(property:"attributeMap", value: Object): void; @@ -11338,14 +11338,14 @@ declare module dijit { * A Toggle to modify the default focus behavior of a Dialog, which * is to focus on the first dialog element after opening the dialog. * False will disable autofocusing. Default: true - * + * */ "autofocus": boolean; set(property:"autofocus", value: boolean): void; get(property:"autofocus"): boolean; watch(property:"autofocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** - * + * */ "baseClass": string; set(property:"baseClass", value: string): void; @@ -11353,7 +11353,7 @@ declare module dijit { watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Label of cancel button - * + * */ "buttonCancel": string; set(property:"buttonCancel", value: string): void; @@ -11361,14 +11361,14 @@ declare module dijit { watch(property:"buttonCancel", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Label of OK button - * + * */ "buttonOk": string; set(property:"buttonOk", value: string): void; get(property:"buttonOk"): string; watch(property:"buttonOk", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "class": string; set(property:"class", value: string): void; @@ -11376,7 +11376,7 @@ declare module dijit { watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Dialog show [x] icon to close itself, and ESC key will close the dialog. - * + * */ "closable": boolean; set(property:"closable", value: boolean): void; @@ -11386,24 +11386,24 @@ declare module dijit { * Designates where children of the source DOM node will be placed. * "Children" in this case refers to both DOM nodes and widgets. * For example, for myWidget: - * + * *
* here's a plain DOM node * and a widget * and another plain DOM node *
* containerNode would point to: - * + * * here's a plain DOM node * and a widget * and another plain DOM node * In templated widgets, "containerNode" is set via a * data-dojo-attach-point assignment. - * + * * containerNode must be defined for any widget that accepts innerHTML * (like ContentPane or BorderContainer or even Button), and conversely * is null for widgets that don't, like TextBox. - * + * */ "containerNode": HTMLElement; set(property:"containerNode", value: HTMLElement): void; @@ -11413,7 +11413,7 @@ declare module dijit { * The innerHTML of the ContentPane. * Note that the initialization parameter / argument to set("content", ...) * can be a String, DomNode, Nodelist, or _Widget. - * + * */ "content": string; set(property:"content", value: string): void; @@ -11422,14 +11422,14 @@ declare module dijit { /** * Used to provide a context require to the dojo/parser in order to be * able to use relative MIDs (e.g. ./Widget) in the widget's template. - * + * */ "contextRequire": Function; set(property:"contextRequire", value: Function): void; get(property:"contextRequire"): Function; watch(property:"contextRequire", callback:{(property?:string, oldValue?:Function, newValue?: Function):void}) :{unwatch():void} /** - * + * */ "cssStateNodes": Object; set(property:"cssStateNodes", value: Object): void; @@ -11439,17 +11439,17 @@ declare module dijit { * Bi-directional support, as defined by the HTML DIR * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's * default direction. - * + * */ "dir": string; set(property:"dir", value: string): void; get(property:"dir"): string; watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * * false - don't adjust size of children * true - if there is a single visible child widget, set it's size to however big the ContentPane is - * + * */ "doLayout": boolean; set(property:"doLayout", value: boolean): void; @@ -11460,7 +11460,7 @@ declare module dijit { * Nodes may by assigned to other properties, usually through the * template system's data-dojo-attach-point syntax, but the domNode * property is the canonical "top level" node in widget UI. - * + * */ "domNode": HTMLElement; set(property:"domNode", value: HTMLElement): void; @@ -11470,7 +11470,7 @@ declare module dijit { * Toggles the movable aspect of the Dialog. If true, Dialog * can be dragged by it's title. If false it will remain centered * in the viewport. - * + * */ "draggable": boolean; set(property:"draggable", value: boolean): void; @@ -11478,7 +11478,7 @@ declare module dijit { watch(property:"draggable", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * The time in milliseconds it takes the dialog to fade in and out - * + * */ "duration": number; set(property:"duration", value: number): void; @@ -11486,7 +11486,7 @@ declare module dijit { watch(property:"duration", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} /** * Message that shows if an error occurs - * + * */ "errorMessage": string; set(property:"errorMessage", value: string): void; @@ -11495,7 +11495,7 @@ declare module dijit { /** * Extract visible content from inside of .... . * I.e., strip and (and it's contents) from the href - * + * */ "extractContent": boolean; set(property:"extractContent", value: boolean): void; @@ -11504,7 +11504,7 @@ declare module dijit { /** * This widget or a widget it contains has focus, or is "active" because * it was recently clicked. - * + * */ "focused": boolean; set(property:"focused", value: boolean): void; @@ -11512,7 +11512,7 @@ declare module dijit { watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * True if cursor is over this widget - * + * */ "hovering": boolean; set(property:"hovering", value: boolean): void; @@ -11523,7 +11523,7 @@ declare module dijit { * Set this at construction if you want to load data externally when the * pane is shown. (Set preload=true to load it immediately.) * Changing href after creation doesn't have any effect; Use set('href', ...); - * + * */ "href": string; set(property:"href", value: string): void; @@ -11534,7 +11534,7 @@ declare module dijit { * system. If the developer passes an ID which is known not to be * unique, the specified ID is ignored and the system-generated ID is * used instead. - * + * */ "id": string; set(property:"id", value: string): void; @@ -11542,9 +11542,9 @@ declare module dijit { watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Parameters to pass to xhrGet() request, for example: - * + * *
- * + * */ "ioArgs": Object; set(property:"ioArgs", value: Object): void; @@ -11553,7 +11553,7 @@ declare module dijit { /** * Indicates that this widget will call resize() on it's child widgets * when they become visible. - * + * */ "isLayoutContainer": boolean; set(property:"isLayoutContainer", value: boolean): void; @@ -11563,10 +11563,10 @@ declare module dijit { * True if the ContentPane has data in it, either specified * during initialization (via href or inline content), or set * via set('content', ...) / set('href', ...) - * + * * False if it doesn't have any content, or if ContentPane is * still in the process of downloading href. - * + * */ "isLoaded": boolean; set(property:"isLoaded", value: boolean): void; @@ -11577,7 +11577,7 @@ declare module dijit { * as defined by the HTML LANG attribute. * Value must be among the list of locales specified during by the Dojo bootstrap, * formatted according to RFC 3066 (like en-us). - * + * */ "lang": string; set(property:"lang", value: string): void; @@ -11585,7 +11585,7 @@ declare module dijit { watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Message that shows while downloading - * + * */ "loadingMessage": string; set(property:"loadingMessage", value: string): void; @@ -11593,7 +11593,7 @@ declare module dijit { watch(property:"loadingMessage", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Maximum size to allow the dialog to expand to, relative to viewport size - * + * */ "maxRatio": number; set(property:"maxRatio", value: number): void; @@ -11604,10 +11604,10 @@ declare module dijit { * Calling onLoadDeferred.then() registers your * callback to be called only once, when the prior set('href', ...) call or * the initial href parameter to the constructor finishes loading. - * + * * This is different than an onLoad() handler which gets called any time any href * or content is loaded. - * + * */ "onLoadDeferred": Object; set(property:"onLoadDeferred", value: Object): void; @@ -11615,7 +11615,7 @@ declare module dijit { watch(property:"onLoadDeferred", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * True if Dialog is currently displayed on screen. - * + * */ "open": boolean; set(property:"open", value: boolean): void; @@ -11624,7 +11624,7 @@ declare module dijit { /** * The document this widget belongs to. If not specified to constructor, will default to * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global - * + * */ "ownerDocument": Object; set(property:"ownerDocument", value: Object): void; @@ -11632,7 +11632,7 @@ declare module dijit { watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * Parse content and create the widgets, if any. - * + * */ "parseOnLoad": boolean; set(property:"parseOnLoad", value: boolean): void; @@ -11643,7 +11643,7 @@ declare module dijit { * will search for data-dojo-type (or dojoType). For backwards compatibility * reasons defaults to dojo._scopeName (which is "dojo" except when * multi-version support is used, when it will be something like dojo16, dojo20, etc.) - * + * */ "parserScope": string; set(property:"parserScope", value: string): void; @@ -11651,7 +11651,7 @@ declare module dijit { watch(property:"parserScope", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Force load of data on initialization even if pane is hidden. - * + * */ "preload": boolean; set(property:"preload", value: boolean): void; @@ -11659,7 +11659,7 @@ declare module dijit { watch(property:"preload", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * Prevent caching of data from href's by appending a timestamp to the href. - * + * */ "preventCache": boolean; set(property:"preventCache", value: boolean): void; @@ -11669,7 +11669,7 @@ declare module dijit { * A Toggle to modify the default focus behavior of a Dialog, which * is to re-focus the element which had focus before being opened. * False will disable refocusing. Default: true - * + * */ "refocus": boolean; set(property:"refocus", value: boolean): void; @@ -11677,14 +11677,14 @@ declare module dijit { watch(property:"refocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * Refresh (re-download) content when pane goes from hidden to shown - * + * */ "refreshOnShow": boolean; set(property:"refreshOnShow", value: boolean): void; get(property:"refreshOnShow"): boolean; watch(property:"refreshOnShow", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** - * + * */ "searchContainerNode": boolean; set(property:"searchContainerNode", value: boolean): void; @@ -11692,7 +11692,7 @@ declare module dijit { watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * pointer to original DOM node - * + * */ "srcNodeRef": HTMLElement; set(property:"srcNodeRef", value: HTMLElement): void; @@ -11702,14 +11702,14 @@ declare module dijit { * Will be "Error" if one or more of the child widgets has an invalid value, * "Incomplete" if not all of the required child widgets are filled in. Otherwise, "", * which indicates that the form is ready to be submitted. - * + * */ "state": string; set(property:"state", value: string): void; get(property:"state"): string; watch(property:"state", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "stopParser": boolean; set(property:"stopParser", value: boolean): void; @@ -11717,7 +11717,7 @@ declare module dijit { watch(property:"stopParser", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * HTML style attributes as cssText string or name/value hash - * + * */ "style": string; set(property:"style", value: string): void; @@ -11726,14 +11726,14 @@ declare module dijit { /** * Path to template (HTML file) for this widget relative to dojo.baseUrl. * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead - * + * */ "templatePath": string; set(property:"templatePath", value: string): void; get(property:"templatePath"): string; watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "templateString": string; set(property:"templateString", value: string): void; @@ -11741,14 +11741,14 @@ declare module dijit { watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * HTML title attribute. - * + * * For form widgets this specifies a tooltip to display when hovering over * the widget (just like the native HTML title attribute). - * + * * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's * interpreted as HTML. - * + * */ "title": string; set(property:"title", value: string): void; @@ -11757,7 +11757,7 @@ declare module dijit { /** * When this widget's title attribute is used to for a tab label, accordion pane title, etc., * this specifies the tooltip to appear when the mouse is hovered over that text. - * + * */ "tooltip": string; set(property:"tooltip", value: string): void; @@ -11766,7 +11766,7 @@ declare module dijit { /** * Should we parse the template to find widgets that might be * declared in markup inside it? (Remove for 2.0 and assume true) - * + * */ "widgetsInTemplate": boolean; set(property:"widgetsInTemplate", value: boolean): void; @@ -11776,232 +11776,232 @@ declare module dijit { * Makes the given widget a child of this widget. * Inserts specified child widget's dom node as a child of this widget's * container node, and possibly does other processing (such as layout). - * - * @param widget - * @param insertIndex Optional + * + * @param widget + * @param insertIndex Optional */ addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: Object, value?: Object): any; /** - * + * */ buildRendering(): void; /** * Cancels an in-flight download of content - * + * */ cancel(): void; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: Function): any; /** * You can call this function directly, ex. in the event that you * programmatically add a widget to the form after the form has been * initialized. - * - * @param inStartup + * + * @param inStartup */ connectChildren(inStartup: boolean): void; /** - * - * @param params - * @param srcNodeRef + * + * @param params + * @param srcNodeRef */ create(params: any, srcNodeRef: any): void; /** * Wrapper to setTimeout to avoid deferred functions executing * after the originating widget has been destroyed. * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). - * - * @param fcn Function reference. - * @param delay OptionalDelay, defaults to 0. + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. */ defer(fcn: Function, delay?: number): Object; /** - * + * */ destroy(): void; /** * Destroy all the widgets inside the ContentPane and empty containerNode - * - * @param preserveDom + * + * @param preserveDom */ destroyDescendants(preserveDom: boolean): void; /** * Destroy the ContentPane and its contents - * - * @param preserveDom + * + * @param preserveDom */ destroyRecursive(preserveDom: boolean): void; /** * Destroys the DOM nodes associated with this widget. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. */ destroyRendering(preserveDom?: boolean): void; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Disconnects handle created by connect. - * - * @param handle + * + * @param handle */ disconnect(handle: any): void; /** * Deprecated method. Applications no longer need to call this. Remove for 2.0. - * + * */ disconnectChildren(): void; /** * Used by widgets to signal that a synthetic event occurred, ex: - * + * * myWidget.emit("attrmodified-selectedChildWidget", {}). * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. * Also calls onType() method, if present, and returns value from that method. * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). - * - * @param type - * @param eventObj Optional - * @param callbackArgs Optional + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional */ emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** @@ -12010,14 +12010,14 @@ declare module dijit { * After the user has pressed the submit button, the Dialog * first calls onExecute() to notify the container to hide the * dialog and restore focus to wherever it used to be. - * + * * Then this method is called. - * - * @param formContents + * + * @param formContents */ execute(formContents: Object): void; /** - * + * */ focus(): void; /** @@ -12025,15 +12025,15 @@ declare module dijit { * Get a named property from a widget. The property may * potentially be retrieved via a getter method. If no getter is defined, this * just retrieves the object's property. - * + * * For example, if the widget has properties foo and bar * and a method named _getFooAttr(), calling: * myWidget.get("foo") would be equivalent to calling * widget._getFooAttr() and myWidget.get("bar") * would be equivalent to the expression * widget.bar2 - * - * @param name The property to get. + * + * @param name The property to get. */ get(name: any): any; /** @@ -12041,93 +12041,93 @@ declare module dijit { * is this widget. Note that it does not return all descendants, but rather just direct children. * Analogous to Node.childNodes, * except containing widgets rather than DOMNodes. - * + * * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) * outside of this.containerNode. - * + * * Note that the array returned is a simple array. Application code should not assume * existence of methods like forEach(). - * + * */ getChildren(): any[]; /** * Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. * This method should generally be avoided as it returns widgets declared in templates, which are * supposed to be internal/hidden, but it's left here for back-compat reasons. - * + * */ getDescendants(): any[]; /** * Gets the index of the child in this container or -1 if not found - * - * @param child + * + * @param child */ getIndexOfChild(child: dijit._WidgetBase): any; /** * Returns the parent widget of this widget. - * + * */ getParent(): any; /** - * + * */ getValues(): any; /** * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. - * + * */ hasChildren(): boolean; /** * Hide the dialog - * + * */ hide(): any; /** * Function that should grab the content specified via href. - * - * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. + * + * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. */ ioMethod(args: Object): any; /** * Return true if this widget can currently be focused * and false if not - * + * */ isFocusable(): any; /** * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) - * + * */ isLeftToRight(): any; /** * Returns true if all of the widgets are valid. * Deprecated, will be removed in 2.0. Use get("state") instead. - * + * */ isValid: {(): boolean}; /** - * - * @param params - * @param node - * @param ctor + * + * @param params + * @param node + * @param ctor */ markupFactory(params: any, node: any, ctor: any): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: String, func: Function): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: Function, func: Function): any; /** * Track specified handles and remove/destroy them when this instance is destroyed, unless they were * already removed/destroyed manually. - * + * */ own(): any; /** @@ -12136,9 +12136,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: String): any; /** @@ -12147,9 +12147,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: String): any; /** @@ -12158,9 +12158,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position: String): any; /** @@ -12169,9 +12169,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: number): any; /** @@ -12180,9 +12180,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: number): any; /** @@ -12191,17 +12191,17 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: number): any; /** - * + * */ postCreate(): void; /** - * + * */ postMixInProperties(): void; /** @@ -12209,124 +12209,124 @@ declare module dijit { * cancels any currently in-flight requests * posts "loading..." message * sends XHR to download new data - * + * */ refresh(): any; /** * Removes the passed widget instance from this widget but does * not destroy it. You can also pass in an integer indicating * the index within the container to remove (ie, removeChild(5) removes the sixth widget). - * - * @param widget + * + * @param widget */ removeChild(widget: dijit._WidgetBase): void; /** * Removes the passed widget instance from this widget but does * not destroy it. You can also pass in an integer indicating * the index within the container to remove (ie, removeChild(5) removes the sixth widget). - * - * @param widget + * + * @param widget */ removeChild(widget: number): void; /** - * + * */ reset(): void; /** * See dijit/layout/_LayoutWidget.resize() for description. * Although ContentPane doesn't extend _LayoutWidget, it does implement * the same API. - * - * @param changeSize - * @param resultSize + * + * @param changeSize + * @param resultSize */ resize(changeSize: any, resultSize: any): void; /** * Set a property on a widget * Sets named properties on a widget which may potentially be handled by a * setter in the widget. - * + * * For example, if the widget has properties foo and bar * and a method named _setFooAttr(), calling * myWidget.set("foo", "Howdy!") would be equivalent to calling * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) * would be equivalent to the statement widget.bar = 3; - * + * * set() may also be called with a hash of name/value pairs, ex: - * + * * myWidget.set({ * foo: "Howdy", * bar: 3 * }); * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) - * - * @param name The property to set. - * @param value The value to set in the property. + * + * @param name The property to set. + * @param value The value to set in the property. */ set(name: any, value: any): any; /** * Deprecated. Use set() instead. - * - * @param attr - * @param value + * + * @param attr + * @param value */ setAttribute(attr: String, value: any): void; /** * Deprecated. Use set('content', ...) instead. - * - * @param data + * + * @param data */ setContent(data: String): void; /** * Deprecated. Use set('content', ...) instead. - * - * @param data + * + * @param data */ setContent(data: HTMLElement): void; /** * Deprecated. Use set('content', ...) instead. - * - * @param data + * + * @param data */ setContent(data: NodeList): void; /** * Deprecated. Use set('href', ...) instead. - * - * @param href + * + * @param href */ setHref(href: String): any; /** * Deprecated. Use set('href', ...) instead. - * - * @param href + * + * @param href */ setHref(href: URL): any; /** - * - * @param val + * + * @param val */ setValues(val: any): any; /** * Display the dialog - * + * */ show(): any; /** * Call startup() on all children including non _Widget ones like dojo/dnd/Source objects - * + * */ startup(): void; /** * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. - * + * * Subscribes to the specified topic and calls the specified method * of this object and registers for unsubscribe() on widget destroy. - * + * * Provide widget-specific analog to dojo.subscribe, except with the * implicit use of this widget as the target object. - * - * @param t The topic - * @param method The callback + * + * @param t The topic + * @param method The callback */ subscribe(t: String, method: Function): any; /** @@ -12334,38 +12334,38 @@ declare module dijit { * When a widget is cast to a string, this method will be used to generate the * output. Currently, it does not implement any sort of reversible * serialization. - * + * */ toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. - * + * */ uninitialize(): boolean; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Unsubscribes handle created by this.subscribe. * Also removes handle from this widget's list of subscriptions - * - * @param handle + * + * @param handle */ unsubscribe(handle: Object): void; /** * returns if the form is valid - same as isValid - but * provides a few additional (ui-specific) features: - * + * * it will highlight any sub-widgets that are not valid * it will call focus() on the first invalid sub-widget - * + * */ validate(): any; /** * Watches a property for changes - * - * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched - * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; /** @@ -12378,7 +12378,7 @@ declare module dijit { * focus moved to something outside of it, or the user * clicked somewhere outside of it, or the widget was * hidden. - * + * */ onBlur(): void; /** @@ -12386,58 +12386,58 @@ declare module dijit { * Developer shouldn't override or connect to this method; * it's a private communication device between the TooltipDialog * and the thing that opened it (ex: dijit/form/DropDownButton) - * + * */ onCancel(): void; /** * Connect to this function to receive notifications of mouse click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onClick(event: any): void; /** * Called when this widget is being displayed as a popup (ex: a Calendar popped * up from a DateTextBox), and it is hidden. * This is called from the dijit.popup code, and should not be called directly. - * + * * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. * Callback if a user tries to close the child. Child will be closed if this function returns true. - * + * */ onClose(): boolean; /** * Called on DOM faults, require faults etc. in content. - * + * * In order to display an error message in the pane, return * the error message from this method, as an HTML string. - * + * * By default (if this method is not overriden), it returns * nothing, so the error message is just printed to the console. - * - * @param error + * + * @param error */ onContentError(error: Error): void; /** * Connect to this function to receive notifications of mouse double click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onDblClick(event: any): void; /** * Called when download is finished. - * + * */ onDownloadEnd(): void; /** * Called when download error occurs. - * + * * In order to display an error message in the pane, return * the error message from this method, as an HTML string. - * + * * Default behavior (if this method is not overriden) is to display * the error message inside the pane. - * - * @param error + * + * @param error */ onDownloadError(error: Error): any; /** @@ -12445,7 +12445,7 @@ declare module dijit { * The string returned by this function will be the html * that tells the user we are loading something. * Override with your own function if you want to change text. - * + * */ onDownloadStart(): any; /** @@ -12453,113 +12453,113 @@ declare module dijit { * Developer shouldn't override or connect to this method; * it's a private communication device between the TooltipDialog * and the thing that opened it (ex: dijit/form/DropDownButton) - * + * */ onExecute(): void; /** * Called when the widget becomes "active" because * it or a widget inside of it either has focus, or has recently * been clicked. - * + * */ onFocus(): void; /** * Called when another widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onHide(): void; /** * Connect to this function to receive notifications of keys being pressed down. - * - * @param event key Event + * + * @param event key Event */ onKeyDown(event: any): void; /** * Connect to this function to receive notifications of printable keys being typed. - * - * @param event key Event + * + * @param event key Event */ onKeyPress(event: any): void; /** * Connect to this function to receive notifications of keys being released. - * - * @param event key Event + * + * @param event key Event */ onKeyUp(event: any): void; /** * Event hook, is called after everything is loaded and widgetified - * - * @param data + * + * @param data */ onLoad(data: any): void; /** * Connect to this function to receive notifications of when the mouse button is pressed down. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseDown(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseEnter(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseLeave(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseMove(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOut(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOver(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is released. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseUp(event: any): void; /** * Called when this widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onShow(): void; /** * Event hook, is called before old content is cleared - * + * */ onUnload(): void; /** * Stub function to connect to if you want to do something * (like disable/enable a submit button) when the valid * state changes on the form as a whole. - * + * * Deprecated. Will be removed in 2.0. Use watch("state", ...) instead. - * - * @param isValid + * + * @param isValid */ onValidStateChange(isValid: boolean): void; } @@ -12571,15 +12571,15 @@ declare module dijit { * Pops up a modal dialog window, blocking access to the screen * and also graying out the screen Dialog is extended from * ContentPane so it supports all the same parameters (href, etc.). - * - * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. - * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree */ class Dialog extends dijit.layout.ContentPane implements dijit._TemplatedMixin, dijit.form._FormMixin, dijit._DialogMixin, dijit._CssStateMixin { constructor(params?: Object, srcNodeRef?: HTMLElement); /** * True if mouse was pressed while over this widget, and hasn't been released yet - * + * */ "active": boolean; set(property:"active", value: boolean): void; @@ -12588,7 +12588,7 @@ declare module dijit { /** * Object to which attach points and events will be scoped. Defaults * to 'this'. - * + * */ "attachScope": Object; set(property:"attachScope", value: Object): void; @@ -12597,44 +12597,44 @@ declare module dijit { /** * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute * for each XXX attribute to be mapped to the DOM. - * + * * attributeMap sets up a "binding" between attributes (aka properties) * of the widget and the widget's DOM. * Changes to widget attributes listed in attributeMap will be * reflected into the DOM. - * + * * For example, calling set('title', 'hello') * on a TitlePane will automatically cause the TitlePane's DOM to update * with the new title. - * + * * attributeMap is a hash where the key is an attribute of the widget, * and the value reflects a binding to a: - * + * * DOM node attribute * focus: {node: "focusNode", type: "attribute"} * Maps this.focus to this.focusNode.focus - * + * * DOM node innerHTML * title: { node: "titleNode", type: "innerHTML" } * Maps this.title to this.titleNode.innerHTML - * + * * DOM node innerText * title: { node: "titleNode", type: "innerText" } * Maps this.title to this.titleNode.innerText - * + * * DOM node CSS class * myClass: { node: "domNode", type: "class" } * Maps this.myClass to this.domNode.className - * + * * If the value is an array, then each element in the array matches one of the * formats of the above list. - * + * * There are also some shorthands for backwards compatibility: - * + * * string --> { node: string, type: "attribute" }, for example: * "focusNode" ---> { node: "focusNode", type: "attribute" } * "" --> { node: "domNode", type: "attribute" } - * + * */ "attributeMap": Object; set(property:"attributeMap", value: Object): void; @@ -12644,21 +12644,21 @@ declare module dijit { * A Toggle to modify the default focus behavior of a Dialog, which * is to focus on the first dialog element after opening the dialog. * False will disable autofocusing. Default: true - * + * */ "autofocus": boolean; set(property:"autofocus", value: boolean): void; get(property:"autofocus"): boolean; watch(property:"autofocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** - * + * */ "baseClass": string; set(property:"baseClass", value: string): void; get(property:"baseClass"): string; watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "class": string; set(property:"class", value: string): void; @@ -12666,7 +12666,7 @@ declare module dijit { watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Dialog show [x] icon to close itself, and ESC key will close the dialog. - * + * */ "closable": boolean; set(property:"closable", value: boolean): void; @@ -12676,24 +12676,24 @@ declare module dijit { * Designates where children of the source DOM node will be placed. * "Children" in this case refers to both DOM nodes and widgets. * For example, for myWidget: - * + * *
* here's a plain DOM node * and a widget * and another plain DOM node *
* containerNode would point to: - * + * * here's a plain DOM node * and a widget * and another plain DOM node * In templated widgets, "containerNode" is set via a * data-dojo-attach-point assignment. - * + * * containerNode must be defined for any widget that accepts innerHTML * (like ContentPane or BorderContainer or even Button), and conversely * is null for widgets that don't, like TextBox. - * + * */ "containerNode": HTMLElement; set(property:"containerNode", value: HTMLElement): void; @@ -12703,14 +12703,14 @@ declare module dijit { * The innerHTML of the ContentPane. * Note that the initialization parameter / argument to set("content", ...) * can be a String, DomNode, Nodelist, or _Widget. - * + * */ "content": string; set(property:"content", value: string): void; get(property:"content"): string; watch(property:"content", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "cssStateNodes": Object; set(property:"cssStateNodes", value: Object): void; @@ -12720,17 +12720,17 @@ declare module dijit { * Bi-directional support, as defined by the HTML DIR * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's * default direction. - * + * */ "dir": string; set(property:"dir", value: string): void; get(property:"dir"): string; watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * * false - don't adjust size of children * true - if there is a single visible child widget, set it's size to however big the ContentPane is - * + * */ "doLayout": boolean; set(property:"doLayout", value: boolean): void; @@ -12741,7 +12741,7 @@ declare module dijit { * Nodes may by assigned to other properties, usually through the * template system's data-dojo-attach-point syntax, but the domNode * property is the canonical "top level" node in widget UI. - * + * */ "domNode": HTMLElement; set(property:"domNode", value: HTMLElement): void; @@ -12751,7 +12751,7 @@ declare module dijit { * Toggles the movable aspect of the Dialog. If true, Dialog * can be dragged by it's title. If false it will remain centered * in the viewport. - * + * */ "draggable": boolean; set(property:"draggable", value: boolean): void; @@ -12759,7 +12759,7 @@ declare module dijit { watch(property:"draggable", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * The time in milliseconds it takes the dialog to fade in and out - * + * */ "duration": number; set(property:"duration", value: number): void; @@ -12767,7 +12767,7 @@ declare module dijit { watch(property:"duration", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} /** * Message that shows if an error occurs - * + * */ "errorMessage": string; set(property:"errorMessage", value: string): void; @@ -12776,7 +12776,7 @@ declare module dijit { /** * Extract visible content from inside of .... . * I.e., strip and (and it's contents) from the href - * + * */ "extractContent": boolean; set(property:"extractContent", value: boolean): void; @@ -12785,7 +12785,7 @@ declare module dijit { /** * This widget or a widget it contains has focus, or is "active" because * it was recently clicked. - * + * */ "focused": boolean; set(property:"focused", value: boolean): void; @@ -12793,7 +12793,7 @@ declare module dijit { watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * True if cursor is over this widget - * + * */ "hovering": boolean; set(property:"hovering", value: boolean): void; @@ -12804,7 +12804,7 @@ declare module dijit { * Set this at construction if you want to load data externally when the * pane is shown. (Set preload=true to load it immediately.) * Changing href after creation doesn't have any effect; Use set('href', ...); - * + * */ "href": string; set(property:"href", value: string): void; @@ -12815,7 +12815,7 @@ declare module dijit { * system. If the developer passes an ID which is known not to be * unique, the specified ID is ignored and the system-generated ID is * used instead. - * + * */ "id": string; set(property:"id", value: string): void; @@ -12823,9 +12823,9 @@ declare module dijit { watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Parameters to pass to xhrGet() request, for example: - * + * *
- * + * */ "ioArgs": Object; set(property:"ioArgs", value: Object): void; @@ -12834,7 +12834,7 @@ declare module dijit { /** * Indicates that this widget will call resize() on it's child widgets * when they become visible. - * + * */ "isLayoutContainer": boolean; set(property:"isLayoutContainer", value: boolean): void; @@ -12844,10 +12844,10 @@ declare module dijit { * True if the ContentPane has data in it, either specified * during initialization (via href or inline content), or set * via set('content', ...) / set('href', ...) - * + * * False if it doesn't have any content, or if ContentPane is * still in the process of downloading href. - * + * */ "isLoaded": boolean; set(property:"isLoaded", value: boolean): void; @@ -12858,7 +12858,7 @@ declare module dijit { * as defined by the HTML LANG attribute. * Value must be among the list of locales specified during by the Dojo bootstrap, * formatted according to RFC 3066 (like en-us). - * + * */ "lang": string; set(property:"lang", value: string): void; @@ -12866,7 +12866,7 @@ declare module dijit { watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Message that shows while downloading - * + * */ "loadingMessage": string; set(property:"loadingMessage", value: string): void; @@ -12874,7 +12874,7 @@ declare module dijit { watch(property:"loadingMessage", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Maximum size to allow the dialog to expand to, relative to viewport size - * + * */ "maxRatio": number; set(property:"maxRatio", value: number): void; @@ -12885,10 +12885,10 @@ declare module dijit { * Calling onLoadDeferred.then() registers your * callback to be called only once, when the prior set('href', ...) call or * the initial href parameter to the constructor finishes loading. - * + * * This is different than an onLoad() handler which gets called any time any href * or content is loaded. - * + * */ "onLoadDeferred": Object; set(property:"onLoadDeferred", value: Object): void; @@ -12896,7 +12896,7 @@ declare module dijit { watch(property:"onLoadDeferred", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * True if Dialog is currently displayed on screen. - * + * */ "open": boolean; set(property:"open", value: boolean): void; @@ -12905,7 +12905,7 @@ declare module dijit { /** * The document this widget belongs to. If not specified to constructor, will default to * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global - * + * */ "ownerDocument": Object; set(property:"ownerDocument", value: Object): void; @@ -12913,7 +12913,7 @@ declare module dijit { watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * Parse content and create the widgets, if any. - * + * */ "parseOnLoad": boolean; set(property:"parseOnLoad", value: boolean): void; @@ -12924,7 +12924,7 @@ declare module dijit { * will search for data-dojo-type (or dojoType). For backwards compatibility * reasons defaults to dojo._scopeName (which is "dojo" except when * multi-version support is used, when it will be something like dojo16, dojo20, etc.) - * + * */ "parserScope": string; set(property:"parserScope", value: string): void; @@ -12932,7 +12932,7 @@ declare module dijit { watch(property:"parserScope", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Force load of data on initialization even if pane is hidden. - * + * */ "preload": boolean; set(property:"preload", value: boolean): void; @@ -12940,7 +12940,7 @@ declare module dijit { watch(property:"preload", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * Prevent caching of data from href's by appending a timestamp to the href. - * + * */ "preventCache": boolean; set(property:"preventCache", value: boolean): void; @@ -12950,7 +12950,7 @@ declare module dijit { * A Toggle to modify the default focus behavior of a Dialog, which * is to re-focus the element which had focus before being opened. * False will disable refocusing. Default: true - * + * */ "refocus": boolean; set(property:"refocus", value: boolean): void; @@ -12958,14 +12958,14 @@ declare module dijit { watch(property:"refocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * Refresh (re-download) content when pane goes from hidden to shown - * + * */ "refreshOnShow": boolean; set(property:"refreshOnShow", value: boolean): void; get(property:"refreshOnShow"): boolean; watch(property:"refreshOnShow", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** - * + * */ "searchContainerNode": boolean; set(property:"searchContainerNode", value: boolean): void; @@ -12973,7 +12973,7 @@ declare module dijit { watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * pointer to original DOM node - * + * */ "srcNodeRef": HTMLElement; set(property:"srcNodeRef", value: HTMLElement): void; @@ -12983,14 +12983,14 @@ declare module dijit { * Will be "Error" if one or more of the child widgets has an invalid value, * "Incomplete" if not all of the required child widgets are filled in. Otherwise, "", * which indicates that the form is ready to be submitted. - * + * */ "state": string; set(property:"state", value: string): void; get(property:"state"): string; watch(property:"state", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "stopParser": boolean; set(property:"stopParser", value: boolean): void; @@ -12998,7 +12998,7 @@ declare module dijit { watch(property:"stopParser", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * HTML style attributes as cssText string or name/value hash - * + * */ "style": string; set(property:"style", value: string): void; @@ -13007,14 +13007,14 @@ declare module dijit { /** * Path to template (HTML file) for this widget relative to dojo.baseUrl. * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead - * + * */ "templatePath": string; set(property:"templatePath", value: string): void; get(property:"templatePath"): string; watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "templateString": string; set(property:"templateString", value: string): void; @@ -13022,14 +13022,14 @@ declare module dijit { watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * HTML title attribute. - * + * * For form widgets this specifies a tooltip to display when hovering over * the widget (just like the native HTML title attribute). - * + * * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's * interpreted as HTML. - * + * */ "title": string; set(property:"title", value: string): void; @@ -13038,7 +13038,7 @@ declare module dijit { /** * When this widget's title attribute is used to for a tab label, accordion pane title, etc., * this specifies the tooltip to appear when the mouse is hovered over that text. - * + * */ "tooltip": string; set(property:"tooltip", value: string): void; @@ -13048,232 +13048,232 @@ declare module dijit { * Makes the given widget a child of this widget. * Inserts specified child widget's dom node as a child of this widget's * container node, and possibly does other processing (such as layout). - * - * @param widget - * @param insertIndex Optional + * + * @param widget + * @param insertIndex Optional */ addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: Object, value?: Object): any; /** - * + * */ buildRendering(): void; /** * Cancels an in-flight download of content - * + * */ cancel(): void; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: Function): any; /** * You can call this function directly, ex. in the event that you * programmatically add a widget to the form after the form has been * initialized. - * - * @param inStartup + * + * @param inStartup */ connectChildren(inStartup: boolean): void; /** - * - * @param params - * @param srcNodeRef + * + * @param params + * @param srcNodeRef */ create(params: any, srcNodeRef: any): void; /** * Wrapper to setTimeout to avoid deferred functions executing * after the originating widget has been destroyed. * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). - * - * @param fcn Function reference. - * @param delay OptionalDelay, defaults to 0. + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. */ defer(fcn: Function, delay?: number): Object; /** - * + * */ destroy(): void; /** * Destroy all the widgets inside the ContentPane and empty containerNode - * - * @param preserveDom + * + * @param preserveDom */ destroyDescendants(preserveDom?: boolean): void; /** * Destroy the ContentPane and its contents - * - * @param preserveDom + * + * @param preserveDom */ destroyRecursive(preserveDom?: boolean): void; /** * Destroys the DOM nodes associated with this widget. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. */ destroyRendering(preserveDom?: boolean): void; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Disconnects handle created by connect. - * - * @param handle + * + * @param handle */ disconnect(handle: any): void; /** * Deprecated method. Applications no longer need to call this. Remove for 2.0. - * + * */ disconnectChildren(): void; /** * Used by widgets to signal that a synthetic event occurred, ex: - * + * * myWidget.emit("attrmodified-selectedChildWidget", {}). * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. * Also calls onType() method, if present, and returns value from that method. * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). - * - * @param type - * @param eventObj Optional - * @param callbackArgs Optional + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional */ emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** @@ -13282,14 +13282,14 @@ declare module dijit { * After the user has pressed the submit button, the Dialog * first calls onExecute() to notify the container to hide the * dialog and restore focus to wherever it used to be. - * + * * Then this method is called. - * - * @param formContents + * + * @param formContents */ execute(formContents: Object): void; /** - * + * */ focus(): void; /** @@ -13297,15 +13297,15 @@ declare module dijit { * Get a named property from a widget. The property may * potentially be retrieved via a getter method. If no getter is defined, this * just retrieves the object's property. - * + * * For example, if the widget has properties foo and bar * and a method named _getFooAttr(), calling: * myWidget.get("foo") would be equivalent to calling * widget._getFooAttr() and myWidget.get("bar") * would be equivalent to the expression * widget.bar2 - * - * @param name The property to get. + * + * @param name The property to get. */ get(name: any): any; /** @@ -13313,93 +13313,93 @@ declare module dijit { * is this widget. Note that it does not return all descendants, but rather just direct children. * Analogous to Node.childNodes, * except containing widgets rather than DOMNodes. - * + * * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) * outside of this.containerNode. - * + * * Note that the array returned is a simple array. Application code should not assume * existence of methods like forEach(). - * + * */ getChildren(): any[]; /** * Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. * This method should generally be avoided as it returns widgets declared in templates, which are * supposed to be internal/hidden, but it's left here for back-compat reasons. - * + * */ getDescendants(): any[]; /** * Gets the index of the child in this container or -1 if not found - * - * @param child + * + * @param child */ getIndexOfChild(child: dijit._WidgetBase): any; /** * Returns the parent widget of this widget. - * + * */ getParent(): any; /** - * + * */ getValues(): any; /** * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. - * + * */ hasChildren(): boolean; /** * Hide the dialog - * + * */ hide(): any; /** * Function that should grab the content specified via href. - * - * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. + * + * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. */ ioMethod(args: Object): any; /** * Return true if this widget can currently be focused * and false if not - * + * */ isFocusable(): any; /** * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) - * + * */ isLeftToRight(): any; /** * Returns true if all of the widgets are valid. * Deprecated, will be removed in 2.0. Use get("state") instead. - * + * */ isValid: {(): boolean}; /** - * - * @param params - * @param node - * @param ctor + * + * @param params + * @param node + * @param ctor */ markupFactory(params: any, node: any, ctor: any): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: String, func: Function): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: Function, func: Function): any; /** * Track specified handles and remove/destroy them when this instance is destroyed, unless they were * already removed/destroyed manually. - * + * */ own(): any; /** @@ -13408,9 +13408,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: String): any; /** @@ -13419,9 +13419,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: String): any; /** @@ -13430,9 +13430,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: String): any; /** @@ -13441,9 +13441,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: number): any; /** @@ -13452,9 +13452,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: number): any; /** @@ -13463,17 +13463,17 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: number): any; /** - * + * */ postCreate(): void; /** - * + * */ postMixInProperties(): void; /** @@ -13481,124 +13481,124 @@ declare module dijit { * cancels any currently in-flight requests * posts "loading..." message * sends XHR to download new data - * + * */ refresh(): any; /** * Removes the passed widget instance from this widget but does * not destroy it. You can also pass in an integer indicating * the index within the container to remove (ie, removeChild(5) removes the sixth widget). - * - * @param widget + * + * @param widget */ removeChild(widget: dijit._WidgetBase): void; /** * Removes the passed widget instance from this widget but does * not destroy it. You can also pass in an integer indicating * the index within the container to remove (ie, removeChild(5) removes the sixth widget). - * - * @param widget + * + * @param widget */ removeChild(widget: number): void; /** - * + * */ reset(): void; /** * See dijit/layout/_LayoutWidget.resize() for description. * Although ContentPane doesn't extend _LayoutWidget, it does implement * the same API. - * - * @param changeSize - * @param resultSize + * + * @param changeSize + * @param resultSize */ resize(changeSize: any, resultSize: any): void; /** * Set a property on a widget * Sets named properties on a widget which may potentially be handled by a * setter in the widget. - * + * * For example, if the widget has properties foo and bar * and a method named _setFooAttr(), calling * myWidget.set("foo", "Howdy!") would be equivalent to calling * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) * would be equivalent to the statement widget.bar = 3; - * + * * set() may also be called with a hash of name/value pairs, ex: - * + * * myWidget.set({ * foo: "Howdy", * bar: 3 * }); * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) - * - * @param name The property to set. - * @param value The value to set in the property. + * + * @param name The property to set. + * @param value The value to set in the property. */ set(name: any, value: any): any; /** * Deprecated. Use set() instead. - * - * @param attr - * @param value + * + * @param attr + * @param value */ setAttribute(attr: String, value: any): void; /** * Deprecated. Use set('content', ...) instead. - * - * @param data + * + * @param data */ setContent(data: String): void; /** * Deprecated. Use set('content', ...) instead. - * - * @param data + * + * @param data */ setContent(data: HTMLElement): void; /** * Deprecated. Use set('content', ...) instead. - * - * @param data + * + * @param data */ setContent(data: NodeList): void; /** * Deprecated. Use set('href', ...) instead. - * - * @param href + * + * @param href */ setHref(href: String): any; /** * Deprecated. Use set('href', ...) instead. - * - * @param href + * + * @param href */ setHref(href: URL): any; /** - * - * @param val + * + * @param val */ setValues(val: any): any; /** * Display the dialog - * + * */ show(): any; /** * Call startup() on all children including non _Widget ones like dojo/dnd/Source objects - * + * */ startup(): void; /** * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. - * + * * Subscribes to the specified topic and calls the specified method * of this object and registers for unsubscribe() on widget destroy. - * + * * Provide widget-specific analog to dojo.subscribe, except with the * implicit use of this widget as the target object. - * - * @param t The topic - * @param method The callback + * + * @param t The topic + * @param method The callback */ subscribe(t: String, method: Function): any; /** @@ -13606,38 +13606,38 @@ declare module dijit { * When a widget is cast to a string, this method will be used to generate the * output. Currently, it does not implement any sort of reversible * serialization. - * + * */ toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. - * + * */ uninitialize(): boolean; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Unsubscribes handle created by this.subscribe. * Also removes handle from this widget's list of subscriptions - * - * @param handle + * + * @param handle */ unsubscribe(handle: Object): void; /** * returns if the form is valid - same as isValid - but * provides a few additional (ui-specific) features: - * + * * it will highlight any sub-widgets that are not valid * it will call focus() on the first invalid sub-widget - * + * */ validate(): any; /** * Watches a property for changes - * - * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched - * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; /** @@ -13650,7 +13650,7 @@ declare module dijit { * focus moved to something outside of it, or the user * clicked somewhere outside of it, or the widget was * hidden. - * + * */ onBlur(): void; /** @@ -13658,58 +13658,58 @@ declare module dijit { * Developer shouldn't override or connect to this method; * it's a private communication device between the TooltipDialog * and the thing that opened it (ex: dijit/form/DropDownButton) - * + * */ onCancel(): void; /** * Connect to this function to receive notifications of mouse click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onClick(event: any): void; /** * Called when this widget is being displayed as a popup (ex: a Calendar popped * up from a DateTextBox), and it is hidden. * This is called from the dijit.popup code, and should not be called directly. - * + * * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. * Callback if a user tries to close the child. Child will be closed if this function returns true. - * + * */ onClose(): boolean; /** * Called on DOM faults, require faults etc. in content. - * + * * In order to display an error message in the pane, return * the error message from this method, as an HTML string. - * + * * By default (if this method is not overriden), it returns * nothing, so the error message is just printed to the console. - * - * @param error + * + * @param error */ onContentError(error: Error): void; /** * Connect to this function to receive notifications of mouse double click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onDblClick(event: any): void; /** * Called when download is finished. - * + * */ onDownloadEnd(): void; /** * Called when download error occurs. - * + * * In order to display an error message in the pane, return * the error message from this method, as an HTML string. - * + * * Default behavior (if this method is not overriden) is to display * the error message inside the pane. - * - * @param error + * + * @param error */ onDownloadError(error: Error): any; /** @@ -13717,7 +13717,7 @@ declare module dijit { * The string returned by this function will be the html * that tells the user we are loading something. * Override with your own function if you want to change text. - * + * */ onDownloadStart(): any; /** @@ -13725,113 +13725,113 @@ declare module dijit { * Developer shouldn't override or connect to this method; * it's a private communication device between the TooltipDialog * and the thing that opened it (ex: dijit/form/DropDownButton) - * + * */ onExecute(): void; /** * Called when the widget becomes "active" because * it or a widget inside of it either has focus, or has recently * been clicked. - * + * */ onFocus(): void; /** * Called when another widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onHide(): void; /** * Connect to this function to receive notifications of keys being pressed down. - * - * @param event key Event + * + * @param event key Event */ onKeyDown(event: any): void; /** * Connect to this function to receive notifications of printable keys being typed. - * - * @param event key Event + * + * @param event key Event */ onKeyPress(event: any): void; /** * Connect to this function to receive notifications of keys being released. - * - * @param event key Event + * + * @param event key Event */ onKeyUp(event: any): void; /** * Event hook, is called after everything is loaded and widgetified - * - * @param data + * + * @param data */ onLoad(data: any): void; /** * Connect to this function to receive notifications of when the mouse button is pressed down. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseDown(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseEnter(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseLeave(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseMove(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOut(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOver(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is released. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseUp(event: any): void; /** * Called when this widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onShow(): void; /** * Event hook, is called before old content is cleared - * + * */ onUnload(): void; /** * Stub function to connect to if you want to do something * (like disable/enable a submit button) when the valid * state changes on the form as a whole. - * + * * Deprecated. Will be removed in 2.0. Use watch("state", ...) instead. - * - * @param isValid + * + * @param isValid */ onValidStateChange(isValid: boolean): void; } @@ -13839,41 +13839,41 @@ declare module dijit { /** * Permalink: http://dojotoolkit.org/api/1.9/dijit/Dialog._DialogBase.html * - * - * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. - * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree. + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree. */ class _DialogBase extends dijit._TemplatedMixin implements dijit.form._FormMixin, dijit._DialogMixin, dijit._CssStateMixin { constructor(params?: Object, srcNodeRef?: HTMLElement); /** * True if mouse was pressed while over this widget, and hasn't been released yet - * + * */ "active": boolean; /** * Object to which attach points and events will be scoped. Defaults * to 'this'. - * + * */ "attachScope": Object; /** * A Toggle to modify the default focus behavior of a Dialog, which * is to focus on the first dialog element after opening the dialog. * False will disable autofocusing. Default: true - * + * */ "autofocus": boolean; /** - * + * */ "baseClass": string; /** * Dialog show [x] icon to close itself, and ESC key will close the dialog. - * + * */ "closable": boolean; /** - * + * */ "cssStateNodes": Object; /** @@ -13881,88 +13881,88 @@ declare module dijit { * This ContentPane parameter doesn't make sense for Dialog, since Dialog * is never a child of a layout container, nor can you specify the size of * Dialog in order to control the size of an inner widget. - * + * */ "doLayout": boolean; /** * Toggles the movable aspect of the Dialog. If true, Dialog * can be dragged by it's title. If false it will remain centered * in the viewport. - * + * */ "draggable": boolean; /** * The time in milliseconds it takes the dialog to fade in and out - * + * */ "duration": number; /** * True if cursor is over this widget - * + * */ "hovering": boolean; /** * Maximum size to allow the dialog to expand to, relative to viewport size - * + * */ "maxRatio": number; /** * True if Dialog is currently displayed on screen. - * + * */ "open": boolean; /** * A Toggle to modify the default focus behavior of a Dialog, which * is to re-focus the element which had focus before being opened. * False will disable refocusing. Default: true - * + * */ "refocus": boolean; /** - * + * */ "searchContainerNode": boolean; /** * Will be "Error" if one or more of the child widgets has an invalid value, * "Incomplete" if not all of the required child widgets are filled in. Otherwise, "", * which indicates that the form is ready to be submitted. - * + * */ "state": string; /** * Path to template (HTML file) for this widget relative to dojo.baseUrl. * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead - * + * */ "templatePath": string; /** - * + * */ "templateString": string; /** * Construct the UI for this widget from a template, setting this.domNode. - * + * */ buildRendering(): void; /** * You can call this function directly, ex. in the event that you * programmatically add a widget to the form after the form has been * initialized. - * - * @param inStartup + * + * @param inStartup */ connectChildren(inStartup: boolean): void; /** - * + * */ destroy(): void; /** - * + * */ destroyRendering(): void; /** * Deprecated method. Applications no longer need to call this. Remove for 2.0. - * + * */ disconnectChildren(): void; /** @@ -13971,64 +13971,64 @@ declare module dijit { * After the user has pressed the submit button, the Dialog * first calls onExecute() to notify the container to hide the * dialog and restore focus to wherever it used to be. - * + * * Then this method is called. - * - * @param formContents + * + * @param formContents */ execute(formContents: Object): void; /** - * + * */ focus(): void; /** - * + * */ getValues(): any; /** * Hide the dialog - * + * */ hide(): any; /** * Returns true if all of the widgets are valid. * Deprecated, will be removed in 2.0. Use get("state") instead. - * + * */ isValid: {(): boolean}; /** - * + * */ postCreate(): void; /** - * + * */ postMixInProperties(): void; /** - * + * */ reset(): void; /** - * - * @param val + * + * @param val */ setValues(val: any): any; /** * Display the dialog - * + * */ show(): any; /** - * + * */ startup(): void; /** * returns if the form is valid - same as isValid - but * provides a few additional (ui-specific) features: - * + * * it will highlight any sub-widgets that are not valid * it will call focus() on the first invalid sub-widget - * + * */ validate(): any; /** @@ -14041,7 +14041,7 @@ declare module dijit { * Developer shouldn't override or connect to this method; * it's a private communication device between the TooltipDialog * and the thing that opened it (ex: dijit/form/DropDownButton) - * + * */ onCancel(): void; /** @@ -14049,24 +14049,24 @@ declare module dijit { * Developer shouldn't override or connect to this method; * it's a private communication device between the TooltipDialog * and the thing that opened it (ex: dijit/form/DropDownButton) - * + * */ onExecute(): void; /** * Called when data has been loaded from an href. * Unlike most other callbacks, this function can be connected to (via dojo.connect) * but should not be overridden. - * + * */ onLoad(): void; /** * Stub function to connect to if you want to do something * (like disable/enable a submit button) when the valid * state changes on the form as a whole. - * + * * Deprecated. Will be removed in 2.0. Use watch("state", ...) instead. - * - * @param isValid + * + * @param isValid */ onValidStateChange(isValid: boolean): void; } @@ -14076,38 +14076,38 @@ declare module dijit { * Controls the various active "levels" on the page, starting with the * stuff initially visible on the page (at z-index 0), and then having an entry for * each Dialog shown. - * + * */ interface _DialogLevelManager { /** * Called when the specified dialog is hidden/destroyed, after the fade-out * animation ends, in order to reset page focus, fix the underlay, etc. * If the specified dialog isn't open then does nothing. - * + * * Caller is responsible for either setting display:none on the dialog domNode, * or calling dijit/popup.hide(), or removing it from the page DOM. - * - * @param dialog + * + * @param dialog */ hide(dialog: dijit._WidgetBase): void; /** * Returns true if specified Dialog is the top in the task - * - * @param dialog + * + * @param dialog */ isTop(dialog: dijit._WidgetBase): boolean; /** * Call right before fade-in animation for new dialog. * Saves current focus, displays/adjusts underlay for new dialog, * and sets the z-index of the dialog itself. - * + * * New dialog will be displayed on top of all currently displayed dialogs. - * + * * Caller is responsible for setting focus in new dialog after the fade-in * animation completes. - * - * @param dialog - * @param underlayAttrs + * + * @param dialog + * @param underlayAttrs */ show(dialog: dijit._WidgetBase, underlayAttrs: Object): void; } @@ -14119,15 +14119,15 @@ declare module dijit { * A keyboard accessible color-picking widget * Grid showing various colors, so the user can pick a certain color. * Can be used standalone, or as a popup. - * - * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. - * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree */ class ColorPalette extends dijit._Widget implements dijit._TemplatedMixin, dijit._PaletteMixin { constructor(params?: Object, srcNodeRef?: HTMLElement); /** * True if mouse was pressed while over this widget, and hasn't been released yet - * + * */ "active": boolean; set(property:"active", value: boolean): void; @@ -14136,7 +14136,7 @@ declare module dijit { /** * Object to which attach points and events will be scoped. Defaults * to 'this'. - * + * */ "attachScope": Object; set(property:"attachScope", value: Object): void; @@ -14145,51 +14145,51 @@ declare module dijit { /** * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute * for each XXX attribute to be mapped to the DOM. - * + * * attributeMap sets up a "binding" between attributes (aka properties) * of the widget and the widget's DOM. * Changes to widget attributes listed in attributeMap will be * reflected into the DOM. - * + * * For example, calling set('title', 'hello') * on a TitlePane will automatically cause the TitlePane's DOM to update * with the new title. - * + * * attributeMap is a hash where the key is an attribute of the widget, * and the value reflects a binding to a: - * + * * DOM node attribute * focus: {node: "focusNode", type: "attribute"} * Maps this.focus to this.focusNode.focus - * + * * DOM node innerHTML * title: { node: "titleNode", type: "innerHTML" } * Maps this.title to this.titleNode.innerHTML - * + * * DOM node innerText * title: { node: "titleNode", type: "innerText" } * Maps this.title to this.titleNode.innerText - * + * * DOM node CSS class * myClass: { node: "domNode", type: "class" } * Maps this.myClass to this.domNode.className - * + * * If the value is an array, then each element in the array matches one of the * formats of the above list. - * + * * There are also some shorthands for backwards compatibility: - * + * * string --> { node: string, type: "attribute" }, for example: * "focusNode" ---> { node: "focusNode", type: "attribute" } * "" --> { node: "domNode", type: "attribute" } - * + * */ "attributeMap": Object; set(property:"attributeMap", value: Object): void; get(property:"attributeMap"): Object; watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** - * + * */ "baseClass": string; set(property:"baseClass", value: string): void; @@ -14197,14 +14197,14 @@ declare module dijit { watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * CSS class applied to each cell in the palette - * + * */ "cellClass": string; set(property:"cellClass", value: string): void; get(property:"cellClass"): string; watch(property:"cellClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "class": string; set(property:"class", value: string): void; @@ -14214,24 +14214,24 @@ declare module dijit { * Designates where children of the source DOM node will be placed. * "Children" in this case refers to both DOM nodes and widgets. * For example, for myWidget: - * + * *
* here's a plain DOM node * and a widget * and another plain DOM node *
* containerNode would point to: - * + * * here's a plain DOM node * and a widget * and another plain DOM node * In templated widgets, "containerNode" is set via a * data-dojo-attach-point assignment. - * + * * containerNode must be defined for any widget that accepts innerHTML * (like ContentPane or BorderContainer or even Button), and conversely * is null for widgets that don't, like TextBox. - * + * */ "containerNode": HTMLElement; set(property:"containerNode", value: HTMLElement): void; @@ -14240,18 +14240,18 @@ declare module dijit { /** * Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that * need CSS classes applied on mouse hover/press and focus. - * + * * Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name * (like "dijitUpArrowButton"). Example: - * + * * { * "upArrowButton": "dijitUpArrowButton", * "downArrowButton": "dijitDownArrowButton" * } * The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it - * + * * is hovered, etc. - * + * */ "cssStateNodes": Object; set(property:"cssStateNodes", value: Object): void; @@ -14259,7 +14259,7 @@ declare module dijit { watch(property:"cssStateNodes", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * Number of milliseconds before a held key or button becomes typematic - * + * */ "defaultTimeout": number; set(property:"defaultTimeout", value: number): void; @@ -14269,7 +14269,7 @@ declare module dijit { * Bi-directional support, as defined by the HTML DIR * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's * default direction. - * + * */ "dir": string; set(property:"dir", value: string): void; @@ -14280,7 +14280,7 @@ declare module dijit { * Nodes may by assigned to other properties, usually through the * template system's data-dojo-attach-point syntax, but the domNode * property is the canonical "top level" node in widget UI. - * + * */ "domNode": HTMLElement; set(property:"domNode", value: HTMLElement): void; @@ -14289,7 +14289,7 @@ declare module dijit { /** * Constructor for Object created for each cell of the palette. * dyeClass should implement the dijit/_PaletteMixin.__Dye interface. - * + * */ "dyeClass": Function; set(property:"dyeClass", value: Function): void; @@ -14298,7 +14298,7 @@ declare module dijit { /** * This widget or a widget it contains has focus, or is "active" because * it was recently clicked. - * + * */ "focused": boolean; set(property:"focused", value: boolean): void; @@ -14306,7 +14306,7 @@ declare module dijit { watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * True if cursor is over this widget - * + * */ "hovering": boolean; set(property:"hovering", value: boolean): void; @@ -14317,7 +14317,7 @@ declare module dijit { * system. If the developer passes an ID which is known not to be * unique, the specified ID is ignored and the system-generated ID is * used instead. - * + * */ "id": string; set(property:"id", value: string): void; @@ -14328,7 +14328,7 @@ declare module dijit { * as defined by the HTML LANG attribute. * Value must be among the list of locales specified during by the Dojo bootstrap, * formatted according to RFC 3066 (like en-us). - * + * */ "lang": string; set(property:"lang", value: string): void; @@ -14337,7 +14337,7 @@ declare module dijit { /** * The document this widget belongs to. If not specified to constructor, will default to * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global - * + * */ "ownerDocument": Object; set(property:"ownerDocument", value: Object): void; @@ -14345,14 +14345,14 @@ declare module dijit { watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * Size of grid, either "7x10" or "3x4". - * + * */ "palette": string; set(property:"palette", value: string): void; get(property:"palette"): string; watch(property:"palette", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "searchContainerNode": boolean; set(property:"searchContainerNode", value: boolean): void; @@ -14360,7 +14360,7 @@ declare module dijit { watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * pointer to original DOM node - * + * */ "srcNodeRef": HTMLElement; set(property:"srcNodeRef", value: HTMLElement): void; @@ -14368,7 +14368,7 @@ declare module dijit { watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** * HTML style attributes as cssText string or name/value hash - * + * */ "style": string; set(property:"style", value: string): void; @@ -14376,7 +14376,7 @@ declare module dijit { watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Widget tab index. - * + * */ "tabIndex": string; set(property:"tabIndex", value: string): void; @@ -14385,7 +14385,7 @@ declare module dijit { /** * Path to template (HTML file) for this widget relative to dojo.baseUrl. * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead - * + * */ "templatePath": string; set(property:"templatePath", value: string): void; @@ -14393,7 +14393,7 @@ declare module dijit { watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * The template of this widget. - * + * */ "templateString": string; set(property:"templateString", value: string): void; @@ -14403,7 +14403,7 @@ declare module dijit { * Fraction of time used to change the typematic timer between events * 1.0 means that each typematic event fires at defaultTimeout intervals * Less than 1.0 means that each typematic event fires at an increasing faster rate - * + * */ "timeoutChangeRate": number; set(property:"timeoutChangeRate", value: number): void; @@ -14411,14 +14411,14 @@ declare module dijit { watch(property:"timeoutChangeRate", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} /** * HTML title attribute. - * + * * For form widgets this specifies a tooltip to display when hovering over * the widget (just like the native HTML title attribute). - * + * * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's * interpreted as HTML. - * + * */ "title": string; set(property:"title", value: string): void; @@ -14427,7 +14427,7 @@ declare module dijit { /** * When this widget's title attribute is used to for a tab label, accordion pane title, etc., * this specifies the tooltip to appear when the mouse is hovered over that text. - * + * */ "tooltip": string; set(property:"tooltip", value: string): void; @@ -14435,7 +14435,7 @@ declare module dijit { watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Currently selected color/emoticon/etc. - * + * */ "value": string; set(property:"value", value: string): void; @@ -14443,178 +14443,178 @@ declare module dijit { watch(property:"value", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: Object, value?: Object): any; /** - * + * */ buildRendering(): void; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: Function): any; /** * Wrapper to setTimeout to avoid deferred functions executing * after the originating widget has been destroyed. * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). - * - * @param fcn Function reference. - * @param delay OptionalDelay, defaults to 0. + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. */ defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). - * + * * This method will also destroy internal widgets such as those created from a template, * assuming those widgets exist inside of this.domNode but outside of this.containerNode. - * + * * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not * depend on the current ability to destroy a widget without destroying its descendants. Generally * they should use destroyRecursive() for widgets with children. - * - * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets */ destroy(preserveDom?: boolean): void; /** * Recursively destroy the children of this widget and their * descendants. - * - * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. */ destroyDescendants(preserveDom?: boolean): void; /** @@ -14622,41 +14622,41 @@ declare module dijit { * This is the generic "destructor" function that all widget users * should call to cleanly discard with a widget. Once a widget is * destroyed, it is removed from the manager object. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. */ destroyRecursive(preserveDom?: boolean): void; /** * Destroys the DOM nodes associated with this widget. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. */ destroyRendering(preserveDom?: boolean): void; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Disconnects handle created by connect. - * - * @param handle + * + * @param handle */ disconnect(handle: any): void; /** * Used by widgets to signal that a synthetic event occurred, ex: - * + * * myWidget.emit("attrmodified-selectedChildWidget", {}). * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. * Also calls onType() method, if present, and returns value from that method. * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). - * - * @param type - * @param eventObj Optional - * @param callbackArgs Optional + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional */ emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Focus this widget. Puts focus on the most recently focused cell. - * + * */ focus(): void; /** @@ -14664,15 +14664,15 @@ declare module dijit { * Get a named property from a widget. The property may * potentially be retrieved via a getter method. If no getter is defined, this * just retrieves the object's property. - * + * * For example, if the widget has properties foo and bar * and a method named _getFooAttr(), calling: * myWidget.get("foo") would be equivalent to calling * widget._getFooAttr() and myWidget.get("bar") * would be equivalent to the expression * widget.bar2 - * - * @param name The property to get. + * + * @param name The property to get. */ get(name: any): any; /** @@ -14680,54 +14680,54 @@ declare module dijit { * is this widget. Note that it does not return all descendants, but rather just direct children. * Analogous to Node.childNodes, * except containing widgets rather than DOMNodes. - * + * * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) * outside of this.containerNode. - * + * * Note that the array returned is a simple array. Application code should not assume * existence of methods like forEach(). - * + * */ getChildren(): any[]; /** * Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. * This method should generally be avoided as it returns widgets declared in templates, which are * supposed to be internal/hidden, but it's left here for back-compat reasons. - * + * */ getDescendants(): any[]; /** * Returns the parent widget of this widget. - * + * */ getParent(): any; /** * Return true if this widget can currently be focused * and false if not - * + * */ isFocusable(): any; /** * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) - * + * */ isLeftToRight(): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: String, func: Function): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: Function, func: Function): any; /** * Track specified handles and remove/destroy them when this instance is destroyed, unless they were * already removed/destroyed manually. - * + * */ own(): any; /** @@ -14736,9 +14736,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: String): any; /** @@ -14747,9 +14747,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: String): any; /** @@ -14758,9 +14758,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: String): any; /** @@ -14769,9 +14769,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: number): any; /** @@ -14780,9 +14780,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: number): any; /** @@ -14791,13 +14791,13 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: number): any; /** - * + * */ postCreate(): void; /** @@ -14805,62 +14805,62 @@ declare module dijit { * but before the widget template is instantiated. Especially * useful to set properties that are referenced in the widget * template. - * + * */ postMixInProperties(): void; /** * Set a property on a widget * Sets named properties on a widget which may potentially be handled by a * setter in the widget. - * + * * For example, if the widget has properties foo and bar * and a method named _setFooAttr(), calling * myWidget.set("foo", "Howdy!") would be equivalent to calling * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) * would be equivalent to the statement widget.bar = 3; - * + * * set() may also be called with a hash of name/value pairs, ex: - * + * * myWidget.set({ * foo: "Howdy", * bar: 3 * }); * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) - * - * @param name The property to set. - * @param value The value to set in the property. + * + * @param name The property to set. + * @param value The value to set in the property. */ set(name: any, value: any): any; /** * Deprecated. Use set() instead. - * - * @param attr - * @param value + * + * @param attr + * @param value */ setAttribute(attr: String, value: any): void; /** * Processing after the DOM fragment is added to the document * Called after a widget and its children have been created and added to the page, * and all related widgets have finished their create() cycle, up through postCreate(). - * + * * Note that startup() may be called while the widget is still hidden, for example if the widget is * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. * For widgets that need to do layout, it's best to put that layout code inside resize(), and then * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. - * + * */ startup(): void; /** * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. - * + * * Subscribes to the specified topic and calls the specified method * of this object and registers for unsubscribe() on widget destroy. - * + * * Provide widget-specific analog to dojo.subscribe, except with the * implicit use of this widget as the target object. - * - * @param t The topic - * @param method The callback + * + * @param t The topic + * @param method The callback */ subscribe(t: String, method: Function): any; /** @@ -14868,29 +14868,29 @@ declare module dijit { * When a widget is cast to a string, this method will be used to generate the * output. Currently, it does not implement any sort of reversible * serialization. - * + * */ toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. - * + * */ uninitialize(): boolean; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Unsubscribes handle created by this.subscribe. * Also removes handle from this widget's list of subscriptions - * - * @param handle + * + * @param handle */ unsubscribe(handle: Object): void; /** * Watches a property for changes - * - * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched - * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; /** @@ -14903,120 +14903,120 @@ declare module dijit { * focus moved to something outside of it, or the user * clicked somewhere outside of it, or the widget was * hidden. - * + * */ onBlur(): void; /** * Callback when a cell is selected. - * - * @param value Value corresponding to cell. + * + * @param value Value corresponding to cell. */ onChange(value: String): void; /** * Connect to this function to receive notifications of mouse click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onClick(event: any): void; /** * Called when this widget is being displayed as a popup (ex: a Calendar popped * up from a DateTextBox), and it is hidden. * This is called from the dijit.popup code, and should not be called directly. - * + * * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. * Callback if a user tries to close the child. Child will be closed if this function returns true. - * + * */ onClose(): boolean; /** * Connect to this function to receive notifications of mouse double click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onDblClick(event: any): void; /** * Called when the widget becomes "active" because * it or a widget inside of it either has focus, or has recently * been clicked. - * + * */ onFocus(): void; /** * Called when another widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onHide(): void; /** * Connect to this function to receive notifications of keys being pressed down. - * - * @param event key Event + * + * @param event key Event */ onKeyDown(event: any): void; /** * Connect to this function to receive notifications of printable keys being typed. - * - * @param event key Event + * + * @param event key Event */ onKeyPress(event: any): void; /** * Connect to this function to receive notifications of keys being released. - * - * @param event key Event + * + * @param event key Event */ onKeyUp(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is pressed down. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseDown(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseEnter(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseLeave(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseMove(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOut(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOver(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is released. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseUp(event: any): void; /** * Called when this widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onShow(): void; } @@ -15026,104 +15026,104 @@ declare module dijit { * * Object associated with each cell in a ColorPalette palette. * Implements dijit/Dye. - * - * @param alias English name of the color. - * @param row Vertical position in grid. - * @param col - * @param title Localized name of the color. + * + * @param alias English name of the color. + * @param row Vertical position in grid. + * @param col + * @param title Localized name of the color. */ class _Color extends dojo._base.Color { constructor(alias: String, row: number, col: any, title: String); /** - * + * */ "a": number; /** - * + * */ "b": number; /** - * + * */ "g": number; /** - * + * */ "hcTemplate": string; /** - * + * */ "r": number; /** - * + * */ "template": string; /** - * - * @param cell - * @param blankGif + * + * @param cell + * @param blankGif */ fillCell(cell: HTMLElement, blankGif: String): void; /** * Note that although dijit._Color is initialized with a value like "white" getValue() always * returns a hex value - * + * */ getValue(): any; /** * makes sure that the object has correct attributes - * + * */ sanitize(): void; /** * Takes a named string, hex string, array of rgb or rgba values, * an object with r, g, b, and a properties, or another Color object * and sets this color instance to that value. - * - * @param color + * + * @param color */ setColor(color: any[]): Function; /** * Takes a named string, hex string, array of rgb or rgba values, * an object with r, g, b, and a properties, or another Color object * and sets this color instance to that value. - * - * @param color + * + * @param color */ setColor(color: String): Function; /** * Takes a named string, hex string, array of rgb or rgba values, * an object with r, g, b, and a properties, or another Color object * and sets this color instance to that value. - * - * @param color + * + * @param color */ setColor(color: Object): Function; /** * Returns a css color string in rgb(a) representation - * - * @param includeAlpha Optional + * + * @param includeAlpha Optional */ toCss(includeAlpha: boolean): String; /** * Returns a CSS color string in hexadecimal representation - * + * */ toHex(): String; /** * Returns 3 component array of rgb values - * + * */ toRgb(): any[]; /** * Returns a 4 component array of rgba values from the color * represented by this object. - * + * */ toRgba(): any[]; /** * Returns a visual representation of the color - * + * */ toString(): any; } @@ -15134,15 +15134,15 @@ declare module dijit { * * An accessible fieldset that can be expanded or collapsed via * its legend. Fieldset extends dijit.TitlePane. - * - * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. - * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree */ class Fieldset extends dijit.TitlePane { constructor(params?: Object, srcNodeRef?: HTMLElement); /** * True if mouse was pressed while over this widget, and hasn't been released yet - * + * */ "active": boolean; set(property:"active", value: boolean): void; @@ -15151,7 +15151,7 @@ declare module dijit { /** * Object to which attach points and events will be scoped. Defaults * to 'this'. - * + * */ "attachScope": Object; set(property:"attachScope", value: Object): void; @@ -15160,44 +15160,44 @@ declare module dijit { /** * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute * for each XXX attribute to be mapped to the DOM. - * + * * attributeMap sets up a "binding" between attributes (aka properties) * of the widget and the widget's DOM. * Changes to widget attributes listed in attributeMap will be * reflected into the DOM. - * + * * For example, calling set('title', 'hello') * on a TitlePane will automatically cause the TitlePane's DOM to update * with the new title. - * + * * attributeMap is a hash where the key is an attribute of the widget, * and the value reflects a binding to a: - * + * * DOM node attribute * focus: {node: "focusNode", type: "attribute"} * Maps this.focus to this.focusNode.focus - * + * * DOM node innerHTML * title: { node: "titleNode", type: "innerHTML" } * Maps this.title to this.titleNode.innerHTML - * + * * DOM node innerText * title: { node: "titleNode", type: "innerText" } * Maps this.title to this.titleNode.innerText - * + * * DOM node CSS class * myClass: { node: "domNode", type: "class" } * Maps this.myClass to this.domNode.className - * + * * If the value is an array, then each element in the array matches one of the * formats of the above list. - * + * * There are also some shorthands for backwards compatibility: - * + * * string --> { node: string, type: "attribute" }, for example: * "focusNode" ---> { node: "focusNode", type: "attribute" } * "" --> { node: "domNode", type: "attribute" } - * + * */ "attributeMap": Object; set(property:"attributeMap", value: Object): void; @@ -15205,14 +15205,14 @@ declare module dijit { watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * The root className to use for the various states of this widget - * + * */ "baseClass": string; set(property:"baseClass", value: string): void; get(property:"baseClass"): string; watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "class": string; set(property:"class", value: string): void; @@ -15222,24 +15222,24 @@ declare module dijit { * Designates where children of the source DOM node will be placed. * "Children" in this case refers to both DOM nodes and widgets. * For example, for myWidget: - * + * *
* here's a plain DOM node * and a widget * and another plain DOM node *
* containerNode would point to: - * + * * here's a plain DOM node * and a widget * and another plain DOM node * In templated widgets, "containerNode" is set via a * data-dojo-attach-point assignment. - * + * * containerNode must be defined for any widget that accepts innerHTML * (like ContentPane or BorderContainer or even Button), and conversely * is null for widgets that don't, like TextBox. - * + * */ "containerNode": HTMLElement; set(property:"containerNode", value: HTMLElement): void; @@ -15249,7 +15249,7 @@ declare module dijit { * The innerHTML of the ContentPane. * Note that the initialization parameter / argument to set("content", ...) * can be a String, DomNode, Nodelist, or _Widget. - * + * */ "content": string; set(property:"content", value: string): void; @@ -15258,18 +15258,18 @@ declare module dijit { /** * Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that * need CSS classes applied on mouse hover/press and focus. - * + * * Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name * (like "dijitUpArrowButton"). Example: - * + * * { * "upArrowButton": "dijitUpArrowButton", * "downArrowButton": "dijitDownArrowButton" * } * The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it - * + * * is hovered, etc. - * + * */ "cssStateNodes": Object; set(property:"cssStateNodes", value: Object): void; @@ -15279,7 +15279,7 @@ declare module dijit { * Bi-directional support, as defined by the HTML DIR * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's * default direction. - * + * */ "dir": string; set(property:"dir", value: string): void; @@ -15290,7 +15290,7 @@ declare module dijit { * This ContentPane parameter doesn't make sense for TitlePane, since TitlePane * is never a child of a layout container, nor should TitlePane try to control * the size of an inner widget. - * + * */ "doLayout": boolean; set(property:"doLayout", value: boolean): void; @@ -15301,7 +15301,7 @@ declare module dijit { * Nodes may by assigned to other properties, usually through the * template system's data-dojo-attach-point syntax, but the domNode * property is the canonical "top level" node in widget UI. - * + * */ "domNode": HTMLElement; set(property:"domNode", value: HTMLElement): void; @@ -15309,7 +15309,7 @@ declare module dijit { watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** * Time in milliseconds to fade in/fade out - * + * */ "duration": number; set(property:"duration", value: number): void; @@ -15317,7 +15317,7 @@ declare module dijit { watch(property:"duration", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} /** * Message that shows if an error occurs - * + * */ "errorMessage": string; set(property:"errorMessage", value: string): void; @@ -15326,7 +15326,7 @@ declare module dijit { /** * Extract visible content from inside of .... . * I.e., strip and (and it's contents) from the href - * + * */ "extractContent": boolean; set(property:"extractContent", value: boolean): void; @@ -15335,7 +15335,7 @@ declare module dijit { /** * This widget or a widget it contains has focus, or is "active" because * it was recently clicked. - * + * */ "focused": boolean; set(property:"focused", value: boolean): void; @@ -15343,7 +15343,7 @@ declare module dijit { watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * True if cursor is over this widget - * + * */ "hovering": boolean; set(property:"hovering", value: boolean): void; @@ -15354,7 +15354,7 @@ declare module dijit { * Set this at construction if you want to load data externally when the * pane is shown. (Set preload=true to load it immediately.) * Changing href after creation doesn't have any effect; Use set('href', ...); - * + * */ "href": string; set(property:"href", value: string): void; @@ -15365,7 +15365,7 @@ declare module dijit { * system. If the developer passes an ID which is known not to be * unique, the specified ID is ignored and the system-generated ID is * used instead. - * + * */ "id": string; set(property:"id", value: string): void; @@ -15373,9 +15373,9 @@ declare module dijit { watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Parameters to pass to xhrGet() request, for example: - * + * *
- * + * */ "ioArgs": Object; set(property:"ioArgs", value: Object): void; @@ -15384,7 +15384,7 @@ declare module dijit { /** * Indicates that this widget will call resize() on it's child widgets * when they become visible. - * + * */ "isLayoutContainer": boolean; set(property:"isLayoutContainer", value: boolean): void; @@ -15394,10 +15394,10 @@ declare module dijit { * True if the ContentPane has data in it, either specified * during initialization (via href or inline content), or set * via set('content', ...) / set('href', ...) - * + * * False if it doesn't have any content, or if ContentPane is * still in the process of downloading href. - * + * */ "isLoaded": boolean; set(property:"isLoaded", value: boolean): void; @@ -15408,7 +15408,7 @@ declare module dijit { * as defined by the HTML LANG attribute. * Value must be among the list of locales specified during by the Dojo bootstrap, * formatted according to RFC 3066 (like en-us). - * + * */ "lang": string; set(property:"lang", value: string): void; @@ -15416,7 +15416,7 @@ declare module dijit { watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Message that shows while downloading - * + * */ "loadingMessage": string; set(property:"loadingMessage", value: string): void; @@ -15427,10 +15427,10 @@ declare module dijit { * Calling onLoadDeferred.then() registers your * callback to be called only once, when the prior set('href', ...) call or * the initial href parameter to the constructor finishes loading. - * + * * This is different than an onLoad() handler which gets called any time any href * or content is loaded. - * + * */ "onLoadDeferred": Object; set(property:"onLoadDeferred", value: Object): void; @@ -15438,7 +15438,7 @@ declare module dijit { watch(property:"onLoadDeferred", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * Whether fieldset is opened or closed. - * + * */ "open": boolean; set(property:"open", value: boolean): void; @@ -15447,7 +15447,7 @@ declare module dijit { /** * The document this widget belongs to. If not specified to constructor, will default to * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global - * + * */ "ownerDocument": Object; set(property:"ownerDocument", value: Object): void; @@ -15455,7 +15455,7 @@ declare module dijit { watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * Parse content and create the widgets, if any. - * + * */ "parseOnLoad": boolean; set(property:"parseOnLoad", value: boolean): void; @@ -15466,7 +15466,7 @@ declare module dijit { * will search for data-dojo-type (or dojoType). For backwards compatibility * reasons defaults to dojo._scopeName (which is "dojo" except when * multi-version support is used, when it will be something like dojo16, dojo20, etc.) - * + * */ "parserScope": string; set(property:"parserScope", value: string): void; @@ -15474,7 +15474,7 @@ declare module dijit { watch(property:"parserScope", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Force load of data on initialization even if pane is hidden. - * + * */ "preload": boolean; set(property:"preload", value: boolean): void; @@ -15482,7 +15482,7 @@ declare module dijit { watch(property:"preload", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * Prevent caching of data from href's by appending a timestamp to the href. - * + * */ "preventCache": boolean; set(property:"preventCache", value: boolean): void; @@ -15490,14 +15490,14 @@ declare module dijit { watch(property:"preventCache", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * Refresh (re-download) content when pane goes from hidden to shown - * + * */ "refreshOnShow": boolean; set(property:"refreshOnShow", value: boolean): void; get(property:"refreshOnShow"): boolean; watch(property:"refreshOnShow", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** - * + * */ "searchContainerNode": boolean; set(property:"searchContainerNode", value: boolean): void; @@ -15505,14 +15505,14 @@ declare module dijit { watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * pointer to original DOM node - * + * */ "srcNodeRef": HTMLElement; set(property:"srcNodeRef", value: HTMLElement): void; get(property:"srcNodeRef"): HTMLElement; watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** - * + * */ "stopParser": boolean; set(property:"stopParser", value: boolean): void; @@ -15520,7 +15520,7 @@ declare module dijit { watch(property:"stopParser", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * HTML style attributes as cssText string or name/value hash - * + * */ "style": string; set(property:"style", value: string): void; @@ -15529,7 +15529,7 @@ declare module dijit { /** * Tabindex setting for the title (so users can tab to the title then * use space/enter to open/close the title pane) - * + * */ "tabIndex": string; set(property:"tabIndex", value: string): void; @@ -15538,14 +15538,14 @@ declare module dijit { /** * Path to template (HTML file) for this widget relative to dojo.baseUrl. * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead - * + * */ "templatePath": string; set(property:"templatePath", value: string): void; get(property:"templatePath"): string; watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "templateString": string; set(property:"templateString", value: string): void; @@ -15553,7 +15553,7 @@ declare module dijit { watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Content of the legend tag. Overrides tag if not empty. - * + * */ "title": string; set(property:"title", value: string): void; @@ -15561,7 +15561,7 @@ declare module dijit { watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * Whether pane can be opened or closed by clicking the title bar. - * + * */ "toggleable": boolean; set(property:"toggleable", value: boolean): void; @@ -15570,7 +15570,7 @@ declare module dijit { /** * When this widget's title attribute is used to for a tab label, accordion pane title, etc., * this specifies the tooltip to appear when the mouse is hovered over that text. - * + * */ "tooltip": string; set(property:"tooltip", value: string): void; @@ -15580,219 +15580,219 @@ declare module dijit { * Makes the given widget a child of this widget. * Inserts specified child widget's dom node as a child of this widget's * container node, and possibly does other processing (such as layout). - * - * @param widget - * @param insertIndex Optional + * + * @param widget + * @param insertIndex Optional */ addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: Object, value?: Object): any; /** - * + * */ buildRendering(): void; /** * Cancels an in-flight download of content - * + * */ cancel(): void; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: Function): any; /** - * - * @param params - * @param srcNodeRef + * + * @param params + * @param srcNodeRef */ create(params: any, srcNodeRef: any): void; /** * Wrapper to setTimeout to avoid deferred functions executing * after the originating widget has been destroyed. * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). - * - * @param fcn Function reference. - * @param delay OptionalDelay, defaults to 0. + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. */ defer(fcn: Function, delay?: number): Object; /** - * + * */ destroy(): void; /** * Destroy all the widgets inside the ContentPane and empty containerNode - * - * @param preserveDom + * + * @param preserveDom */ destroyDescendants(preserveDom?: boolean): void; /** * Destroy the ContentPane and its contents - * - * @param preserveDom + * + * @param preserveDom */ destroyRecursive(preserveDom?: boolean): void; /** * Destroys the DOM nodes associated with this widget. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. */ destroyRendering(preserveDom?: boolean): void; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Disconnects handle created by connect. - * - * @param handle + * + * @param handle */ disconnect(handle: any): void; /** * Used by widgets to signal that a synthetic event occurred, ex: - * + * * myWidget.emit("attrmodified-selectedChildWidget", {}). * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. * Also calls onType() method, if present, and returns value from that method. * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). - * - * @param type - * @param eventObj Optional - * @param callbackArgs Optional + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional */ emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** @@ -15800,15 +15800,15 @@ declare module dijit { * Get a named property from a widget. The property may * potentially be retrieved via a getter method. If no getter is defined, this * just retrieves the object's property. - * + * * For example, if the widget has properties foo and bar * and a method named _getFooAttr(), calling: * myWidget.get("foo") would be equivalent to calling * widget._getFooAttr() and myWidget.get("bar") * would be equivalent to the expression * widget.bar2 - * - * @param name The property to get. + * + * @param name The property to get. */ get(name: any): any; /** @@ -15816,78 +15816,78 @@ declare module dijit { * is this widget. Note that it does not return all descendants, but rather just direct children. * Analogous to Node.childNodes, * except containing widgets rather than DOMNodes. - * + * * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) * outside of this.containerNode. - * + * * Note that the array returned is a simple array. Application code should not assume * existence of methods like forEach(). - * + * */ getChildren(): any[]; /** * Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. * This method should generally be avoided as it returns widgets declared in templates, which are * supposed to be internal/hidden, but it's left here for back-compat reasons. - * + * */ getDescendants(): any[]; /** * Gets the index of the child in this container or -1 if not found - * - * @param child + * + * @param child */ getIndexOfChild(child: dijit._WidgetBase): any; /** * Returns the parent widget of this widget. - * + * */ getParent(): any; /** * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. - * + * */ hasChildren(): boolean; /** * Function that should grab the content specified via href. - * - * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. + * + * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. */ ioMethod(args: Object): any; /** * Return true if this widget can currently be focused * and false if not - * + * */ isFocusable(): any; /** * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) - * + * */ isLeftToRight(): any; /** - * - * @param params - * @param node - * @param ctor + * + * @param params + * @param node + * @param ctor */ markupFactory(params: any, node: any, ctor: any): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: String, func: Function): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: Function, func: Function): any; /** * Track specified handles and remove/destroy them when this instance is destroyed, unless they were * already removed/destroyed manually. - * + * */ own(): any; /** @@ -15896,9 +15896,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: String): any; /** @@ -15907,9 +15907,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: String): any; /** @@ -15918,9 +15918,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: String): any; /** @@ -15929,9 +15929,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: number): any; /** @@ -15940,9 +15940,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: number): any; /** @@ -15951,17 +15951,17 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: number): any; /** - * + * */ postCreate(): void; /** - * + * */ postMixInProperties(): void; /** @@ -15969,116 +15969,116 @@ declare module dijit { * cancels any currently in-flight requests * posts "loading..." message * sends XHR to download new data - * + * */ refresh(): any; /** * Removes the passed widget instance from this widget but does * not destroy it. You can also pass in an integer indicating * the index within the container to remove (ie, removeChild(5) removes the sixth widget). - * - * @param widget + * + * @param widget */ removeChild(widget: dijit._WidgetBase): void; /** * Removes the passed widget instance from this widget but does * not destroy it. You can also pass in an integer indicating * the index within the container to remove (ie, removeChild(5) removes the sixth widget). - * - * @param widget + * + * @param widget */ removeChild(widget: number): void; /** * See dijit/layout/_LayoutWidget.resize() for description. * Although ContentPane doesn't extend _LayoutWidget, it does implement * the same API. - * - * @param changeSize - * @param resultSize + * + * @param changeSize + * @param resultSize */ resize(changeSize: any, resultSize: any): void; /** * Set a property on a widget * Sets named properties on a widget which may potentially be handled by a * setter in the widget. - * + * * For example, if the widget has properties foo and bar * and a method named _setFooAttr(), calling * myWidget.set("foo", "Howdy!") would be equivalent to calling * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) * would be equivalent to the statement widget.bar = 3; - * + * * set() may also be called with a hash of name/value pairs, ex: - * + * * myWidget.set({ * foo: "Howdy", * bar: 3 * }); * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) - * - * @param name The property to set. - * @param value The value to set in the property. + * + * @param name The property to set. + * @param value The value to set in the property. */ set(name: any, value: any): any; /** * Deprecated. Use set() instead. - * - * @param attr - * @param value + * + * @param attr + * @param value */ setAttribute(attr: String, value: any): void; /** * Deprecated. Use set('content', ...) instead. - * - * @param data + * + * @param data */ setContent(data: String): void; /** * Deprecated. Use set('content', ...) instead. - * - * @param data + * + * @param data */ setContent(data: HTMLElement): void; /** * Deprecated. Use set('content', ...) instead. - * - * @param data + * + * @param data */ setContent(data: NodeList): void; /** * Deprecated. Use set('href', ...) instead. - * - * @param href + * + * @param href */ setHref(href: String): any; /** * Deprecated. Use set('href', ...) instead. - * - * @param href + * + * @param href */ setHref(href: URL): any; /** * Deprecated. Use set('title', ...) instead. - * - * @param title + * + * @param title */ setTitle(title: String): void; /** * Call startup() on all children including non _Widget ones like dojo/dnd/Source objects - * + * */ startup(): void; /** * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. - * + * * Subscribes to the specified topic and calls the specified method * of this object and registers for unsubscribe() on widget destroy. - * + * * Provide widget-specific analog to dojo.subscribe, except with the * implicit use of this widget as the target object. - * - * @param t The topic - * @param method The callback + * + * @param t The topic + * @param method The callback */ subscribe(t: String, method: Function): any; /** @@ -16086,29 +16086,29 @@ declare module dijit { * When a widget is cast to a string, this method will be used to generate the * output. Currently, it does not implement any sort of reversible * serialization. - * + * */ toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. - * + * */ uninitialize(): boolean; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Unsubscribes handle created by this.subscribe. * Also removes handle from this widget's list of subscriptions - * - * @param handle + * + * @param handle */ unsubscribe(handle: Object): void; /** * Watches a property for changes - * - * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched - * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; /** @@ -16121,58 +16121,58 @@ declare module dijit { * focus moved to something outside of it, or the user * clicked somewhere outside of it, or the widget was * hidden. - * + * */ onBlur(): void; /** * Connect to this function to receive notifications of mouse click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onClick(event: any): void; /** * Called when this widget is being displayed as a popup (ex: a Calendar popped * up from a DateTextBox), and it is hidden. * This is called from the dijit.popup code, and should not be called directly. - * + * * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. * Callback if a user tries to close the child. Child will be closed if this function returns true. - * + * */ onClose(): boolean; /** * Called on DOM faults, require faults etc. in content. - * + * * In order to display an error message in the pane, return * the error message from this method, as an HTML string. - * + * * By default (if this method is not overriden), it returns * nothing, so the error message is just printed to the console. - * - * @param error + * + * @param error */ onContentError(error: Error): void; /** * Connect to this function to receive notifications of mouse double click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onDblClick(event: any): void; /** * Called when download is finished. - * + * */ onDownloadEnd(): void; /** * Called when download error occurs. - * + * * In order to display an error message in the pane, return * the error message from this method, as an HTML string. - * + * * Default behavior (if this method is not overriden) is to display * the error message inside the pane. - * - * @param error + * + * @param error */ onDownloadError(error: Error): any; /** @@ -16180,103 +16180,103 @@ declare module dijit { * The string returned by this function will be the html * that tells the user we are loading something. * Override with your own function if you want to change text. - * + * */ onDownloadStart(): any; /** * Called when the widget becomes "active" because * it or a widget inside of it either has focus, or has recently * been clicked. - * + * */ onFocus(): void; /** * Called when another widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onHide(): void; /** * Connect to this function to receive notifications of keys being pressed down. - * - * @param event key Event + * + * @param event key Event */ onKeyDown(event: any): void; /** * Connect to this function to receive notifications of printable keys being typed. - * - * @param event key Event + * + * @param event key Event */ onKeyPress(event: any): void; /** * Connect to this function to receive notifications of keys being released. - * - * @param event key Event + * + * @param event key Event */ onKeyUp(event: any): void; /** * Event hook, is called after everything is loaded and widgetified - * - * @param data + * + * @param data */ onLoad(data: any): void; /** * Connect to this function to receive notifications of when the mouse button is pressed down. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseDown(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseEnter(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseLeave(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseMove(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOut(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOver(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is released. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseUp(event: any): void; /** * Called when this widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onShow(): void; /** * Event hook, is called before old content is cleared - * + * */ onUnload(): void; } @@ -16284,9 +16284,9 @@ declare module dijit { * Permalink: http://dojotoolkit.org/api/1.9/dijit/DropDownMenu.html * * A menu, without features for context menu (Meaning, drop down menu) - * - * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. - * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree */ class DropDownMenu extends dijit._MenuBase implements dijit._OnDijitClickMixin { constructor(params?: Object, srcNodeRef?: HTMLElement); @@ -16296,7 +16296,7 @@ declare module dijit { * since TAB is a navigation operation and not a selection one. * For Windows apps, pressing the ALT key focuses the menubar menus (similar to TAB navigation) but the * menu is not active (ie no dropdown) until an item is clicked. - * + * */ "activated": boolean; set(property:"activated", value: boolean): void; @@ -16304,7 +16304,7 @@ declare module dijit { watch(property:"activated", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * True if mouse was pressed while over this widget, and hasn't been released yet - * + * */ "active": boolean; set(property:"active", value: boolean): void; @@ -16313,7 +16313,7 @@ declare module dijit { /** * Object to which attach points and events will be scoped. Defaults * to 'this'. - * + * */ "attachScope": Object; set(property:"attachScope", value: Object): void; @@ -16322,44 +16322,44 @@ declare module dijit { /** * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute * for each XXX attribute to be mapped to the DOM. - * + * * attributeMap sets up a "binding" between attributes (aka properties) * of the widget and the widget's DOM. * Changes to widget attributes listed in attributeMap will be * reflected into the DOM. - * + * * For example, calling set('title', 'hello') * on a TitlePane will automatically cause the TitlePane's DOM to update * with the new title. - * + * * attributeMap is a hash where the key is an attribute of the widget, * and the value reflects a binding to a: - * + * * DOM node attribute * focus: {node: "focusNode", type: "attribute"} * Maps this.focus to this.focusNode.focus - * + * * DOM node innerHTML * title: { node: "titleNode", type: "innerHTML" } * Maps this.title to this.titleNode.innerHTML - * + * * DOM node innerText * title: { node: "titleNode", type: "innerText" } * Maps this.title to this.titleNode.innerText - * + * * DOM node CSS class * myClass: { node: "domNode", type: "class" } * Maps this.myClass to this.domNode.className - * + * * If the value is an array, then each element in the array matches one of the * formats of the above list. - * + * * There are also some shorthands for backwards compatibility: - * + * * string --> { node: string, type: "attribute" }, for example: * "focusNode" ---> { node: "focusNode", type: "attribute" } * "" --> { node: "domNode", type: "attribute" } - * + * */ "attributeMap": Object; set(property:"attributeMap", value: Object): void; @@ -16368,21 +16368,21 @@ declare module dijit { /** * A toggle to control whether or not a Menu gets focused when opened as a drop down from a MenuBar * or DropDownButton/ComboButton. Note though that it always get focused when opened via the keyboard. - * + * */ "autoFocus": boolean; set(property:"autoFocus", value: boolean): void; get(property:"autoFocus"): boolean; watch(property:"autoFocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** - * + * */ "baseClass": string; set(property:"baseClass", value: string): void; get(property:"baseClass"): string; watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "class": string; set(property:"class", value: string): void; @@ -16392,24 +16392,24 @@ declare module dijit { * Designates where children of the source DOM node will be placed. * "Children" in this case refers to both DOM nodes and widgets. * For example, for myWidget: - * + * *
* here's a plain DOM node * and a widget * and another plain DOM node *
* containerNode would point to: - * + * * here's a plain DOM node * and a widget * and another plain DOM node * In templated widgets, "containerNode" is set via a * data-dojo-attach-point assignment. - * + * * containerNode must be defined for any widget that accepts innerHTML * (like ContentPane or BorderContainer or even Button), and conversely * is null for widgets that don't, like TextBox. - * + * */ "containerNode": HTMLElement; set(property:"containerNode", value: HTMLElement): void; @@ -16418,18 +16418,18 @@ declare module dijit { /** * Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that * need CSS classes applied on mouse hover/press and focus. - * + * * Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name * (like "dijitUpArrowButton"). Example: - * + * * { * "upArrowButton": "dijitUpArrowButton", * "downArrowButton": "dijitDownArrowButton" * } * The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it - * + * * is hovered, etc. - * + * */ "cssStateNodes": Object; set(property:"cssStateNodes", value: Object): void; @@ -16439,7 +16439,7 @@ declare module dijit { * Bi-directional support, as defined by the HTML DIR * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's * default direction. - * + * */ "dir": string; set(property:"dir", value: string): void; @@ -16450,7 +16450,7 @@ declare module dijit { * Nodes may by assigned to other properties, usually through the * template system's data-dojo-attach-point syntax, but the domNode * property is the canonical "top level" node in widget UI. - * + * */ "domNode": HTMLElement; set(property:"domNode", value: HTMLElement): void; @@ -16459,7 +16459,7 @@ declare module dijit { /** * This widget or a widget it contains has focus, or is "active" because * it was recently clicked. - * + * */ "focused": boolean; set(property:"focused", value: boolean): void; @@ -16467,7 +16467,7 @@ declare module dijit { watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** * The currently focused child widget, or null if there isn't one - * + * */ "focusedChild": Object; set(property:"focusedChild", value: Object): void; @@ -16475,7 +16475,7 @@ declare module dijit { watch(property:"focusedChild", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * True if cursor is over this widget - * + * */ "hovering": boolean; set(property:"hovering", value: boolean): void; @@ -16486,7 +16486,7 @@ declare module dijit { * system. If the developer passes an ID which is known not to be * unique, the specified ID is ignored and the system-generated ID is * used instead. - * + * */ "id": string; set(property:"id", value: string): void; @@ -16497,7 +16497,7 @@ declare module dijit { * as defined by the HTML LANG attribute. * Value must be among the list of locales specified during by the Dojo bootstrap, * formatted according to RFC 3066 (like en-us). - * + * */ "lang": string; set(property:"lang", value: string): void; @@ -16507,10 +16507,10 @@ declare module dijit { * If multiple characters are typed where each keystroke happens within * multiCharSearchDuration of the previous keystroke, * search for nodes matching all the keystrokes. - * + * * For example, typing "ab" will search for entries starting with * "ab" unless the delay between "a" and "b" is greater than multiCharSearchDuration. - * + * */ "multiCharSearchDuration": number; set(property:"multiCharSearchDuration", value: number): void; @@ -16519,7 +16519,7 @@ declare module dijit { /** * The document this widget belongs to. If not specified to constructor, will default to * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global - * + * */ "ownerDocument": Object; set(property:"ownerDocument", value: Object): void; @@ -16527,7 +16527,7 @@ declare module dijit { watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * pointer to menu that displayed me - * + * */ "parentMenu": Object; set(property:"parentMenu", value: Object): void; @@ -16536,7 +16536,7 @@ declare module dijit { /** * For a passive (unclicked) Menu, number of milliseconds before hovering (without clicking) will cause * the popup to open. Default is Infinity, meaning you need to click the menu to open it. - * + * */ "passivePopupDelay": number; set(property:"passivePopupDelay", value: number): void; @@ -16545,14 +16545,14 @@ declare module dijit { /** * After a menu has been activated (by clicking on it etc.), number of milliseconds before hovering * (without clicking) another MenuItem causes that MenuItem's popup to automatically open. - * + * */ "popupDelay": number; set(property:"popupDelay", value: number): void; get(property:"popupDelay"): number; watch(property:"popupDelay", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} /** - * + * */ "searchContainerNode": boolean; set(property:"searchContainerNode", value: boolean): void; @@ -16563,7 +16563,7 @@ declare module dijit { * If a submenu is open, will be set to MenuItem that displayed the submenu. OTOH, if * this Menu is in passive mode (i.e. hasn't been clicked yet), will be null, because * "selected" is not merely "hovered". - * + * */ "selected": Object; set(property:"selected", value: Object): void; @@ -16571,7 +16571,7 @@ declare module dijit { watch(property:"selected", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** * pointer to original DOM node - * + * */ "srcNodeRef": HTMLElement; set(property:"srcNodeRef", value: HTMLElement): void; @@ -16579,7 +16579,7 @@ declare module dijit { watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** * HTML style attributes as cssText string or name/value hash - * + * */ "style": string; set(property:"style", value: string): void; @@ -16589,7 +16589,7 @@ declare module dijit { * Tab index of the container; same as HTML tabIndex attribute. * Note then when user tabs into the container, focus is immediately * moved to the first item in the container. - * + * */ "tabIndex": string; set(property:"tabIndex", value: string): void; @@ -16598,14 +16598,14 @@ declare module dijit { /** * Path to template (HTML file) for this widget relative to dojo.baseUrl. * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead - * + * */ "templatePath": string; set(property:"templatePath", value: string): void; get(property:"templatePath"): string; watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * + * */ "templateString": string; set(property:"templateString", value: string): void; @@ -16613,14 +16613,14 @@ declare module dijit { watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** * HTML title attribute. - * + * * For form widgets this specifies a tooltip to display when hovering over * the widget (just like the native HTML title attribute). - * + * * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's * interpreted as HTML. - * + * */ "title": string; set(property:"title", value: string): void; @@ -16629,210 +16629,210 @@ declare module dijit { /** * When this widget's title attribute is used to for a tab label, accordion pane title, etc., * this specifies the tooltip to appear when the mouse is hovered over that text. - * + * */ "tooltip": string; set(property:"tooltip", value: string): void; get(property:"tooltip"): string; watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * - * @param widget - * @param insertIndex Optional + * + * @param widget + * @param insertIndex Optional */ addChild(widget: dijit._WidgetBase, insertIndex?: number): void; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: String, value?: Object): any; /** * This method is deprecated, use get() or set() directly. - * - * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. - * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. */ attr(name: Object, value?: Object): any; /** * Construct the UI for this widget, setting this.domNode. * Most widgets will mixin dijit._TemplatedMixin, which implements this method. - * + * */ buildRendering(): void; /** * Selector (passed to on.selector()) used to identify MenuItem child widgets, but exclude inert children * like MenuSeparator. If subclass overrides to a string (ex: "> *"), the subclass must require dojo/query. - * - * @param node + * + * @param node */ childSelector(node: HTMLElement): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: String): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: String, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: Object, event: Function, method: Function): any; /** * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. - * + * * Connects specified obj/event to specified method of this object * and registers for disconnect() on widget destroy. - * + * * Provide widget-specific analog to dojo.connect, except with the * implicit use of this widget as the target object. * Events connected with this.connect are disconnected upon * destruction. - * - * @param obj - * @param event - * @param method + * + * @param obj + * @param event + * @param method */ connect(obj: any, event: Function, method: Function): any; /** * Deprecated. You can call this in postCreate() to attach the keyboard handlers to the container, * but the preferred method is to override _onLeftArrow() and _onRightArrow(), or * _onUpArrow() and _onDownArrow(), to call focusPrev() and focusNext(). - * - * @param prevKeyCodes Key codes for navigating to the previous child. - * @param nextKeyCodes Key codes for navigating to the next child. + * + * @param prevKeyCodes Key codes for navigating to the previous child. + * @param nextKeyCodes Key codes for navigating to the next child. */ connectKeyNavHandlers(prevKeyCodes: dojo.keys, nextKeyCodes: dojo.keys): void; /** * Wrapper to setTimeout to avoid deferred functions executing * after the originating widget has been destroyed. * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). - * - * @param fcn Function reference. - * @param delay OptionalDelay, defaults to 0. + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. */ defer(fcn: Function, delay?: number): Object; /** * Destroy this widget, but not its descendants. Descendants means widgets inside of * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). - * + * * This method will also destroy internal widgets such as those created from a template, * assuming those widgets exist inside of this.domNode but outside of this.containerNode. - * + * * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not * depend on the current ability to destroy a widget without destroying its descendants. Generally * they should use destroyRecursive() for widgets with children. - * - * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets */ destroy(preserveDom?: boolean): void; /** * Recursively destroy the children of this widget and their * descendants. - * - * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. */ destroyDescendants(preserveDom?: boolean): void; /** @@ -16840,69 +16840,69 @@ declare module dijit { * This is the generic "destructor" function that all widget users * should call to cleanly discard with a widget. Once a widget is * destroyed, it is removed from the manager object. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. */ destroyRecursive(preserveDom?: boolean): void; /** * Destroys the DOM nodes associated with this widget. - * - * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. */ destroyRendering(preserveDom?: boolean): void; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Disconnects handle created by connect. - * - * @param handle + * + * @param handle */ disconnect(handle: any): void; /** * Used by widgets to signal that a synthetic event occurred, ex: - * + * * myWidget.emit("attrmodified-selectedChildWidget", {}). * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. * Also calls onType() method, if present, and returns value from that method. * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). - * - * @param type - * @param eventObj Optional - * @param callbackArgs Optional + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional */ emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; /** * Default focus() implementation: focus the first child. - * + * */ focus(): void; /** * Focus specified child widget. - * - * @param widget Reference to container's child widget - * @param last If true and if widget has multiple focusable nodes, focus thelast one instead of the first one + * + * @param widget Reference to container's child widget + * @param last If true and if widget has multiple focusable nodes, focus thelast one instead of the first one */ focusChild(widget: dijit._WidgetBase, last: boolean): void; /** * Focus the first focusable child in the container. - * + * */ focusFirstChild(): void; /** * Focus the last focusable child in the container. - * + * */ focusLastChild(): void; /** * Focus the next widget - * + * */ focusNext(): void; /** * Focus the last focusable node in the previous widget * (ex: go to the ComboButton icon section rather than button section) - * + * */ focusPrev(): void; /** @@ -16910,15 +16910,15 @@ declare module dijit { * Get a named property from a widget. The property may * potentially be retrieved via a getter method. If no getter is defined, this * just retrieves the object's property. - * + * * For example, if the widget has properties foo and bar * and a method named _getFooAttr(), calling: * myWidget.get("foo") would be equivalent to calling * widget._getFooAttr() and myWidget.get("bar") * would be equivalent to the expression * widget.bar2 - * - * @param name The property to get. + * + * @param name The property to get. */ get(name: any): any; /** @@ -16926,65 +16926,65 @@ declare module dijit { * is this widget. Note that it does not return all descendants, but rather just direct children. * Analogous to Node.childNodes, * except containing widgets rather than DOMNodes. - * + * * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) * outside of this.containerNode. - * + * * Note that the array returned is a simple array. Application code should not assume * existence of methods like forEach(). - * + * */ getChildren(): any[]; /** * Returns all the widgets contained by this, i.e., all widgets underneath this.containerNode. * This method should generally be avoided as it returns widgets declared in templates, which are * supposed to be internal/hidden, but it's left here for back-compat reasons. - * + * */ getDescendants(): any[]; /** * Gets the index of the child in this container or -1 if not found - * - * @param child + * + * @param child */ getIndexOfChild(child: dijit._WidgetBase): any; /** * Returns the parent widget of this widget. - * + * */ getParent(): any; /** * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. - * + * */ hasChildren(): boolean; /** * Return true if this widget can currently be focused * and false if not - * + * */ isFocusable(): any; /** * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) - * + * */ isLeftToRight(): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: String, func: Function): any; /** - * - * @param type protected - * @param func + * + * @param type protected + * @param func */ on(type: Function, func: Function): any; /** * Track specified handles and remove/destroy them when this instance is destroyed, unless they were * already removed/destroyed manually. - * + * */ own(): any; /** @@ -16993,9 +16993,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: String): any; /** @@ -17004,9 +17004,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: String): any; /** @@ -17015,9 +17015,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: String): any; /** @@ -17026,9 +17026,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: String, position?: number): any; /** @@ -17037,9 +17037,9 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: HTMLElement, position?: number): any; /** @@ -17048,13 +17048,13 @@ declare module dijit { * A convenience function provided in all _Widgets, providing a simple * shorthand mechanism to put an existing (or newly created) Widget * somewhere in the dom, and allow chaining. - * - * @param reference Widget, DOMNode, or id of widget or DOMNode - * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). */ placeAt(reference: dijit._WidgetBase, position?: number): any; /** - * + * */ postCreate(): void; /** @@ -17062,82 +17062,82 @@ declare module dijit { * but before the widget template is instantiated. Especially * useful to set properties that are referenced in the widget * template. - * + * */ postMixInProperties(): void; /** * Removes the passed widget instance from this widget but does * not destroy it. You can also pass in an integer indicating * the index within the container to remove (ie, removeChild(5) removes the sixth widget). - * - * @param widget + * + * @param widget */ removeChild(widget: dijit._WidgetBase): void; /** * Removes the passed widget instance from this widget but does * not destroy it. You can also pass in an integer indicating * the index within the container to remove (ie, removeChild(5) removes the sixth widget). - * - * @param widget + * + * @param widget */ removeChild(widget: number): void; /** * Set a property on a widget * Sets named properties on a widget which may potentially be handled by a * setter in the widget. - * + * * For example, if the widget has properties foo and bar * and a method named _setFooAttr(), calling * myWidget.set("foo", "Howdy!") would be equivalent to calling * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) * would be equivalent to the statement widget.bar = 3; - * + * * set() may also be called with a hash of name/value pairs, ex: - * + * * myWidget.set({ * foo: "Howdy", * bar: 3 * }); * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) - * - * @param name The property to set. - * @param value The value to set in the property. + * + * @param name The property to set. + * @param value The value to set in the property. */ set(name: any, value: any): any; /** * Deprecated. Use set() instead. - * - * @param attr - * @param value + * + * @param attr + * @param value */ setAttribute(attr: String, value: any): void; /** * Processing after the DOM fragment is added to the document * Called after a widget and its children have been created and added to the page, * and all related widgets have finished their create() cycle, up through postCreate(). - * + * * Note that startup() may be called while the widget is still hidden, for example if the widget is * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. * For widgets that need to do layout, it's best to put that layout code inside resize(), and then * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. - * + * */ startup(): void; /** - * + * */ startupKeyNavChildren(): void; /** * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. - * + * * Subscribes to the specified topic and calls the specified method * of this object and registers for unsubscribe() on widget destroy. - * + * * Provide widget-specific analog to dojo.subscribe, except with the * implicit use of this widget as the target object. - * - * @param t The topic - * @param method The callback + * + * @param t The topic + * @param method The callback */ subscribe(t: String, method: Function): any; /** @@ -17145,29 +17145,29 @@ declare module dijit { * When a widget is cast to a string, this method will be used to generate the * output. Currently, it does not implement any sort of reversible * serialization. - * + * */ toString(): string; /** * Deprecated. Override destroy() instead to implement custom widget tear-down * behavior. - * + * */ uninitialize(): boolean; /** * Deprecated, will be removed in 2.0, use handle.remove() instead. - * + * * Unsubscribes handle created by this.subscribe. * Also removes handle from this widget's list of subscriptions - * - * @param handle + * + * @param handle */ unsubscribe(handle: Object): void; /** * Watches a property for changes - * - * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched - * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; /** @@ -17180,27 +17180,27 @@ declare module dijit { * focus moved to something outside of it, or the user * clicked somewhere outside of it, or the widget was * hidden. - * + * */ onBlur(): void; /** * Attach point for notification about when the user cancels the current menu * This is an internal mechanism used for Menus to signal to their parent to * close them. In general developers should not attach to or override this method. - * - * @param closeAll + * + * @param closeAll */ onCancel(closeAll: boolean): void; /** * Connect to this function to receive notifications of mouse click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onClick(event: any): void; /** * Connect to this function to receive notifications of mouse double click events. - * - * @param event mouse Event + * + * @param event mouse Event */ onDblClick(event: any): void; /** @@ -17208,114 +17208,114 @@ declare module dijit { * This is an internal mechanism used for Menus to signal to their parent to * close them, because they are about to execute the onClick handler. In * general developers should not attach to or override this method. - * + * */ onExecute(): void; /** * Called when the widget becomes "active" because * it or a widget inside of it either has focus, or has recently * been clicked. - * + * */ onFocus(): void; /** * Called when another widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onHide(): void; /** * Called when cursor is over a MenuItem. - * - * @param item + * + * @param item */ onItemHover(item: dijit.MenuItem): void; /** * Callback fires when mouse exits a MenuItem - * - * @param item + * + * @param item */ onItemUnhover(item: dijit.MenuItem): void; /** * Attach point for notification about when a menu item has been searched for * via the keyboard search mechanism. - * - * @param item - * @param evt - * @param searchString - * @param numMatches + * + * @param item + * @param evt + * @param searchString + * @param numMatches */ onKeyboardSearch(item: dijit.MenuItem, evt: Event, searchString: String, numMatches: number): void; /** * Connect to this function to receive notifications of keys being pressed down. - * - * @param event key Event + * + * @param event key Event */ onKeyDown(event: any): void; /** * Connect to this function to receive notifications of printable keys being typed. - * - * @param event key Event + * + * @param event key Event */ onKeyPress(event: any): void; /** * Connect to this function to receive notifications of keys being released. - * - * @param event key Event + * + * @param event key Event */ onKeyUp(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is pressed down. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseDown(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseEnter(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseLeave(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseMove(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOut(event: any): void; /** * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseOver(event: any): void; /** * Connect to this function to receive notifications of when the mouse button is released. - * - * @param event mouse Event + * + * @param event mouse Event */ onMouseUp(event: any): void; /** * Called when this widget becomes the selected pane in a * dijit/layout/TabContainer, dijit/layout/StackContainer, * dijit/layout/AccordionContainer, etc. - * + * * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. - * + * */ onShow(): void; } @@ -17330,15 +17330,15 @@ declare module dijit { * browsers, and clipboard operations may have different results, to name * a few limitations. Note: this widget should not be used with the HTML *