diff --git a/cryptojs/cryptojs.d.ts b/cryptojs/cryptojs.d.ts index a764ebada..997306e4a 100644 --- a/cryptojs/cryptojs.d.ts +++ b/cryptojs/cryptojs.d.ts @@ -52,11 +52,11 @@ declare module CryptoJS{ init(cfg?: C): void create(cfg?: C): IHasher - update(messageUpdate: WordArray): Hasher update(messageUpdate: string): Hasher + update(messageUpdate: WordArray): Hasher - finalize(messageUpdate?: WordArray): WordArray finalize(messageUpdate?: string): WordArray + finalize(messageUpdate?: WordArray): WordArray blockSize: number @@ -69,16 +69,16 @@ declare module CryptoJS{ //tparam C - Configuration type interface IHasherHelper{ - (message: WordArray, cfg?: C): WordArray (message: string, cfg?: C): WordArray + (message: WordArray, cfg?: C): WordArray } interface HasherHelper extends IHasherHelper{} interface IHasherHmacHelper{ - (message: WordArray, key: WordArray): WordArray + (message: string, key: string): WordArray (message: string, key: WordArray): WordArray (message: WordArray, key: string): WordArray - (message: string, key: string): WordArray + (message: WordArray, key: WordArray): WordArray } //tparam C - Configuration type @@ -90,11 +90,11 @@ declare module CryptoJS{ create(xformMode?: number, key?: WordArray, cfg?: C): ICipher init(xformMode?: number, key?: WordArray, cfg?: C): void - process(dataUpdate: WordArray): WordArray process(dataUpdate: string): WordArray + process(dataUpdate: WordArray): WordArray - finalize(dataUpdate?: WordArray): WordArray finalize(dataUpdate?: string): WordArray + finalize(dataUpdate?: WordArray): WordArray keySize: number ivSize: number @@ -128,6 +128,7 @@ declare module CryptoJS{ interface BlockCipher extends IStreamCipher{} interface IBlockCipherCfg { + iv?: WordArray; mode?: mode.IBlockCipherModeImpl //default CBC padding?: pad.IPaddingImpl //default Pkcs7 } @@ -163,6 +164,9 @@ declare module CryptoJS{ interface SerializableCipher extends ISerializableCipher{} interface ISerializableCipherCfg{ format?: format.IFormatter //default OpenSSLFormatter + iv?: WordArray; + mode?: mode.IBlockCipherModeImpl; + padding?: pad.IPaddingImpl; } interface IPasswordBasedCipher extends Base{ @@ -177,19 +181,21 @@ declare module CryptoJS{ interface PasswordBasedCipher extends IPasswordBasedCipher{} interface IPasswordBasedCipherCfg extends ISerializableCipherCfg{ kdf?: kdf.IKdfImpl //default OpenSSLKdf + mode?: mode.IBlockCipherModeImpl; + padding?: pad.IPaddingImpl; } /** see Cipher._createHelper */ interface ICipherHelper{ - encrypt(message: WordArray, key: WordArray, cfg?: C): CipherParams + encrypt(message: string, password: string, cfg?: C): CipherParams encrypt(message: string, key: WordArray, cfg?: C): CipherParams encrypt(message: WordArray, password: string, cfg?: C): CipherParams - encrypt(message: string, password: string, cfg?: C): CipherParams + encrypt(message: WordArray, key: WordArray, cfg?: C): CipherParams - decrypt(ciphertext: CipherParamsData, key: WordArray, cfg?: C): WordArray + decrypt(ciphertext: string, password: string, cfg?: C): WordArray decrypt(ciphertext: string, key: WordArray, cfg?: C): WordArray decrypt(ciphertext: CipherParamsData, password: string, cfg?: C): WordArray - decrypt(ciphertext: string, password: string, cfg?: C): WordArray + decrypt(ciphertext: CipherParamsData, key: WordArray, cfg?: C): WordArray } interface CipherHelper extends ICipherHelper{} @@ -228,8 +234,8 @@ declare module CryptoJS{ } interface IKdfImpl{ - execute(password: string, keySize: number, ivSize: number, salt?: lib.WordArray): lib.CipherParams execute(password: string, keySize: number, ivSize: number, salt?: string): lib.CipherParams + execute(password: string, keySize: number, ivSize: number, salt?: lib.WordArray): lib.CipherParams } } @@ -305,26 +311,26 @@ declare module CryptoJS{ } interface HMAC extends lib.Base{ - init(hasher?: lib.Hasher, key?: lib.WordArray): void init(hasher?: lib.Hasher, key?: string): void - create(hasher?: lib.Hasher, key?: lib.WordArray): HMAC + init(hasher?: lib.Hasher, key?: lib.WordArray): void create(hasher?: lib.Hasher, key?: string): HMAC + create(hasher?: lib.Hasher, key?: lib.WordArray): HMAC - update(messageUpdate: lib.WordArray): HMAC update(messageUpdate: string): HMAC + update(messageUpdate: lib.WordArray): HMAC - finalize(messageUpdate?: lib.WordArray): lib.WordArray finalize(messageUpdate?: string): lib.WordArray + finalize(messageUpdate?: lib.WordArray): lib.WordArray } interface EvpKDF extends lib.Base{ cfg: IEvpKDFCfg init(cfg?: IEvpKDFCfg): void create(cfg?: IEvpKDFCfg): EvpKDF - compute(password: lib.WordArray, salt: lib.WordArray): lib.WordArray + compute(password: string, salt: string): lib.WordArray compute(password: string, salt: lib.WordArray): lib.WordArray compute(password: lib.WordArray, salt: string): lib.WordArray - compute(password: string, salt: string): lib.WordArray + compute(password: lib.WordArray, salt: lib.WordArray): lib.WordArray } interface IEvpKDFCfg{ keySize?: number //default 128/32 @@ -332,10 +338,10 @@ declare module CryptoJS{ iterations?: number //default 1 } interface IEvpKDFHelper{ - (password: lib.WordArray, salt: lib.WordArray, cfg?: IEvpKDFCfg): lib.WordArray + (password: string, salt: string, cfg?: IEvpKDFCfg): lib.WordArray (password: string, salt: lib.WordArray, cfg?: IEvpKDFCfg): lib.WordArray (password: lib.WordArray, salt: string, cfg?: IEvpKDFCfg): lib.WordArray - (password: string, salt: string, cfg?: IEvpKDFCfg): lib.WordArray + (password: lib.WordArray, salt: lib.WordArray, cfg?: IEvpKDFCfg): lib.WordArray } interface PBKDF2 extends EvpKDF{} //PBKDF2 is same as EvpKDF diff --git a/cryptojs/test/aes-tests.ts b/cryptojs/test/aes-tests.ts index d4f0d9537..81e83e594 100644 --- a/cryptojs/test/aes-tests.ts +++ b/cryptojs/test/aes-tests.ts @@ -50,7 +50,7 @@ YUI.add('algo-aes-test', function (Y) { var expectedKey = key.toString(); var expectedIv = iv.toString(); - C.AES.encrypt(message, key, { iv: iv }); + C.AES.encrypt(message, key, { iv }); Y.Assert.areEqual(expectedMessage, message.toString()); Y.Assert.areEqual(expectedKey, key.toString()); diff --git a/cryptojs/test/des-tests.ts b/cryptojs/test/des-tests.ts index d889abab1..72ae365f9 100644 --- a/cryptojs/test/des-tests.ts +++ b/cryptojs/test/des-tests.ts @@ -74,7 +74,7 @@ YUI.add('algo-des-test', function (Y) { var expectedKey = key.toString(); var expectedIv = iv.toString(); - C.DES.encrypt(message, key, { iv: iv }); + C.DES.encrypt(message, key, { iv }); Y.Assert.areEqual(expectedMessage, message.toString()); Y.Assert.areEqual(expectedKey, key.toString()); diff --git a/cryptojs/test/tripledes-tests.ts b/cryptojs/test/tripledes-tests.ts index cbc123ea3..c0a795c9d 100644 --- a/cryptojs/test/tripledes-tests.ts +++ b/cryptojs/test/tripledes-tests.ts @@ -58,7 +58,7 @@ YUI.add('algo-tripledes-test', function (Y) { var expectedKey = key.toString(); var expectedIv = iv.toString(); - C.TripleDES.encrypt(message, key, { iv: iv }); + C.TripleDES.encrypt(message, key, { iv }); Y.Assert.areEqual(expectedMessage, message.toString()); Y.Assert.areEqual(expectedKey, key.toString()); diff --git a/devextreme/dx.devextreme-tests.ts b/devextreme/dx.devextreme-tests.ts index ef147c2c6..a17372847 100644 --- a/devextreme/dx.devextreme-tests.ts +++ b/devextreme/dx.devextreme-tests.ts @@ -120,7 +120,7 @@ module Tests.ui { $('
').dxAutocomplete({ items: ["Bern", "Lyon", "Lander"], value: options.value, - onValueChange: function (e:{ value: string }) { + onValueChanged: function (e:{ value: string }) { options.setValue(e.value); } }).appendTo(container); diff --git a/devextreme/dx.devextreme.d.ts b/devextreme/dx.devextreme.d.ts index d0a345a04..ac0639b0a 100644 --- a/devextreme/dx.devextreme.d.ts +++ b/devextreme/dx.devextreme.d.ts @@ -1789,7 +1789,7 @@ declare module DevExpress.ui { interval?: number; /** Specifies the maximum zoom level of a calendar, which is used to pick the date. */ maxZoomLevel?: string; - /** Specifies the minimal zoom level of a calendar, which is used to pick the date. */ + /** Specifies the minimal zoom level of a calendar, which is used to pick the date. */ minZoomLevel?: string; /** Specifies the type of date/time picker. */ pickerType?: string; @@ -1827,8 +1827,8 @@ declare module DevExpress.ui { maxZoomLevel?: string; /** Specifies the minimum zoom level of the calendar. */ minZoomLevel?: string; - /** The template to be used for rendering calendar cells. */ - cellTemplate?: any; + /** The template to be used for rendering calendar cells. */ + cellTemplate?: any; } /** A calendar widget. */ export class dxCalendar extends Editor { @@ -1887,14 +1887,77 @@ declare module DevExpress.ui { constructor(element: Element, options?: dxBoxOptions); } export interface dxAutocompleteOptions extends dxDropDownListOptions { - /** Specifies the current value displayed by the widget. */ - value?: string; - /** The minimum number of characters that must be entered into the text box to begin a search. */ - minSearchLength?: number; + accessKey?: string; + activeStateEnabled?: boolean; + attr?: any; + dataSource?: any; + disabled?: boolean; + displayValue?: string; + fieldEditEnabled?: boolean; + focusStateEnabled?: boolean; + height?: string | number | (() => string | number); + hint?: string; + hoverStateEnabled?: boolean; + isValid?: boolean; + items?: any[]; + /** + * The template to be used for rendering items. + * Defaults Value: "item" + */ + itemTemplate?: string | Node | JQuery | (() => string | Node | JQuery); /** Specifies the maximum count of items displayed by the widget. */ maxItemCount?: number; + + maxLength?: string | number; + /** The minimum number of characters that must be entered into the text box to begin a search. */ + minSearchLength?: number; + + + mode?: string; // "text" | "email" | "search" | "tel" | "url" | "password" + onChange?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onClosed?: (e: { component: any; element: JQuery; model: any }) => void; + onContentReady?: (e: { component: any; element: JQuery; model: any }) => void; + onCopy?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onCut?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onDisposing?: (e: { component: any; element: JQuery; model: any }) => void; + onEnterKey?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onFocusIn?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onFocusOut?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onInitialized?: (e: { component: any; element: JQuery }) => void; + onInput?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onItemClick?: (e: { component: any; element: JQuery; model: any; itemElement: HTMLElement }) => void; + onKeyDown?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onKeyPress?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onKeyUp?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onOpened?: (e: { component: any; element: JQuery; model: any }) => void; + onOptionChanged?: (e: { component: any; element: JQuery; model: any; value: any }) => void; + onPaste?: (e: { component: any; element: JQuery; model: any; event: JQueryEventObject }) => void; + onSelectionChanged?: (e: { component: any; element: JQuery; model: any; selectedItem: any }) => void; + onValueChanged?: (e: { component: any; element: JQuery; model: any; value: any; previousValue: any; itemData: any; jQueryEvent: JQueryEventObject }) => void; + opened?: boolean; + placeholder?: string; + readOnly?: boolean; + rtlEnabled?: boolean; + searchExpr?: string; + searchMode?: string; // "contains" | "startswith" + searchTimeout?: number; /** Gets the currently selected item. */ - selectedItem?: Object; + selectedItem?: any; + showClearButton?: boolean; + spellcheck?: boolean; + tabIndex?: number; + text?: string; + validationError?: any; + validationMessageMode?: string; // "auto" | "always" + /** Specifies the current value displayed by the widget. */ + value?: string; + /** + * CAn be any DOM event names separated by spaces. + */ + valueChangeEvent?: string; + valueExpr?: string | Function; + visible?: boolean; + width?: string | number | (() => string | number); } /** A textbox widget that supports autocompletion. */ export class dxAutocomplete extends dxDropDownList { @@ -2979,8 +3042,8 @@ declare module DevExpress.ui { /** Specifies whether or not a user can nullify values of a lookup column. */ allowClearing?: boolean; /** -Specifies the data source providing data for a lookup column. - */ + * Specifies the data source providing data for a lookup column. + */ dataSource?: any; /** Specifies the expression defining the data source field whose values must be displayed. */ displayExpr?: any; @@ -3109,9 +3172,9 @@ Specifies the data source providing data for a lookup column. } }; /** -An array of grid columns. - */ - columns?: Array; + * An array of grid columns. + */ + columns?: dxDataGridColumn[]; onContentReady?: Function; contentReadyAction?: Function; /** Specifies a function that customizes grid columns after they are created. */ @@ -3209,8 +3272,8 @@ An array of grid columns. /** Specifies the message displayed in a group row when the corresponding group is continued from the previous page. */ groupContinuedMessage?: string; /** -Specifies the message displayed in a group row when the corresponding group continues on the next page. - */ + * Specifies the message displayed in a group row when the corresponding group continues on the next page. + */ groupContinuesMessage?: string; }; /** Specifies options that configure the group panel. */ @@ -3591,8 +3654,8 @@ Specifies the message displayed in a group row when the corresponding group cont /** Saves changes made in a grid. */ saveEditData(): void; /** -Searches grid records by a search string. - */ + * Searches grid records by a search string. + */ searchByText(text: string): void; /** Selects all grid records. */ selectAll(): void; @@ -4304,7 +4367,7 @@ declare module DevExpress.viz.charts { clearSelection(): void; /** Gets the color of a particular series. */ getColor(): string; - /** + /** * Gets a point from the series point collection based on the specified argument. * @deprecated getPointsByArg(pointArg).md */ @@ -4509,8 +4572,8 @@ declare module DevExpress.viz.charts { /** Specifies a precision for the percentage values displayed in the labels of a full-stacked-like series. */ percentPrecision?: number; } - export interface BaseCommonSeriesConfig { - /** Specifies the data source field that provides arguments for series points. */ + export interface BaseCommonSeriesConfig { + /** Specifies the data source field that provides arguments for series points. */ argumentField?: string; axis?: string; /** An object defining the label configuration options for a series in the dxChart widget. */ @@ -4570,30 +4633,30 @@ declare module DevExpress.viz.charts { visible?: boolean; /** Specifies a line width. */ width?: number; - /** Configures error bars. */ - valueErrorBar?: { - /** Specifies whether error bars must be displayed in full or partially. */ - displayMode?: string; - /** Specifies the data field that provides data for low error values. */ - lowValueField?: string; - /** Specifies the data field that provides data for high error values. */ - highValueField?: string; - /** Specifies how error bar values must be calculated. */ - type?: string; - /** Specifies the value to be used for generating error bars. */ - value?: number; - /** Specifies the color of error bars. */ - color?: string; - /** Specifies the opacity of error bars. */ - opacity?: number; - /** Specifies the length of the lines that indicate the error bar edges. */ + /** Configures error bars. */ + valueErrorBar?: { + /** Specifies whether error bars must be displayed in full or partially. */ + displayMode?: string; + /** Specifies the data field that provides data for low error values. */ + lowValueField?: string; + /** Specifies the data field that provides data for high error values. */ + highValueField?: string; + /** Specifies how error bar values must be calculated. */ + type?: string; + /** Specifies the value to be used for generating error bars. */ + value?: number; + /** Specifies the color of error bars. */ + color?: string; + /** Specifies the opacity of error bars. */ + opacity?: number; + /** Specifies the length of the lines that indicate the error bar edges. */ edgeLength?: number; - /** Specifies the width of the error bar line. */ - lineWidth?: number; - }; - } - export interface CommonPointOptions { - /** Specifies border options for points in the line and area series. */ + /** Specifies the width of the error bar line. */ + lineWidth?: number; + }; + } + export interface CommonPointOptions { + /** Specifies border options for points in the line and area series. */ border?: viz.core.Border; /** Specifies the points color. */ color?: string; @@ -4624,9 +4687,9 @@ declare module DevExpress.viz.charts { /** Specifies a symbol for presenting points of the line and area series. */ symbol?: string; visible?: boolean; - } - export interface ChartCommonPointOptions extends CommonPointOptions { - /** An object specifying the parameters of an image that is used as a point marker. */ + } + export interface ChartCommonPointOptions extends CommonPointOptions { + /** An object specifying the parameters of an image that is used as a point marker. */ image?: { /** Specifies the height of an image that is used as a point marker. */ height?: any; @@ -4635,9 +4698,9 @@ declare module DevExpress.viz.charts { /** Specifies the width of an image that is used as a point marker. */ width?: any; }; - } - export interface PolarCommonPointOptions extends CommonPointOptions { - /** An object specifying the parameters of an image that is used as a point marker. */ + } + export interface PolarCommonPointOptions extends CommonPointOptions { + /** An object specifying the parameters of an image that is used as a point marker. */ image?: { /** Specifies the height of an image that is used as a point marker. */ height?: number; @@ -4646,7 +4709,7 @@ declare module DevExpress.viz.charts { /** Specifies the width of an image that is used as a point marker. */ width?: number; }; - } + } /** An object that defines configuration options for chart series. */ export interface CommonSeriesConfig extends BaseCommonSeriesConfig { /** Specifies the data source field that provides a 'close' value for a _candleStick_ or _stock_ series. */ @@ -4737,14 +4800,14 @@ declare module DevExpress.viz.charts { /** Sets the series type. */ type?: string; } - /** An object that defines configuration options for polar chart series. */ - export interface CommonPolarSeriesConfig extends BaseCommonSeriesConfig { - /** Specifies whether or not to close the chart by joining the end point with the first point. */ + /** An object that defines configuration options for polar chart series. */ + export interface CommonPolarSeriesConfig extends BaseCommonSeriesConfig { + /** Specifies whether or not to close the chart by joining the end point with the first point. */ closed?: boolean; label?: SeriesConfigLabel; point?: PolarCommonPointOptions; - } - export interface CommonPolarSeriesSettings extends CommonPolarSeriesConfig { + } + export interface CommonPolarSeriesSettings extends CommonPolarSeriesConfig { /** An object that specifies configuration options for all series of the area type in the chart. */ area?: CommonPolarSeriesConfig; /** An object that specifies configuration options for all series of the _bar_ type in the chart. */ @@ -4842,7 +4905,7 @@ declare module DevExpress.viz.charts { /** Specifies a data source field that represents the series name. */ nameField?: string; } - export interface PolarSeriesTemplate { + export interface PolarSeriesTemplate { /** Specifies a callback function that returns a series object with individual series settings. */ customizeSeries?: (seriesName: string) => PolarSeriesConfig; /** Specifies a data source field that represents the series name. */ @@ -4859,18 +4922,18 @@ declare module DevExpress.viz.charts { export interface PolarCommonConstantLineLabel { /** Indicates whether or not to display labels for the axis constant lines. */ visible?: boolean; - /** Specifies font options for a constant line label. */ + /** Specifies font options for a constant line label. */ font?: viz.core.Font; - } - export interface ConstantLineStyle { - /** Specifies a color for a constant line. */ + } + export interface ConstantLineStyle { + /** Specifies a color for a constant line. */ color?: string; /** Specifies a dash style for a constant line. */ dashStyle?: string; /** Specifies a constant line width in pixels. */ width?: number; - } - export interface ChartCommonConstantLineStyle extends ConstantLineStyle { + } + export interface ChartCommonConstantLineStyle extends ConstantLineStyle { /** An object defining constant line label options. */ label?: ChartCommonConstantLineLabel; /** Specifies the space between the constant line label and the left/right side of the constant line. */ @@ -4878,24 +4941,24 @@ declare module DevExpress.viz.charts { /** Specifies the space between the constant line label and the top/bottom side of the constant line. */ paddingTopBottom?: number; } - export interface PolarCommonConstantLineStyle extends ConstantLineStyle { - /** An object defining constant line label options. */ + export interface PolarCommonConstantLineStyle extends ConstantLineStyle { + /** An object defining constant line label options. */ label?: PolarCommonConstantLineLabel; - } - export interface CommonAxisLabel { - /** Specifies font options for axis labels. */ + } + export interface CommonAxisLabel { + /** Specifies font options for axis labels. */ font?: viz.core.Font; /** Specifies the spacing between an axis and its labels in pixels. */ indentFromAxis?: number; /** Indicates whether or not axis labels are visible. */ visible?: boolean; - } + } export interface ChartCommonAxisLabel extends CommonAxisLabel { /** Specifies the label's position relative to the tick (grid line). */ alignment?: string; - /** Specifies the overlap resolving algorithm to be applied to axis labels. */ + /** Specifies the overlap resolving algorithm to be applied to axis labels. */ overlappingBehavior?: { - /** Specifies how to arrange axis labels. */ + /** Specifies how to arrange axis labels. */ mode?: string; /** Specifies the angle used to rotate axis labels. */ rotationAngle?: number; @@ -4907,7 +4970,7 @@ declare module DevExpress.viz.charts { /** Specifies the overlap resolving algorithm to be applied to axis labels. */ overlappingBehavior?: string; } - export interface CommonAxisTitle { + export interface CommonAxisTitle { /** Specifies font options for an axis title. */ font?: viz.core.Font; /** Specifies a margin for an axis title in pixels. */ @@ -4916,7 +4979,7 @@ declare module DevExpress.viz.charts { export interface BaseCommonAxisSettings { /** Specifies the color of the line that represents an axis. */ color?: string; - /** Specifies whether ticks/grid lines of a discrete axis are located between labels or cross the labels. */ + /** Specifies whether ticks/grid lines of a discrete axis are located between labels or cross the labels. */ discreteAxisDivisionMode?: string; /** An object defining the configuration options for the grid lines of an axis in the dxPolarChart widget. */ grid?: { @@ -4929,7 +4992,7 @@ declare module DevExpress.viz.charts { /** Specifies the width of grid lines. */ width?: number; }; - /** Specifies the options of the minor grid. */ + /** Specifies the options of the minor grid. */ minorGrid?: { /** Specifies a color for the lines of the minor grid. */ color?: string; @@ -4955,7 +5018,7 @@ declare module DevExpress.viz.charts { /** Indicates whether or not ticks are visible on an axis. */ visible?: boolean; }; - /** Specifies the options of the minor ticks. */ + /** Specifies the options of the minor ticks. */ minorTick?: { /** Specifies a color for the minor ticks. */ color?: string; @@ -4969,18 +5032,18 @@ declare module DevExpress.viz.charts { /** Specifies the width of the line that represents an axis in the chart. */ width?: number; } - export interface ChartCommonAxisSettings extends BaseCommonAxisSettings { + export interface ChartCommonAxisSettings extends BaseCommonAxisSettings { /** Specifies the appearance of all the widget's constant lines. */ constantLineStyle?: ChartCommonConstantLineStyle; /** An object defining the label configuration options that are common for all axes in the dxChart widget. */ label?: ChartCommonAxisLabel; /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ - maxValueMargin?: number; + maxValueMargin?: number; /** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */ - minValueMargin?: number; + minValueMargin?: number; /** Specifies, in pixels, the space reserved for an axis. */ placeholderSize?: number; - /** An object defining configuration options for strip style. */ + /** An object defining configuration options for strip style. */ stripStyle?: { /** An object defining the configuration options for a strip label style. */ label?: { @@ -5001,7 +5064,7 @@ declare module DevExpress.viz.charts { /** Indicates whether or not to display series with indents from axis boundaries. */ valueMarginsEnabled?: boolean; } - export interface PolarCommonAxisSettings extends BaseCommonAxisSettings { + export interface PolarCommonAxisSettings extends BaseCommonAxisSettings { /** Specifies the appearance of all the widget's constant lines. */ constantLineStyle?: PolarCommonConstantLineStyle; /** An object defining the label configuration options that are common for all axes in the dxPolarChart widget. */ @@ -5023,12 +5086,12 @@ declare module DevExpress.viz.charts { /** Specifies the text to be displayed in a constant line label. */ text?: string; } - export interface PolarConstantLineLabel extends PolarCommonConstantLineLabel { + export interface PolarConstantLineLabel extends PolarCommonConstantLineLabel { /** Specifies the text to be displayed in a constant line label. */ text?: string; } - export interface AxisLabel { - /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis. */ + export interface AxisLabel { + /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a label on the value axis. */ customizeHint?: (argument: { value: any; valueText: string }) => string; /** Specifies a callback function that returns the text to be displayed in value axis labels. */ customizeText?: (argument: { value: any; valueText: string }) => string; @@ -5036,9 +5099,9 @@ declare module DevExpress.viz.charts { format?: string; /** Specifies a precision for the formatted value displayed in the axis labels. */ precision?: number; - } + } export interface ChartAxisLabel extends ChartCommonAxisLabel, AxisLabel {} - export interface PolarAxisLabel extends PolarCommonAxisLabel, AxisLabel {} + export interface PolarAxisLabel extends PolarCommonAxisLabel, AxisLabel {} export interface AxisTitle extends CommonAxisTitle { /** Specifies the text for the value axis title. */ text?: string; @@ -5048,19 +5111,19 @@ declare module DevExpress.viz.charts { label?: ChartConstantLineLabel; } export interface ChartConstantLine extends ChartConstantLineStyle { - /** An object defining constant line label options. */ + /** An object defining constant line label options. */ label?: ChartConstantLineLabel; /** Specifies a value to be displayed by a constant line. */ value?: any; - } - export interface PolarConstantLine extends PolarCommonConstantLineStyle { - /** An object defining constant line label options. */ + } + export interface PolarConstantLine extends PolarCommonConstantLineStyle { + /** An object defining constant line label options. */ label?: PolarConstantLineLabel; /** Specifies a value to be displayed by a constant line. */ value?: any; - } - export interface Axis { - /** Specifies a coefficient for dividing the value axis. */ + } + export interface Axis { + /** Specifies a coefficient for dividing the value axis. */ axisDivisionFactor?: number; /** Specifies the order in which discrete values are arranged on the value axis. */ categories?: Array; @@ -5074,11 +5137,11 @@ declare module DevExpress.viz.charts { minorTickCount?: number; /** Specifies the required type of the value axis. */ type?: string; - /** Specifies the pane on which the current value axis will be displayed. */ + /** Specifies the pane on which the current value axis will be displayed. */ pane?: string; /** Specifies options for value axis strips. */ strips?: Array; - } + } export interface ChartAxis extends ChartCommonAxisSettings, Axis { /** Defines an array of the value axis constant lines. */ constantLines?: Array; @@ -5095,52 +5158,52 @@ declare module DevExpress.viz.charts { /** Specifies the title for a value axis. */ title?: AxisTitle; } - export interface PolarAxis extends PolarCommonAxisSettings, Axis { + export interface PolarAxis extends PolarCommonAxisSettings, Axis { /** Defines an array of the value axis constant lines. */ constantLines?: Array; /** Specifies options for value axis labels. */ label?: PolarAxisLabel; } - export interface ArgumentAxis { - /** Specifies the desired type of axis values. */ + export interface ArgumentAxis { + /** Specifies the desired type of axis values. */ argumentType?: string; /** Specifies the elements that will be highlighted when the argument axis is hovered over. */ hoverMode?: string; - } + } export interface ChartArgumentAxis extends ChartAxis, ArgumentAxis {} - export interface PolarArgumentAxis extends PolarAxis, ArgumentAxis { - /** Specifies a start angle for the argument axis in degrees. */ + export interface PolarArgumentAxis extends PolarAxis, ArgumentAxis { + /** Specifies a start angle for the argument axis in degrees. */ startAngle?: number; /** Specifies whether or not to display the first point at the angle specified by the startAngle option. */ firstPointOnStartAngle?: boolean; /** Specifies the period of the argument values in the data source. */ period?: number; - } - export interface ValueAxis { + } + export interface ValueAxis { /** Specifies the name of the value axis. */ name?: string; /** Specifies whether or not to indicate a zero value on the value axis. */ showZero?: boolean; /** Specifies the desired type of axis values. */ valueType?: string; - } + } export interface ChartValueAxis extends ChartAxis, ValueAxis { /** Specifies the spacing, in pixels, between multiple value axes in a chart. */ multipleAxesSpacing?: number; /** Specifies the value by which the chart's value axes are synchronized. */ synchronizedValue?: number; } - export interface PolarValueAxis extends PolarAxis, ValueAxis { - /** Indicates whether to display series with indents from axis boundaries. */ - valueMarginsEnabled?: boolean; - /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ + export interface PolarValueAxis extends PolarAxis, ValueAxis { + /** Indicates whether to display series with indents from axis boundaries. */ + valueMarginsEnabled?: boolean; + /** Specifies a coefficient that determines the spacing between the maximum series point and the axis. */ maxValueMargin?: number; /** Specifies a coefficient that determines the spacing between the minimum series point and the axis. */ minValueMargin?: number; - tick?: { - visible?: boolean; - } - } + tick?: { + visible?: boolean; + } + } export interface CommonPane { /** Specifies a background color in a pane. */ backgroundColor?: string; @@ -5281,7 +5344,7 @@ declare module DevExpress.viz.charts { asyncSeriesRendering?: boolean; }): void; } - export interface AdvancedLegend extends core.BaseLegend { + export interface AdvancedLegend extends core.BaseLegend { /** Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item. */ customizeHint?: (seriesInfo: { seriesName: string; seriesIndex: number; seriesColor: string; }) => string; /**

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

*/ @@ -5463,7 +5526,7 @@ declare module DevExpress.viz.charts { /** Specifies whether or not point labels can be hidden when the layout is adapting. */ keepLabels?: boolean; }; - /** Indicates whether or not to display a "spider web". */ + /** Indicates whether or not to display a "spider web". */ useSpiderWeb?: boolean; /** Specifies argument axis options for the dxPolarChart widget. */ argumentAxis?: PolarArgumentAxis; @@ -6035,8 +6098,8 @@ Specifies an interval between minor ticks. useTicksAutoArrangement?: boolean; /** Specifies the type of values on the scale. */ valueType?: string; - /** Specifies the order of arguments on a discrete scale. */ - categories?: Array; + /** Specifies the order of arguments on a discrete scale. */ + categories?: Array; }; /** Specifies the range to be selected when displaying the dxRangeSelector. */ selectedRange?: { @@ -6337,9 +6400,9 @@ declare module DevExpress.viz.map { centerChanged?: (center: Array) => void; /** A handler for the centerChanged event. */ onCenterChanged?: (e: { - center: Array; - component: dxVectorMap; - element: Element; + center: Array; + component: dxVectorMap; + element: Element; }) => void; /** A handler for the tooltipShown event. */ onTooltipShown?: (e: { diff --git a/fbsdk/fbsdk-tests.ts b/fbsdk/fbsdk-tests.ts index e359369ad..8ec38d8bc 100644 --- a/fbsdk/fbsdk-tests.ts +++ b/fbsdk/fbsdk-tests.ts @@ -1,29 +1,29 @@ /// window.fbAsyncInit = function() { - FB.init( - { - appId : '{your-app-id}', - xfbml : true, - version : 'v2.0' - } - ); + FB.init( + { + appId : '{your-app-id}', + xfbml : true, + version : 'v2.0' + } + ); - FB.ui( - { - method: 'share', - href: 'https://developers.facebook.com/docs/dialogs/' - }, - function(response) { - console.log(response); - } - ); + FB.ui( + { + method: 'share', + href: 'https://developers.facebook.com/docs/dialogs/' + }, + function(response) { + console.log(response); + } + ); - FB.api( - "/me", - "POST", - function (fbResponse){ - console.log(fbResponse); - } - ); + FB.api( + "/me", + "POST", + function (fbResponse){ + console.log(fbResponse); + } + ); }; \ No newline at end of file diff --git a/fbsdk/fbsdk.d.ts b/fbsdk/fbsdk.d.ts index eb3f23269..3c1261d7c 100644 --- a/fbsdk/fbsdk.d.ts +++ b/fbsdk/fbsdk.d.ts @@ -4,132 +4,186 @@ // Definitions: https://github.com/borisyankov/DefinitelyTyped interface FBInitParams{ - appId ?: string; - authResponse ?: string; - cookie ?: boolean; - frictionlessRequests ?: boolean; - hideFlashCallback ?: Function; - logging ?: boolean; - status ?: boolean; - version ?: string; - xfbml ?: boolean; + appId?: string; + authResponse?: string; + cookie?: boolean; + frictionlessRequests?: boolean; + hideFlashCallback?: Function; + logging?: boolean; + status?: boolean; + version?: string; + xfbml?: boolean; } -interface FBUIParams{ - method : string; +interface ShareDialogParams { + method: string; // "share" + href: string; } +interface PageTabDialogParams { + method: string; // "pagetab" + app_id: string; + redirect_uri?: string; + display?: any; +} + +interface RequestsDialogParams { + method: string; // "apprequests" + app_id: string; + redirect_uri?: string; + to?: string; + message: string; + action_type?: string; // "send" | "askfor" | "turn" + object_id?: string; + filters: string /* "app_users" | "app_non_users" */ | { + name: string; + user_ids: string[]; + }; + suggestions?: string[]; + exclude_ids?: string[]; + max_recipients?: number; + data?: string; + title?: string; +} + +interface SendDialogParams { + method: string; // "send" + app_id: string; + redirect_uri?: string; + display?: any; + to?: string; + link: string; +} + +interface PayDialogParams { + method: string; // "pay" + action: string; // "purchaseitem" + product: string; + quantity?: number; + quantity_min?: number; + quantity_max?: number; + request_id?: string; + pricepoint_id?: string; + test_currency?: string; +} + +declare type FBUIParams = ShareDialogParams + | PageTabDialogParams + | RequestsDialogParams + | SendDialogParams + | PayDialogParams; + interface FBLoginOptions{ - auth_type ?: string; - scope ?: string; - return_scopes ?: boolean; - enable_profile_selector ?: boolean; - profile_selector_ids ?: string; + auth_type?: string; + scope?: string; + return_scopes?: boolean; + enable_profile_selector?: boolean; + profile_selector_ids?: string; } interface FBSDKEvents{ - /* This method allows you to subscribe to a range of events, and define callback functions for when they fire. */ - subscribe(event : string, callback : (fbResponseObject : Object) => any) : void; + /* This method allows you to subscribe to a range of events, and define callback functions for when they fire. */ + subscribe(event : string, callback : (fbResponseObject : Object) => any) : void; - /* This method allows you to un-subscribe a callback from any events previously subscribed to using .Event.subscribe(). */ - unsubscribe(event : string, callback : (fbResponseObject : Object) => any) : void; + /* This method allows you to un-subscribe a callback from any events previously subscribed to using .Event.subscribe(). */ + unsubscribe(event : string, callback : (fbResponseObject : Object) => any) : void; } interface FBSDKXFBML{ - /* This function parses and renders XFBML markup in a document on the fly. */ - parse(ParseElement ?: Element) : void; - parse(ParseElement ?: HTMLElement) : void; + /* This function parses and renders XFBML markup in a document on the fly. */ + parse(ParseElement?: Element) : void; + parse(ParseElement?: HTMLElement) : void; } interface FBSDKCanvasPrefetcher{ - /* Tells Facebook that the current page uses a specified resource. */ - addStaticResource(res : string) : void; + /* Tells Facebook that the current page uses a specified resource. */ + addStaticResource(res : string) : void; - /* Controls how statistics are collected on resources used by your application. */ - setCollectionMode(option : string) : void; + /* Controls how statistics are collected on resources used by your application. */ + setCollectionMode(option : string) : void; } interface FBSDKCanvasSize{ - height ?: Number; - width ?: Number; + height?: Number; + width?: Number; } interface FBSDKCanvasDoneLoading{ - time_delta_ms : Number; + time_delta_ms : Number; } interface FBSDKCanvas{ - Prefetcher : FBSDKCanvasPrefetcher; + Prefetcher : FBSDKCanvasPrefetcher; - /* Hides the HTML element passed in via the elem param from view. */ - hideFlashElement(element : Element) : void; - hideFlashElement(element : HTMLElement) : void; + /* Hides the HTML element passed in via the elem param from view. */ + hideFlashElement(element : Element) : void; + hideFlashElement(element : HTMLElement) : void; - /* Displays the HTML element passed in via the elem param, after it has been hidden via FB.Canvas.hideFlashElement. */ - showFlashElement(element : Element) : void; - showFlashElement(element : HTMLElement) : void; + /* Displays the HTML element passed in via the elem param, after it has been hidden via FB.Canvas.hideFlashElement. */ + showFlashElement(element : Element) : void; + showFlashElement(element : HTMLElement) : void; - /* Tells Facebook to scroll to a specific location of your canvas page. */ - scrollTo(x : Number, y : Number) : void; + /* Tells Facebook to scroll to a specific location of your canvas page. */ + scrollTo(x : Number, y : Number) : void; - /* Starts or stops a timer which will grow your iframe to fit the content every few milliseconds. */ - setAutoGrow(stopTimer : boolean) : void; - setAutoGrow(diffInterval : Number) : void; - setAutoGrow(stopTimer : boolean, diffInterval : Number) : void + /* Starts or stops a timer which will grow your iframe to fit the content every few milliseconds. */ + setAutoGrow(stopTimer : boolean) : void; + setAutoGrow(diffInterval : Number) : void; + setAutoGrow(stopTimer : boolean, diffInterval : Number) : void - /* Tells Facebook to resize your iframe. */ - setSize(canvasSizeOptions : FBSDKCanvasSize) : void; + /* Tells Facebook to resize your iframe. */ + setSize(canvasSizeOptions : FBSDKCanvasSize) : void; - /* Registers the callback for inline processing (i.e. without page reload) of user actions when they click on any link to the current app from Canvas */ - setUrlHandler(handler ?: Function) : string; + /* Registers the callback for inline processing (i.e. without page reload) of user actions when they click on any link to the current app from Canvas */ + setUrlHandler(handler?: Function) : string; - /* Calls you back with an integer, in milliseconds, of the timing of the page load, beginning from the time when the first bytes arrive on - the client, and ending from the point at which you call this function. - */ - setDoneLoading(handler ?: Function) : FBSDKCanvasDoneLoading; + /* Calls you back with an integer, in milliseconds, of the timing of the page load, beginning from the time when the first bytes arrive on + the client, and ending from the point at which you call this function. + */ + setDoneLoading(handler?: Function) : FBSDKCanvasDoneLoading; - /* Call startTimer to resume the timer after a period of time for the page load that you didn't wish to measure, which you began by calling stopTimer. */ - startTimer() : void; + /* Call startTimer to resume the timer after a period of time for the page load that you didn't wish to measure, which you began by calling stopTimer. */ + startTimer() : void; - /* Call stopTimer when you wish to stop timing the page load for a period of time */ - stopTimer(handler ?: (fbResponseObject : Object) => any) : void; + /* Call stopTimer when you wish to stop timing the page load for a period of time */ + stopTimer(handler?: (fbResponseObject : Object) => any) : void; } interface FBSDK{ - /* This method is used to initialize and setup the SDK. */ - init(fbInitObject : FBInitParams) : void; + /* This method is used to initialize and setup the SDK. */ + init(fbInitObject : FBInitParams) : void; - /* This method lets you make calls to the Graph API. */ - api(path : string, method : string, callback : (fbResponseObject : Object) => any) : Object; - api(path : string, params : Object, callback : (fbResponseObject : Object) => any) : Object; - api(path : string, method : string, params : Object, callback : (fbResponseObject : Object) => any) : Object; + /* This method lets you make calls to the Graph API. */ + api(path : string, method : string, callback : (fbResponseObject : Object) => any) : Object; + api(path : string, params : Object, callback : (fbResponseObject : Object) => any) : Object; + api(path : string, method : string, params : Object, callback : (fbResponseObject : Object) => any) : Object; - /* This method is used to trigger different forms of Facebook created UI dialogs. */ - ui(params : FBUIParams, handler : (fbResponseObject : Object) => any) : void; + /* This method is used to trigger different forms of Facebook created UI dialogs. */ + ui(params : FBUIParams, handler : (fbResponseObject : Object) => any) : void; - /* Allows you to determine if a user is logged in to Facebook and has authenticated your app */ - getLoginStatus(handler : Function, force ?: Boolean) : void; + /* Allows you to determine if a user is logged in to Facebook and has authenticated your app */ + getLoginStatus(handler : Function, force?: Boolean) : void; - /* Calling FB.login prompts the user to authenticate your application using the Login Dialog. */ - login(handler : (fbResponseObject : Object) => any, params ?: FBLoginOptions): void; + /* Calling FB.login prompts the user to authenticate your application using the Login Dialog. */ + login(handler : (fbResponseObject : Object) => any, params?: FBLoginOptions): void; - /* Log the user out of your site and Facebook */ - logout(handler : (fbResponseObject : Object) => any) : void; + /* Log the user out of your site and Facebook */ + logout(handler : (fbResponseObject : Object) => any) : void; - /* Synchronous accessor for the current authResponse. */ - getAuthResponse() : Object; + /* Synchronous accessor for the current authResponse. */ + getAuthResponse() : Object; - Event : FBSDKEvents; - XFBML : FBSDKXFBML; - Canvas : FBSDKCanvas; + Event : FBSDKEvents; + XFBML : FBSDKXFBML; + Canvas : FBSDKCanvas; } interface Window{ - fbAsyncInit() : any; + fbAsyncInit() : any; } declare module "FB" { - export = FB; + export = FB; } declare var FB : FBSDK; diff --git a/geojson/geojson.d.ts b/geojson/geojson.d.ts index 1f8a23db5..9413a9c86 100644 --- a/geojson/geojson.d.ts +++ b/geojson/geojson.d.ts @@ -44,7 +44,6 @@ declare module GeoJSON { */ export interface MultiPoint extends GeometryObject { - coordinates: Position[] } diff --git a/heatmap.js/heatmap.d.ts b/heatmap.js/heatmap.d.ts index 012e3f9d9..b75b88873 100644 --- a/heatmap.js/heatmap.d.ts +++ b/heatmap.js/heatmap.d.ts @@ -64,6 +64,11 @@ interface HeatmapConfiguration { */ radius?: number; + /** + * Scales the radius based on map zoom. + */ + scaleRadius?: boolean; + /* * Indicate whether the heatmap should use a global extrema or a local * extrema (the maximum and minimum of the currently displayed viewport) diff --git a/pixi.js/pixi.js.d.ts b/pixi.js/pixi.js.d.ts index a4e0da88c..d3f268d2f 100644 --- a/pixi.js/pixi.js.d.ts +++ b/pixi.js/pixi.js.d.ts @@ -492,16 +492,18 @@ declare module PIXI { //renderers export interface RendererOptions { - view?: HTMLCanvasElement; transparent?: boolean antialias?: boolean; resolution?: number; - clearBeforeRendering?: boolean; preserveDrawingBuffer?: boolean; forceFXAA?: boolean; roundPixels?: boolean; + autoResize?: boolean; + backgroundColor?: number; + blendModes?: { [s: string]: any; }; + clearBeforeRender?: boolean; } export class SystemRenderer extends EventEmitter { diff --git a/podcast/podcast.d.ts b/podcast/podcast.d.ts index cfe4766ad..c4e280d2d 100644 --- a/podcast/podcast.d.ts +++ b/podcast/podcast.d.ts @@ -64,6 +64,12 @@ interface IItemOptions date: Date; lat?: number; long?: number; + enclosure?: { + url: string; + file?: string; + size?: number; + mime?: string; + } itunesAuthor?: string; itunesExplicit?: boolean; itunesSubtitle?: string; diff --git a/polyline/polyline.d.ts b/polyline/polyline.d.ts index 0f220e1d3..a7f803efc 100644 --- a/polyline/polyline.d.ts +++ b/polyline/polyline.d.ts @@ -8,7 +8,7 @@ interface Polyline { decode(string: string, precision?: number): number[][]; encode(coordinate: number[][], precision?: number): string; - fromGeoJSON(geojson: GeoJSON.GeoJsonObject, precision?: number): string; + fromGeoJSON(geojson: GeoJSON.LineString | GeoJSON.Feature, precision?: number): string; } declare var polyline: Polyline; diff --git a/polymer/polymer.d.ts b/polymer/polymer.d.ts index 936d6a087..b764aeb2a 100644 --- a/polymer/polymer.d.ts +++ b/polymer/polymer.d.ts @@ -11,15 +11,17 @@ declare module polymer { interface PropObjectType { type: PropConstructorType; - value?:boolean|number|string|Function; - reflectToAttributes?:boolean; - notify?:boolean; - readOnly?:boolean; - observer?:string; - computed?:string; + value?: boolean | number | string | Function; + reflectToAttribute?: boolean; + readOnly?: boolean; + notify?: boolean; + computed?: string; + observer?: string; } interface Base { + /** Need to allow all properties for callback methods. */ + [prop: string]: any; /* polymer-micro */ diff --git a/qunit/qunit.d.ts b/qunit/qunit.d.ts index ddbf014e4..fde535a68 100644 --- a/qunit/qunit.d.ts +++ b/qunit/qunit.d.ts @@ -5,163 +5,178 @@ interface DoneCallbackObject { - /** - * The number of failed assertions - */ - failed: number; + /** + * The number of failed assertions + */ + failed: number; - /** - * The number of passed assertions - */ - passed: number; + /** + * The number of passed assertions + */ + passed: number; - /** - * The total number of assertions - */ - total: number; + /** + * The total number of assertions + */ + total: number; - /** - * The time in milliseconds it took tests to run from start to finish. - */ - runtime: number; + /** + * The time in milliseconds it took tests to run from start to finish. + */ + runtime: number; } interface LogCallbackObject { - /** - * The boolean result of an assertion, true means passed, false means failed. - */ - result: boolean; + /** + * The boolean result of an assertion, true means passed, false means failed. + */ + result: boolean; - /** - * One side of a comparision assertion. Can be undefined when ok() is used. - */ - actual: Object; + /** + * One side of a comparision assertion. Can be undefined when ok() is used. + */ + actual: Object; - /** - * One side of a comparision assertion. Can be undefined when ok() is used. - */ - expected: Object; + /** + * One side of a comparision assertion. Can be undefined when ok() is used. + */ + expected: Object; - /** - * A string description provided by the assertion. - */ - message: string; + /** + * A string description provided by the assertion. + */ + message: string; - /** - * The associated stacktrace, either from an exception or pointing to the source - * of the assertion. Depends on browser support for providing stacktraces, so can be - * undefined. - */ - source: string; + /** + * The associated stacktrace, either from an exception or pointing to the source + * of the assertion. Depends on browser support for providing stacktraces, so can be + * undefined. + */ + source: string; } interface ModuleStartCallbackObject { - /** - * Name of the next module to run - */ - name: string; + /** + * Name of the next module to run + */ + name: string; } interface ModuleDoneCallbackObject { - /** - * Name of this module - */ - name: string; + /** + * Name of this module + */ + name: string; - /** - * The number of failed assertions - */ - failed: number; + /** + * The number of failed assertions + */ + failed: number; - /** - * The number of passed assertions - */ - passed: number; + /** + * The number of passed assertions + */ + passed: number; - /** - * The total number of assertions - */ - total: number; + /** + * The total number of assertions + */ + total: number; } interface TestDoneCallbackObject { - /** - * TName of the next test to run - */ - name: string; + /** + * TName of the next test to run + */ + name: string; - /** - * Name of the current module - */ - module: string; + /** + * Name of the current module + */ + module: string; - /** - * The number of failed assertions - */ - failed: number; + /** + * The number of failed assertions + */ + failed: number; - /** - * The number of passed assertions - */ - passed: number; + /** + * The number of passed assertions + */ + passed: number; - /** - * The total number of assertions - */ - total: number; + /** + * The total number of assertions + */ + total: number; - /** - * The total runtime, including setup and teardown - */ - duration: number; + /** + * The total runtime, including setup and teardown + */ + duration: number; } interface TestStartCallbackObject { - /** - * Name of the next test to run - */ - name: string; + /** + * Name of the next test to run + */ + name: string; - /** - * Name of the current module - */ - module: string; + /** + * Name of the current module + */ + module: string; } interface Config { - altertitle: boolean; - autostart: boolean; - current: Object; - reorder: boolean; - requireExpects: boolean; - testTimeout: number; - urlConfig: Array; - done: any; + altertitle: boolean; + autostart: boolean; + current: Object; + reorder: boolean; + requireExpects: boolean; + testTimeout: number; + urlConfig: Array; + done: any; } interface URLConfigItem { - id: string; - label: string; - tooltip: string; + id: string; + label: string; + tooltip: string; } interface LifecycleObject { - /** - * Runs before each test - */ - setup?: () => any; + /** + * Runs before each test + * @deprecated + */ + setup?: () => void; - /** - * Runs after each test - */ - teardown?: () => any; + /** + * Runs after each test + * @deprecated + */ + teardown?: () => void; + /** + * Runs before each test + */ + beforeEach?: () => void; + /** + * Runs after each test + */ + afterEach?: () => void; + + /** + * Any additional properties on the hooks object will be added to that context. + */ + [property: string]: any; } interface QUnitAssert { - /* ASSERT */ - assert: any; - current_testEnvironment: any; - jsDump: any; + /* ASSERT */ + assert: any; + current_testEnvironment: any; + jsDump: any; /** * Instruct QUnit to wait for an asynchronous operation. @@ -172,32 +187,32 @@ interface QUnitAssert { */ async(): () => void; - /** - * A deep recursive comparison assertion, working on primitive types, arrays, objects, - * regular expressions, dates and functions. - * - * The deepEqual() assertion can be used just like equal() when comparing the value of - * objects, such that { key: value } is equal to { key: value }. For non-scalar values, - * identity will be disregarded by deepEqual. - * - * @param actual Object or Expression being tested - * @param expected Known comparison value - * @param message A short description of the assertion - */ - deepEqual(actual: any, expected: any, message?: string): any; + /** + * A deep recursive comparison assertion, working on primitive types, arrays, objects, + * regular expressions, dates and functions. + * + * The deepEqual() assertion can be used just like equal() when comparing the value of + * objects, such that { key: value } is equal to { key: value }. For non-scalar values, + * identity will be disregarded by deepEqual. + * + * @param actual Object or Expression being tested + * @param expected Known comparison value + * @param message A short description of the assertion + */ + deepEqual(actual: any, expected: any, message?: string): any; - /** - * A non-strict comparison assertion, roughly equivalent to JUnit assertEquals. - * - * The equal assertion uses the simple comparison operator (==) to compare the actual - * and expected arguments. When they are equal, the assertion passes: any; otherwise, it fails. - * When it fails, both actual and expected values are displayed in the test result, - * in addition to a given message. - * - * @param actual Expression being tested - * @param expected Known comparison value - * @param message A short description of the assertion - */ + /** + * A non-strict comparison assertion, roughly equivalent to JUnit assertEquals. + * + * The equal assertion uses the simple comparison operator (==) to compare the actual + * and expected arguments. When they are equal, the assertion passes: any; otherwise, it fails. + * When it fails, both actual and expected values are displayed in the test result, + * in addition to a given message. + * + * @param actual Expression being tested + * @param expected Known comparison value + * @param message A short description of the assertion + */ equal(actual: any, expected: any, message?: string): any; /** @@ -211,94 +226,94 @@ interface QUnitAssert { */ expect(amount: number): any; - /** - * An inverted deep recursive comparison assertion, working on primitive types, - * arrays, objects, regular expressions, dates and functions. - * - * The notDeepEqual() assertion can be used just like equal() when comparing the - * value of objects, such that { key: value } is equal to { key: value }. For non-scalar - * values, identity will be disregarded by notDeepEqual. - * - * @param actual Object or Expression being tested - * @param expected Known comparison value - * @param message A short description of the assertion - */ - notDeepEqual(actual: any, expected: any, message?: string): any; + /** + * An inverted deep recursive comparison assertion, working on primitive types, + * arrays, objects, regular expressions, dates and functions. + * + * The notDeepEqual() assertion can be used just like equal() when comparing the + * value of objects, such that { key: value } is equal to { key: value }. For non-scalar + * values, identity will be disregarded by notDeepEqual. + * + * @param actual Object or Expression being tested + * @param expected Known comparison value + * @param message A short description of the assertion + */ + notDeepEqual(actual: any, expected: any, message?: string): any; - /** - * A non-strict comparison assertion, checking for inequality. - * - * The notEqual assertion uses the simple inverted comparison operator (!=) to compare - * the actual and expected arguments. When they aren't equal, the assertion passes: any; - * otherwise, it fails. When it fails, both actual and expected values are displayed - * in the test result, in addition to a given message. - * - * @param actual Expression being tested - * @param expected Known comparison value - * @param message A short description of the assertion - */ - notEqual(actual: any, expected: any, message?: string): any; + /** + * A non-strict comparison assertion, checking for inequality. + * + * The notEqual assertion uses the simple inverted comparison operator (!=) to compare + * the actual and expected arguments. When they aren't equal, the assertion passes: any; + * otherwise, it fails. When it fails, both actual and expected values are displayed + * in the test result, in addition to a given message. + * + * @param actual Expression being tested + * @param expected Known comparison value + * @param message A short description of the assertion + */ + notEqual(actual: any, expected: any, message?: string): any; - notPropEqual(actual: any, expected: any, message?: string): any; + notPropEqual(actual: any, expected: any, message?: string): any; - propEqual(actual: any, expected: any, message?: string): any; + propEqual(actual: any, expected: any, message?: string): any; - /** - * A non-strict comparison assertion, checking for inequality. - * - * The notStrictEqual assertion uses the strict inverted comparison operator (!==) - * to compare the actual and expected arguments. When they aren't equal, the assertion - * passes: any; otherwise, it fails. When it fails, both actual and expected values are - * displayed in the test result, in addition to a given message. - * - * @param actual Expression being tested - * @param expected Known comparison value - * @param message A short description of the assertion - */ - notStrictEqual(actual: any, expected: any, message?: string): any; + /** + * A non-strict comparison assertion, checking for inequality. + * + * The notStrictEqual assertion uses the strict inverted comparison operator (!==) + * to compare the actual and expected arguments. When they aren't equal, the assertion + * passes: any; otherwise, it fails. When it fails, both actual and expected values are + * displayed in the test result, in addition to a given message. + * + * @param actual Expression being tested + * @param expected Known comparison value + * @param message A short description of the assertion + */ + notStrictEqual(actual: any, expected: any, message?: string): any; - /** - * A boolean assertion, equivalent to CommonJS’s assert.ok() and JUnit’s assertTrue(). - * Passes if the first argument is truthy. - * - * The most basic assertion in QUnit, ok() requires just one argument. If the argument - * evaluates to true, the assertion passes; otherwise, it fails. If a second message - * argument is provided, it will be displayed in place of the result. - * - * @param state Expression being tested - * @param message A short description of the assertion - */ - ok(state: any, message?: string): any; + /** + * A boolean assertion, equivalent to CommonJS’s assert.ok() and JUnit’s assertTrue(). + * Passes if the first argument is truthy. + * + * The most basic assertion in QUnit, ok() requires just one argument. If the argument + * evaluates to true, the assertion passes; otherwise, it fails. If a second message + * argument is provided, it will be displayed in place of the result. + * + * @param state Expression being tested + * @param message A short description of the assertion + */ + ok(state: any, message?: string): any; - /** - * A strict type and value comparison assertion. - * - * The strictEqual() assertion provides the most rigid comparison of type and value with - * the strict equality operator (===) - * - * @param actual Expression being tested - * @param expected Known comparison value - * @param message A short description of the assertion - */ - strictEqual(actual: any, expected: any, message?: string): any; + /** + * A strict type and value comparison assertion. + * + * The strictEqual() assertion provides the most rigid comparison of type and value with + * the strict equality operator (===) + * + * @param actual Expression being tested + * @param expected Known comparison value + * @param message A short description of the assertion + */ + strictEqual(actual: any, expected: any, message?: string): any; - /** - * Assertion to test if a callback throws an exception when run. - * - * When testing code that is expected to throw an exception based on a specific set of - * circumstances, use throws() to catch the error object for testing and comparison. - * - * @param block Function to execute - * @param expected Error Object to compare - * @param message A short description of the assertion - */ - throws(block: () => any, expected: any, message?: string): any; + /** + * Assertion to test if a callback throws an exception when run. + * + * When testing code that is expected to throw an exception based on a specific set of + * circumstances, use throws() to catch the error object for testing and comparison. + * + * @param block Function to execute + * @param expected Error Object to compare + * @param message A short description of the assertion + */ + throws(block: () => any, expected: any, message?: string): any; - /** - * @param block Function to execute - * @param message A short description of the assertion - */ - throws(block: () => any, message?: string): any; + /** + * @param block Function to execute + * @param message A short description of the assertion + */ + throws(block: () => any, message?: string): any; /** * Alias of throws. @@ -326,177 +341,177 @@ interface QUnitAssert { raises(block: () => any, message?: string): any; } -interface QUnitStatic extends QUnitAssert { - /* ASYNC CONTROL */ +interface QUnitStatic extends QUnitAssert { + /* ASYNC CONTROL */ - /** - * Start running tests again after the testrunner was stopped. See stop(). - * - * When your async test has multiple exit points, call start() for the corresponding number of stop() increments. - * - * @param decrement Optional argument to merge multiple start() calls into one. Use with multiple corrsponding stop() calls. - */ - start(decrement?: number): any; + /** + * Start running tests again after the testrunner was stopped. See stop(). + * + * When your async test has multiple exit points, call start() for the corresponding number of stop() increments. + * + * @param decrement Optional argument to merge multiple start() calls into one. Use with multiple corrsponding stop() calls. + */ + start(decrement?: number): any; - /** - * Stop the testrunner to wait for async tests to run. Call start() to continue. - * - * When your async test has multiple exit points, call stop() with the increment argument, corresponding to the number of start() calls you need. - * - * On Blackberry 5.0, window.stop is a native read-only function. If you deal with that browser, use QUnit.stop() instead, which will work anywhere. - * - * @param decrement Optional argument to merge multiple stop() calls into one. Use with multiple corrsponding start() calls. - */ - stop(increment? : number): any; - - /* CALLBACKS */ + /** + * Stop the testrunner to wait for async tests to run. Call start() to continue. + * + * When your async test has multiple exit points, call stop() with the increment argument, corresponding to the number of start() calls you need. + * + * On Blackberry 5.0, window.stop is a native read-only function. If you deal with that browser, use QUnit.stop() instead, which will work anywhere. + * + * @param decrement Optional argument to merge multiple stop() calls into one. Use with multiple corrsponding start() calls. + */ + stop(increment? : number): any; + + /* CALLBACKS */ - /** - * Register a callback to fire whenever the test suite begins. - * - * QUnit.begin() is called once before running any tests. (a better would've been QUnit.start, - * but thats already in use elsewhere and can't be changed.) - * - * @param callback Callback to execute - */ - begin(callback: () => any): any; + /** + * Register a callback to fire whenever the test suite begins. + * + * QUnit.begin() is called once before running any tests. (a better would've been QUnit.start, + * but thats already in use elsewhere and can't be changed.) + * + * @param callback Callback to execute + */ + begin(callback: () => any): any; - /** - * Register a callback to fire whenever the test suite ends. - * - * @param callback Callback to execute. - */ - done(callback: (details: DoneCallbackObject) => any): any; + /** + * Register a callback to fire whenever the test suite ends. + * + * @param callback Callback to execute. + */ + done(callback: (details: DoneCallbackObject) => any): any; - /** - * Register a callback to fire whenever an assertion completes. - * - * This is one of several callbacks QUnit provides. Its intended for integration scenarios like - * PhantomJS or Jenkins. The properties of the details argument are listed below as options. - * - * @param callback Callback to execute. - */ - log(callback: (details: LogCallbackObject) => any): any; + /** + * Register a callback to fire whenever an assertion completes. + * + * This is one of several callbacks QUnit provides. Its intended for integration scenarios like + * PhantomJS or Jenkins. The properties of the details argument are listed below as options. + * + * @param callback Callback to execute. + */ + log(callback: (details: LogCallbackObject) => any): any; - /** - * Register a callback to fire whenever a module ends. - * - * @param callback Callback to execute. - */ - moduleDone(callback: (details: ModuleDoneCallbackObject) => any): any; + /** + * Register a callback to fire whenever a module ends. + * + * @param callback Callback to execute. + */ + moduleDone(callback: (details: ModuleDoneCallbackObject) => any): any; - /** - * Register a callback to fire whenever a module begins. - * - * @param callback Callback to execute. - */ - moduleStart(callback: (details: ModuleStartCallbackObject) => any): any; + /** + * Register a callback to fire whenever a module begins. + * + * @param callback Callback to execute. + */ + moduleStart(callback: (details: ModuleStartCallbackObject) => any): any; - /** - * Register a callback to fire whenever a test ends. - * - * @param callback Callback to execute. - */ - testDone(callback: (details: TestDoneCallbackObject) => any): any; + /** + * Register a callback to fire whenever a test ends. + * + * @param callback Callback to execute. + */ + testDone(callback: (details: TestDoneCallbackObject) => any): any; - /** - * Register a callback to fire whenever a test begins. - * - * @param callback Callback to execute. - */ - testStart(callback: (details: TestStartCallbackObject) => any): any; - - /* CONFIGURATION */ + /** + * Register a callback to fire whenever a test begins. + * + * @param callback Callback to execute. + */ + testStart(callback: (details: TestStartCallbackObject) => any): any; + + /* CONFIGURATION */ - /** - * QUnit has a bunch of internal configuration defaults, some of which are - * useful to override. Check the description for each option for details. - */ - config: Config; - - /* TEST */ + /** + * QUnit has a bunch of internal configuration defaults, some of which are + * useful to override. Check the description for each option for details. + */ + config: Config; + + /* TEST */ - /** - * Add an asynchronous test to run. The test must include a call to start(). - * - * For testing asynchronous code, asyncTest will automatically stop the test runner - * and wait for your code to call start() to continue. - * - * @param name Title of unit being tested - * @param expected Number of assertions in this test - * @param test Function to close over assertions - */ - asyncTest(name: string, expected: number, test: (assert: QUnitAssert) => any): any; + /** + * Add an asynchronous test to run. The test must include a call to start(). + * + * For testing asynchronous code, asyncTest will automatically stop the test runner + * and wait for your code to call start() to continue. + * + * @param name Title of unit being tested + * @param expected Number of assertions in this test + * @param test Function to close over assertions + */ + asyncTest(name: string, expected: number, test: (assert: QUnitAssert) => any): any; - /** - * Add an asynchronous test to run. The test must include a call to start(). - * - * For testing asynchronous code, asyncTest will automatically stop the test runner - * and wait for your code to call start() to continue. - * - * @param name Title of unit being tested - * @param test Function to close over assertions - */ - asyncTest(name: string, test: (assert: QUnitAssert) => any): any; + /** + * Add an asynchronous test to run. The test must include a call to start(). + * + * For testing asynchronous code, asyncTest will automatically stop the test runner + * and wait for your code to call start() to continue. + * + * @param name Title of unit being tested + * @param test Function to close over assertions + */ + asyncTest(name: string, test: (assert: QUnitAssert) => any): any; - /** - * Specify how many assertions are expected to run within a test. - * - * To ensure that an explicit number of assertions are run within any test, use - * expect( number ) to register an expected count. If the number of assertions - * run does not match the expected count, the test will fail. - * - * @param amount Number of assertions in this test. - * @depricated since version 1.16 - */ - expect(amount: number): any; + /** + * Specify how many assertions are expected to run within a test. + * + * To ensure that an explicit number of assertions are run within any test, use + * expect( number ) to register an expected count. If the number of assertions + * run does not match the expected count, the test will fail. + * + * @param amount Number of assertions in this test. + * @depricated since version 1.16 + */ + expect(amount: number): any; - /** - * Group related tests under a single label. - * - * All tests that occur after a call to module() will be grouped into that module. - * The test names will all be preceded by the module name in the test results. - * You can then use that module name to select tests to run. - * - * @param name Label for this group of tests - * @param lifecycle Callbacks to run before and after each test - */ - module(name: string, lifecycle?: LifecycleObject): any; + /** + * Group related tests under a single label. + * + * All tests that occur after a call to module() will be grouped into that module. + * The test names will all be preceded by the module name in the test results. + * You can then use that module name to select tests to run. + * + * @param name Label for this group of tests + * @param lifecycle Callbacks to run before and after each test + */ + module(name: string, lifecycle?: LifecycleObject): any; - /** - * Add a test to run. - * - * When testing the most common, synchronous code, use test(). - * The assert argument to the callback contains all of QUnit's assertion methods. - * If you are avoiding using any of QUnit's globals, you can use the assert - * argument instead. - * - * @param title Title of unit being tested - * @param expected Number of assertions in this test - * @param test Function to close over assertions - */ - test(title: string, expected: number, test: (assert: QUnitAssert) => any): any; + /** + * Add a test to run. + * + * When testing the most common, synchronous code, use test(). + * The assert argument to the callback contains all of QUnit's assertion methods. + * If you are avoiding using any of QUnit's globals, you can use the assert + * argument instead. + * + * @param title Title of unit being tested + * @param expected Number of assertions in this test + * @param test Function to close over assertions + */ + test(title: string, expected: number, test: (assert: QUnitAssert) => any): any; - /** - * @param title Title of unit being tested - * @param test Function to close over assertions - */ - test(title: string, test: (assert: QUnitAssert) => any): any; + /** + * @param title Title of unit being tested + * @param test Function to close over assertions + */ + test(title: string, test: (assert: QUnitAssert) => any): any; - /** - * https://github.com/jquery/qunit/blob/master/qunit/qunit.js#L1568 - */ - equiv(a: any, b: any): any; + /** + * https://github.com/jquery/qunit/blob/master/qunit/qunit.js#L1568 + */ + equiv(a: any, b: any): any; - /** - * https://github.com/jquery/qunit/blob/master/qunit/qunit.js#L897 - */ - push(result: any, actual: any, expected: any, message: string): any; + /** + * https://github.com/jquery/qunit/blob/master/qunit/qunit.js#L897 + */ + push(result: any, actual: any, expected: any, message: string): any; - /** - * https://github.com/jquery/qunit/blob/master/qunit/qunit.js#L839 - */ - reset(): any; + /** + * https://github.com/jquery/qunit/blob/master/qunit/qunit.js#L839 + */ + reset(): any; } /* ASSERT */ @@ -635,7 +650,7 @@ declare function start(decrement?: number): any; * @param decrement Optional argument to merge multiple stop() calls into one. Use with multiple corrsponding start() calls. */ declare function stop(increment? : number): any; - + /* CALLBACKS */ /** @@ -692,7 +707,7 @@ declare function testDone(callback: (details: TestDoneCallbackObject) => any): a * @param callback Callback to execute. */ declare function testStart(callback: (details: TestStartCallbackObject) => any): any; - + /* TEST */ /** diff --git a/selectize/selectize.d.ts b/selectize/selectize.d.ts index 3ac665458..3a61334f5 100644 --- a/selectize/selectize.d.ts +++ b/selectize/selectize.d.ts @@ -183,6 +183,13 @@ declare module Selectize { */ valueField?: string; + /** + * Option groups that options will be bucketed into. + * If your element is a