diff --git a/ej.web.all/index.d.ts b/ej.web.all/index.d.ts index 98e093316b..eb8f708701 100644 --- a/ej.web.all/index.d.ts +++ b/ej.web.all/index.d.ts @@ -11964,7 +11964,7 @@ export interface TabsGroupsContentGroup { /** Specifies the Syncfusion button and menu as gallery extra items. * @Default {array} */ - customGalleryItems?: Array; + customGalleryItems?: TabsGroupsContentGroupsCustomGalleryItem[]; /** Provides custom tooltip for button, split button, dropdown list, toggle button, custom controls in the sub groups. Text and HTML support are also provided for title and content. * @Default {Object} @@ -11989,7 +11989,7 @@ export interface TabsGroupsContentGroup { /** Defines each gallery content. * @Default {array} */ - galleryItems?: Array; + galleryItems?: TabsGroupsContentGroupsGalleryItem[]; /** Specifies the Id for button, split button, dropdown list, toggle button, gallery, custom controls in the sub groups. * @Default {null} @@ -12052,7 +12052,7 @@ export interface TabsGroupsContent { /** Specifies the controls such as Syncfusion button, split button, dropdown list, toggle button, gallery, custom controls in the subgroup of the ribbon tab . * @Default {array} */ - groups?: Array; + groups?: TabsGroupsContentGroup[]; } export interface TabsGroupsGroupExpanderSettings { @@ -12078,7 +12078,7 @@ export interface TabsGroup { /** Specifies the Syncfusion button, split button, dropdown list, toggle button, gallery, custom controls to the groups in the ribbon control. * @Default {array} */ - content?: Array; + content?: TabsGroupsContent[]; /** Specifies the ID of custom items to be placed in the groups. * @Default {null} @@ -12116,7 +12116,7 @@ export interface Tab { /** Specifies single group or multiple groups and its contents to each tab in the ribbon control. * @Default {array} */ - groups?: Array; + groups?: TabsGroup[]; /** Specifies the ID for each tab's content panel. * @Default {null} @@ -12475,7 +12475,7 @@ export interface Model { /** Gets or sets a value that indicates whether to add customToolbarItems within the toolbar to perform any action in the Kanban. * @Default {[]} */ - customToolbarItems?: Array; + customToolbarItems?: CustomToolbarItem[]; /** Gets or sets a value that indicates to render the Kanban with custom theme. */ @@ -12529,7 +12529,7 @@ export interface Model { /** To customize the filtering behavior based on queries given. * @Default {array} */ - filterSettings?: Array; + filterSettings?: FilterSetting[]; /** ej Query to query database of Kanban. * @Default {null} @@ -12559,7 +12559,7 @@ export interface Model { /** Gets or sets an object that indicates to managing the collection of stacked header rows for the Kanban. * @Default {Array} */ - stackedHeaderRows?: Array; + stackedHeaderRows?: StackedHeaderRow[]; /** The tooltip allows to display card details in a tooltip while hovering on it. */ @@ -13604,7 +13604,7 @@ export interface EditSettings { /** Get or sets an object that indicates whether to customize the editing fields of Kanban card. * @Default {Array} */ - editItems?: Array; + editItems?: EditSettingsEditItem[]; /** This specifies the id of the template which is require to be edited using the External edit form. * @Default {null} @@ -13736,7 +13736,7 @@ export interface StackedHeaderRow { /** Gets or sets a value that indicates whether to add stacked header columns into the stacked header rows. * @Default {Array} */ - stackedHeaderColumns?: Array; + stackedHeaderColumns?: StackedHeaderRowsStackedHeaderColumn[]; } export interface TooltipSettings { @@ -15030,11 +15030,11 @@ export interface Tools { /** Specifies the customOrderedList tools and the display order of this tool in the RTE toolbar. */ - customOrderedList?: Array; + customOrderedList?: ToolsCustomOrderedList[]; /** Specifies the customUnOrderedList tools and the display order of this tool in the RTE toolbar. */ - customUnorderedList?: Array; + customUnorderedList?: ToolsCustomUnorderedList[]; } } @@ -20855,12 +20855,12 @@ export interface Model { /** Gets or sets an object that indicates to managing the collection of stacked header rows for the grid. * @Default {[]} */ - stackedHeaderRows?: Array; + stackedHeaderRows?: StackedHeaderRow[]; /** Gets or sets an object that indicates to managing the collection of summary rows for the grid. * @Default {[]} */ - summaryRows?: Array; + summaryRows?: SummaryRow[]; /** Gets or sets an object that indicates whether to auto wrap the grid header or content or both */ @@ -22713,7 +22713,7 @@ export interface Column { /** Gets or sets an object that indicates to define a command column in the grid. * @Default {[]} */ - commands?: Array; + commands?: ColumnsCommand[]; /** Gets or sets a value that indicates to provide custom CSS for an individual column. */ @@ -22882,7 +22882,7 @@ export interface ContextMenuSettings { /** Used to get or set the subMenu to the corresponding custom context menu item. */ - subContextMenu?: Array; + subContextMenu?: ContextMenuSettingsSubContextMenu[]; /** Gets or sets a value that indicates whether to disable the default context menu items in the grid. * @Default {false} @@ -22997,7 +22997,7 @@ export interface FilterSettings { /** Gets or sets a value that indicates whether to define the filtered columns details programmatically at initial load * @Default {[]} */ - filteredColumns?: Array; + filteredColumns?: FilterSettingsFilteredColumn[]; /** This specifies the grid to show the filterBar or filterMenu to the grid records. See filterType * @Default {ej.Grid.FilterType.FilterBar} @@ -23235,7 +23235,7 @@ export interface SortSettings { /** Gets or sets a value that indicates whether to define the direction and field to sort the column. */ - sortedColumns?: Array; + sortedColumns?: SortSettingsSortedColumn[]; } export interface StackedHeaderRowsStackedHeaderColumn { @@ -23266,7 +23266,7 @@ export interface StackedHeaderRow { /** Gets or sets a value that indicates whether to add stacked header columns into the stacked header rows * @Default {[]} */ - stackedHeaderColumns?: Array; + stackedHeaderColumns?: StackedHeaderRowsStackedHeaderColumn[]; } export interface SummaryRowsSummaryColumn { @@ -23332,7 +23332,7 @@ export interface SummaryRow { /** Gets or sets a value that indicates whether to add summary columns into the summary rows. * @Default {[]} */ - summaryColumns?: Array; + summaryColumns?: SummaryRowsSummaryColumn[]; /** This specifies the grid to show the title for the summary rows. */ @@ -24863,7 +24863,7 @@ export interface DataSourceColumn { /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. * @Default {[]} */ - advancedFilter?: Array; + advancedFilter?: DataSourceColumnsAdvancedFilter[]; /** Allows the user to indicate whether the added item is a named set or not. * @Default {false} @@ -24946,7 +24946,7 @@ export interface DataSourceRow { /** Allows the user to filter the report by default using advanced filtering (excel-like) option for OLAP data source in client-mode. * @Default {[]} */ - advancedFilter?: Array; + advancedFilter?: DataSourceRowsAdvancedFilter[]; /** Allows the user to indicate whether the added item is a named set or not. * @Default {false} @@ -25081,7 +25081,7 @@ export interface DataSource { /** Lists out the items to be arranged in columns section of PivotGrid. * @Default {[]} */ - columns?: Array; + columns?: DataSourceColumn[]; /** Lists out the items to be arranged in rows section of PivotGrid. * @Default {[]} @@ -28085,7 +28085,7 @@ export interface Model { /** Holds all the options related to the resources settings of the Schedule. It is a collection of one or more resource objects, where the levels of resources are rendered on the Schedule based on the order of the resource data provided within this collection. * @Default {null} */ - resources?: Array; + resources?: Resource[]; /** When set to true, displays the all-day row cells on the Schedule. * @Default {true} @@ -30186,7 +30186,7 @@ export interface Model { /** Specifies the selected cell information on rendering Gantt. */ - selectedCellIndexes?: Array; + selectedCellIndexes?: SelectedCellIndex[]; /** Specifies the sorting options for Gantt. */ @@ -31423,7 +31423,7 @@ export interface Model { /** Gets or sets the list of data sources for the RDLC report. * @Default {[]} */ - dataSources?: Array; + dataSources?: DataSource[]; /** Enables or disables the page cache of report. * @Default {false} @@ -31451,7 +31451,7 @@ export interface Model { /** Gets or sets the list of parameters associated with the report. * @Default {[]} */ - parameters?: Array; + parameters?: Parameter[]; /** Enables and disables the print mode. * @Default {false} @@ -34136,7 +34136,7 @@ export interface Model { /** Specify the items of radial menu */ - items?: Array; + items?: Item[]; /** Specifies the radius of radial menu */ @@ -36424,7 +36424,7 @@ export interface Model { /** Gets or sets an object that indicates to customize the sheet behavior in Spreadsheet. */ - sheets?: Array; + sheets?: Sheet[]; /** Gets or sets a value that indicates whether to show or hide pager in the Spreadsheet. * @Default {true} @@ -37876,7 +37876,7 @@ export interface Sheet { /** Specifies the border for the cell in the Spreadsheet. * @Default {[]} */ - border?: Array; + border?: SheetsBorder[]; /** Specifies the conditional formatting for the range of cell in Spreadsheet. * @Default {[]} @@ -37935,7 +37935,7 @@ export interface Sheet { /** Specifies single range or multiple range settings for a sheet in Spreadsheet. * @Default {[]} */ - rangeSettings?: Array; + rangeSettings?: SheetsRangeSetting[]; /** Gets or sets a value that indicates to define row count in the Spreadsheet. * @Default {20} @@ -37945,7 +37945,7 @@ export interface Sheet { /** Specifies the rows for a sheet in Spreadsheet. * @Default {[]} */ - rows?: Array; + rows?: SheetsRow[]; /** Gets or sets a value that indicates whether to show or hide grid lines in the Spreadsheet. * @Default {true} @@ -39010,7 +39010,7 @@ export interface Model { /** An array of JSON objects, where each object represents a node/connector * @Default {[]} */ - palettes?: Array; + palettes?: Palette[]; /** Defines the preview height of the symbols * @Default {100} @@ -40526,7 +40526,7 @@ export interface ScalesIndicator { /** Specifies the state ranges in bar indicators * @Default {Array} */ - stateRanges?: Array; + stateRanges?: ScalesIndicatorsStateRange[]; /** Specifies the textLocation in bar indicators * @Default {null} @@ -43586,7 +43586,7 @@ export interface Model { /** Options for adding and customizing annotations in Chart. */ - annotations?: Array; + annotations?: Annotation[]; /** URL of the image to be used as chart background. * @Default {null} @@ -43607,7 +43607,7 @@ export interface Model { /** Options to split Chart into multiple plotting areas vertically. Each object in the collection represents a plotting area in Chart. */ - columnDefinitions?: Array; + columnDefinitions?: ColumnDefinition[]; /** Options for configuring the properties of all the series. You can also override the options for specific series by using series collection. */ @@ -43639,7 +43639,7 @@ export interface Model { /** Options to customize the technical indicators. */ - indicators?: Array; + indicators?: Indicator[]; /** Controls whether Chart has to be responsive while resizing. * @Default {false} @@ -43688,11 +43688,11 @@ export interface Model { /** Options to split Chart into multiple plotting areas horizontally. Each object in the collection represents a plotting area in Chart. */ - rowDefinitions?: Array; + rowDefinitions?: RowDefinition[]; /** Specifies the properties used for customizing the series. */ - series?: Array; + series?: Series[]; /** Controls whether data points has to be displayed side by side or along the depth of the axis. * @Default {false} @@ -45982,7 +45982,7 @@ export interface CommonSeriesOptions { /** Option to add the trendlines to chart. */ - trendlines?: Array; + trendlines?: CommonSeriesOptionsTrendline[]; /** Options for customizing the appearance of the series or data point while highlighting. */ @@ -47216,7 +47216,7 @@ export interface PrimaryXAxis { /** Options for customizing the strip lines. * @Default {[ ]} */ - stripLine?: Array; + stripLine?: PrimaryXAxisStripLine[]; /** Specifies the position of the axis tick lines. * @Default {outside. See TickLinesPosition} @@ -48553,7 +48553,7 @@ export interface PrimaryYAxis { /** Options for customizing the strip lines. * @Default {[ ]} */ - stripLine?: Array; + stripLine?: PrimaryYAxisStripLine[]; /** Specifies the position of the axis tick lines. * @Default {outside. See TickLinesPosition} @@ -49783,7 +49783,7 @@ export interface Series { /** Option to add data points; each point should have x and y property. Also, optionally, you can customize the points color, border, marker by using fill, border and marker options. */ - points?: Array; + points?: SeriesPoint[]; /** Specifies the mode of the pyramid series. * @Default {linear} @@ -49880,7 +49880,7 @@ export interface Series { /** Option to add trendlines to chart. */ - trendlines?: Array; + trendlines?: SeriesTrendline[]; /** Options for customizing the appearance of the series or data point while highlighting. */ @@ -50784,7 +50784,7 @@ export interface Model { /** Specifies the properties used for customizing the range series. */ - series?: Array; + series?: Series[]; /** Toggles the redrawing of chart on moving the sliders. * @Default {true} @@ -51945,7 +51945,7 @@ export interface Model { /** Contains property to customize the qualitative ranges. */ - qualitativeRanges?: Array; + qualitativeRanges?: QualitativeRange[]; /** Size of the qualitative range depends up on the specified value. * @Default {32} @@ -52702,7 +52702,7 @@ export interface QuantitativeScaleSettings { /** Contains property to customize the featured measure. */ - featureMeasures?: Array; + featureMeasures?: QuantitativeScaleSettingsFeatureMeasure[]; /** Contains property to customize the fields. */ @@ -53156,7 +53156,7 @@ export interface Model { /** Layer for holding the map shapes */ - layers?: Array; + layers?: Layer[]; /** Triggered on selecting the map markers. */ markerSelected? (e: MarkerSelectedEventArgs): void; @@ -53548,12 +53548,12 @@ export interface LayersShapeSettingsColorMappings { /** Specifies the range colorMappings in the shape layer of map. * @Default {null} */ - rangeColorMapping?: Array; + rangeColorMapping?: LayersShapeSettingsColorMappingsRangeColorMapping[]; /** Specifies the equalColorMapping in the shape layer of map. * @Default {null} */ - equalColorMapping?: Array; + equalColorMapping?: LayersShapeSettingsColorMappingsEqualColorMapping[]; } export interface LayersShapeSettings { @@ -53968,7 +53968,7 @@ export interface Model { /** Specifies the group color mapping of the treemap * @Default {[]} */ - groupColorMapping?: Array; + groupColorMapping?: GroupColorMapping[]; /** Specifies the legend settings of the treemap */ diff --git a/heremaps/index.d.ts b/heremaps/index.d.ts index 53a9ad71d3..e41287d156 100644 --- a/heremaps/index.d.ts +++ b/heremaps/index.d.ts @@ -113,7 +113,7 @@ declare namespace H { * @param opt_x2 {number=} - The X coordinate of the right edge of the capturing rectangle defaults to viewport width * @param opt_y2 {number=} - The Y coordinate of the bottom edge of the capturing rectangle defaults to viewport height */ - capture(callback?: (canvas: HTMLCanvasElement) => void, opt_capturables?: Array, opt_x1?: number, opt_y1?: number, opt_x2?: number, opt_y2?: number): void; + capture(callback?: (canvas: HTMLCanvasElement) => void, opt_capturables?: H.util.ICapturable[], opt_x1?: number, opt_y1?: number, opt_x2?: number, opt_y2?: number): void; /** * This method sets the rendering engine type for the map. Rendering engine is responsible for displaying i.e tiles and data on the map. @@ -180,7 +180,7 @@ declare namespace H { * @param x {number} - map viewport x-axis pixel coordinate * @param y {number} - map viewport y-axis pixel coordinate * @returns {?H.geo.Point} - */ + */map. screenToGeo(x: number, y: number): H.geo.Point; /** @@ -207,23 +207,23 @@ declare namespace H { /** * This method retrieves the list of all objects which have been added to the map. - * @returns {Array} - the list of all use objects which are currently on the map. + * @returns {H.map.Object[]} - the list of all use objects which are currently on the map. */ - getObjects(): Array; + getObjects(): H.map.Object[]; /** * This method adds an array of objects or an object group to the map. * @param mapObjects {Array} * @returns {H.Map} - the map instance */ - addObjects(mapObjects: Array): H.Map; + addObjects(mapObjects: H.map.Object[]): H.Map; /** * This method removes an array of object or an object group from the map. - * @param mapObjects {(Array | H.map.Group)} + * @param mapObjects {(H.map.Object[] | H.map.Group)} * @returns {H.Map} - the map instance */ - removeObjects(mapObjects: (Array | H.map.Group)): H.Map; + removeObjects(mapObjects: (H.map.Object[] | H.map.Group)): H.Map; /** * Returns the top most z-ordered map object found under the specific screen coordinates. Coordinates are viewport pixel coordinates starting from top left corner as (0, 0) point. @@ -239,7 +239,7 @@ declare namespace H { * @param y {number} - map viewport y-axis pixel coordinate * @returns {Array} */ - getObjectsAt(x: number, y: number): Array; + getObjectsAt(x: number, y: number): H.map.Object[]; /** * This method will dispatch event on the event target object @@ -284,7 +284,7 @@ declare namespace H { * @property center {H.geo.IPoint=} - The initial center of the map, default is {lat:0, lng: 0} * @property zoom {number=} - The initial zoom level of the map, default is 0 respectively the minimal zoom level of the base map * @property bounds {H.geo.Rect=} - The view bounds to be displayed on the map. If provided, it takes precedence over center and zoom. and zoom if provided) - * @property layers {Array=} - A list of layers to render on top of the base map + * @property layers {H.map.layer.Layer[]=} - A list of layers to render on top of the base map * @property engineType: {H.Map.EngineType=} - The initial engine type to use, default is P2D * @property pixelRatio {number} - The pixelRatio to use for over-sampling in cases of high-resolution displays, default is 1 * @property imprint {H.map.Imprint.Options=} - The imprint options or null to suppress the imprint @@ -298,7 +298,7 @@ declare namespace H { center?: H.geo.IPoint; zoom?: number; bounds?: H.geo.Rect; - layers?: Array; + layers?: H.map.layer.Layer[]; engineType?: EngineType; pixelRatio?: number; imprint?: H.map.Imprint.Options; @@ -676,9 +676,9 @@ declare namespace H { /** * Method returns collection of currently parsed, and converted to H.map.Object data objects. Method returns only currently parsed objects if parsing is ongoing. - * @returns {Array} + * @returns {H.map.Object[]} */ - getParsedObjects(): Array; + getParsedObjects(): H.map.Object[]; /** * Returns URL of the current file, which is either in process of fetching/parsing or file that has been already parsed. @@ -1372,7 +1372,7 @@ declare namespace H { * Constructor * @param opt_layers {Array=} - array of layers to be added to the data model */ - constructor(opt_layers?: Array); + constructor(opt_layers?: H.map.layer.Layer[]); } /** @@ -1488,7 +1488,7 @@ declare namespace H { * @param opt_recursive {boolean=} - Indicates whether objects in sub-groups are also collected . * @returns {!Array} */ - getObjects(opt_recursive?: boolean): Array; + getObjects(opt_recursive?: boolean): H.map.Object[]; /** * Method returns the bounding rectangle for the group. The rectangle is the smallest rectangle that covers all objects. If group doesn't contains objects method returns null. @@ -1507,7 +1507,7 @@ declare namespace H { * Appends a list of objects to this group * @param objects {Array} */ - addObjects(objects: Array): void; + addObjects(objects: H.map.Object[]): void; /** * Removes an object from this group. @@ -1520,7 +1520,7 @@ declare namespace H { * Removes objects from this group. * @param objects {!Array} - The list of objects to remove */ - removeObjects(objects: Array): void; + removeObjects(objects: H.map.Object[]): void; /** * Method removes all objects from the group. @@ -1537,7 +1537,7 @@ declare namespace H { * @property zIndex {number=} - The z-index value of the map object, default is 0 * @property provider {(H.map.provider.Provider | null)=} - The provider of this object. This property is only needed if a customized Implementation of ObjectProvider wants to instantiate an object. * @property data {*} - Optional arbitrary data to be stored with this map object. This data can be retrieved by calling getData. - * @property objects {Array=} - A list of map objects to add initially to this group. + * @property objects {H.map.Object[]=} - A list of map objects to add initially to this group. */ export interface Options { min?: number; @@ -1546,7 +1546,7 @@ declare namespace H { zIndex?: number; provider?: H.map.provider.Provider; data?: any; - objects?: Array; + objects?: H.map.Object[]; } } @@ -3343,7 +3343,7 @@ declare namespace H { * @param x {number} - The row number of the tile * @param y {number} - The column number of the tile * @param z {number} - The zoom level for which the tile is requested - * @param onResponse {function((Array | HTMLImageElement | HTMLCanvasElement | ArrayBuffer | null), *=)} - function which is called after response arrives + * @param onResponse {function((H.map.Object[] | HTMLImageElement | HTMLCanvasElement | ArrayBuffer | null), *=)} - function which is called after response arrives * @param onError {function(string=)} - function which is called in case of communication error * @param opt_priority {H.net.Request.Priority=} - optional request priority level * @returns {H.util.ICancelable} @@ -3354,7 +3354,7 @@ declare namespace H { z: number, onResponse?: ( - object: Array | HTMLImageElement | HTMLCanvasElement | ArrayBuffer, + object: H.map.Object[] | HTMLImageElement | HTMLCanvasElement | ArrayBuffer, response: any ) => void, diff --git a/js-data/index.d.ts b/js-data/index.d.ts index 6408b70279..a2300af1aa 100644 --- a/js-data/index.d.ts +++ b/js-data/index.d.ts @@ -100,7 +100,7 @@ declare namespace JSData { } interface DSCollection extends Array { - fetch(params?: DSFilterArg, options?: DSConfiguration): JSDataPromise>>; + fetch(params?: DSFilterArg, options?: DSConfiguration): JSDataPromise<(T & DSInstanceShorthands)[]>; params: DSFilterArg; resourceName: string; } @@ -124,25 +124,25 @@ declare namespace JSData { defaults: DSConfiguration; changeHistory(resourceName: string, id: string | number): Object[]; - changes(resourceName: string, id: string | number, options?: {ignoredChanges: Array}): Object; - clear(): Array>; + changes(resourceName: string, id: string | number, options?: {ignoredChanges: (string|RegExp)[]}): Object; + clear(): (T & DSInstanceShorthands)[]; compute(resourceName: string, idOrInstance: number | string | T): T & DSInstanceShorthands; create(resourceName: string, attrs: Object, options?: DSConfiguration): JSDataPromise>; - createCollection(resourceName: string, array?: Array, params?: DSFilterArg, options?: DSConfiguration): DSCollection>; + createCollection(resourceName: string, array?: T[], params?: DSFilterArg, options?: DSConfiguration): DSCollection>; createInstance(resourceName: string, attrs?: Object, options?: DSConfiguration): T & DSInstanceShorthands; destroy(resourceName: string, id: string | number, options?: DSAdapterOperationConfiguration): JSDataPromise; destroyAll(resourceName: string, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise; digest(): void; eject(resourceName: string, id: string | number, options?: DSConfiguration): T & DSInstanceShorthands; - ejectAll(resourceName: string, params: DSFilterArg, options?: DSConfiguration): Array>; - filter(resourceName: string, params: DSFilterArg, options?: DSConfiguration): Array>; + ejectAll(resourceName: string, params: DSFilterArg, options?: DSConfiguration): (T & DSInstanceShorthands)[]; + filter(resourceName: string, params: DSFilterArg, options?: DSConfiguration): (T & DSInstanceShorthands)[]; find(resourceName: string, id: string | number, options?: DSAdapterOperationConfiguration): JSDataPromise>; - findAll(resourceName: string, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise>>; + findAll(resourceName: string, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise<(T & DSInstanceShorthands)[]>; get(resourceName: string, id: string | number): T & DSInstanceShorthands; - getAll(resourceName: string, ids?: Array): Array>; + getAll(resourceName: string, ids?: (string | number)[]): (T & DSInstanceShorthands)[]; hasChanges(resourceName: string, id: string | number): boolean; inject(resourceName: string, attrs: TInject, options?: DSConfiguration): U & DSInstanceShorthands; - inject(resourceName: string, items: Array, options?: DSConfiguration): Array>; + inject(resourceName: string, items: TInject[], options?: DSConfiguration): (U & DSInstanceShorthands)[]; is(resourceName: string, object: Object): boolean; lastModified(resourceName: string, id?: string | number): number; // timestamp lastSaved(resourceName: string, id?: string | number): number; // timestamp @@ -150,11 +150,11 @@ declare namespace JSData { previous(resourceName: string, id: string | number): T & DSInstanceShorthands; reap(resourceName: string): JSDataPromise; refresh(resourceName: string, id: string | number, options?: DSAdapterOperationConfiguration): JSDataPromise>; - refreshAll(resourceName: string, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise>>; + refreshAll(resourceName: string, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise<(T & DSInstanceShorthands)[]>; revert(resourceName: string, id: string | number): T & DSInstanceShorthands; save(resourceName: string, id: string | number, options?: DSSaveConfiguration): JSDataPromise>; update(resourceName: string, id: string | number, attrs: Object, options?: DSAdapterOperationConfiguration): JSDataPromise>; - updateAll(resourceName: string, attrs: Object, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise>>; + updateAll(resourceName: string, attrs: Object, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise<(T & DSInstanceShorthands)[]>; defineResource(resourceNameOrDefinition: string | DSResourceDefinitionConfiguration): DSResourceDefinition; defineResource(resourceNameOrDefinition: string | DSResourceDefinitionConfiguration): DSResourceDefinition & TActions; @@ -163,25 +163,25 @@ declare namespace JSData { interface DSResourceDefinition extends DSResourceDefinitionConfiguration, DSEvents { changeHistory(id: string | number): Object[]; - changes(id: string | number, options?: {ignoredChanges: Array}): Object; - clear(): Array>; + changes(id: string | number, options?: {ignoredChanges: (string|RegExp)[]}): Object; + clear(): (T & DSInstanceShorthands)[]; compute(idOrInstance: number | string | T): T & DSInstanceShorthands; create(attrs: Object, options?: DSConfiguration): JSDataPromise>; - createCollection(array?: Array, params?: DSFilterArg, options?: DSConfiguration): DSCollection>; + createCollection(array?: T[], params?: DSFilterArg, options?: DSConfiguration): DSCollection>; createInstance(attrs?: Object, options?: DSConfiguration): T & DSInstanceShorthands; destroy(id: string | number, options?: DSAdapterOperationConfiguration): JSDataPromise; destroyAll(params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise; digest(): void; eject(id: string | number, options?: DSConfiguration): T & DSInstanceShorthands; - ejectAll(params: DSFilterArg, options?: DSConfiguration): Array>; - filter(params: DSFilterArg, options?: DSConfiguration): Array>; + ejectAll(params: DSFilterArg, options?: DSConfiguration): (T & DSInstanceShorthands)[]; + filter(params: DSFilterArg, options?: DSConfiguration): (T & DSInstanceShorthands)[]; find(id: string | number, options?: DSAdapterOperationConfiguration): JSDataPromise>; - findAll(params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise>>; + findAll(params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise<(T & DSInstanceShorthands)[]>; get(id: string | number): T & DSInstanceShorthands; - getAll(ids?: Array): Array>; + getAll(ids?: (string | number)[]): (T & DSInstanceShorthands)[]; hasChanges(id: string | number): boolean; inject(attrs: TInject, options?: DSConfiguration): T & DSInstanceShorthands; - inject(items: Array, options?: DSConfiguration): Array>; + inject(items: TInject[], options?: DSConfiguration): (T & DSInstanceShorthands)[]; is(object: Object): boolean; lastModified(id?: string | number): number; // timestamp lastSaved(id?: string | number): number; // timestamp @@ -189,11 +189,11 @@ declare namespace JSData { previous(id: string | number): T & DSInstanceShorthands; reap(): JSDataPromise; refresh(id: string | number, options?: DSAdapterOperationConfiguration): JSDataPromise>; - refreshAll(params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise>>; + refreshAll(params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise<(T & DSInstanceShorthands)[]>; revert(id: string | number): T & DSInstanceShorthands; save(id: string | number, options?: DSSaveConfiguration): JSDataPromise>; update(id: string | number, attrs: Object, options?: DSAdapterOperationConfiguration): JSDataPromise>; - updateAll(attrs: Object, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise>>; + updateAll(attrs: Object, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise<(T & DSInstanceShorthands)[]>; } // cannot specify T at interface level because the interface is used as generic constraint itself which ends up being recursive diff --git a/js-data/legacy/index.d.ts b/js-data/legacy/index.d.ts index 783d470ba5..638a7036b3 100644 --- a/js-data/legacy/index.d.ts +++ b/js-data/legacy/index.d.ts @@ -35,10 +35,10 @@ declare namespace JSData { destroy(resourceName: string, id: string | number, options?: DSAdapterOperationConfiguration): JSDataPromise; destroyAll(resourceName: string, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise; find(resourceName: string, id: string | number, options?: DSAdapterOperationConfiguration): JSDataPromise>; - findAll(resourceName: string, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise>>; + findAll(resourceName: string, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise<(T & DSInstanceShorthands)[]>; loadRelations(resourceName: string, idOrInstance: string | number | Object, relations: string | string[], options?: DSAdapterOperationConfiguration): JSDataPromise>; update(resourceName: string, id: string | number, attrs: Object, options?: DSSaveConfiguration): JSDataPromise>; - updateAll(resourceName: string, attrs: Object, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise>>; + updateAll(resourceName: string, attrs: Object, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise<(T & DSInstanceShorthands)[]>; reap(resourceName: string, options?: DSConfiguration): JSDataPromise; refresh(resourceName: string, id: string | number, options?: DSAdapterOperationConfiguration): JSDataPromise>; save(resourceName: string, id: string | number, options?: DSSaveConfiguration): JSDataPromise>; @@ -50,13 +50,13 @@ declare namespace JSData { createInstance(resourceName: string, attrs?: T, options?: DSAdapterOperationConfiguration): T & DSInstanceShorthands; digest(): void; eject(resourceName: string, id: string | number, options?: DSConfiguration): T & DSInstanceShorthands; - ejectAll(resourceName: string, params: DSFilterArg, options?: DSConfiguration): Array>; - filter(resourceName: string, params: DSFilterArg, options?: DSConfiguration): Array>; + ejectAll(resourceName: string, params: DSFilterArg, options?: DSConfiguration): (T & DSInstanceShorthands)[]; + filter(resourceName: string, params: DSFilterArg, options?: DSConfiguration): (T & DSInstanceShorthands)[]; get(resourceName: string, id: string | number, options?: DSConfiguration): T & DSInstanceShorthands; - getAll(resourceName: string, ids?: Array): Array>; + getAll(resourceName: string, ids?: (string | number)[]): (T & DSInstanceShorthands)[]; hasChanges(resourceName: string, id: string | number): boolean; inject(resourceName: string, item: T, options?: DSConfiguration): T & DSInstanceShorthands; - inject(resourceName: string, items: Array, options?: DSConfiguration): Array>; + inject(resourceName: string, items: T[], options?: DSConfiguration): (T & DSInstanceShorthands)[]; is(resourceName: string, object: Object): boolean; lastModified(resourceName: string, id?: string | number): number; // timestamp lastSaved(resourceName: string, id?: string | number): number; // timestamp @@ -93,7 +93,7 @@ declare namespace JSData { findInverseLinks?: boolean; findStrategy?: string; idAttribute?: string; - ignoredChanges?: Array; + ignoredChanges?: (RegExp | string)[]; keepChangeHistory?: boolean; loadFromServer?: boolean; log?: boolean | ((message?: any, ...optionalParams: any[]) => void); @@ -137,10 +137,10 @@ declare namespace JSData { destroy(id: string | number, options?: DSAdapterOperationConfiguration): JSDataPromise; destroyAll(params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise; find(id: string | number, options?: DSAdapterOperationConfiguration): JSDataPromise>; - findAll(params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise>>; + findAll(params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise<(T & DSInstanceShorthands)[]>; loadRelations(idOrInstance: string | number | Object, relations: string | string[], options?: DSAdapterOperationConfiguration): JSDataPromise>; update(id: string | number, attrs: Object, options?: DSSaveConfiguration): JSDataPromise>; - updateAll(attrs: Object, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise>>; + updateAll(attrs: Object, params?: DSFilterArg, options?: DSAdapterOperationConfiguration): JSDataPromise<(T & DSInstanceShorthands)[]>; reap(options?: DSConfiguration): JSDataPromise; refresh(id: string | number, options?: DSAdapterOperationConfiguration): JSDataPromise>; save(id: string | number, options?: DSSaveConfiguration): JSDataPromise>; @@ -152,13 +152,13 @@ declare namespace JSData { createInstance(attrs?: TInject, options?: DSAdapterOperationConfiguration): T & DSInstanceShorthands; digest(): void; eject(id: string | number, options?: DSConfiguration): T & DSInstanceShorthands; - ejectAll(params: DSFilterArg, options?: DSConfiguration): Array>; - filter(params: DSFilterArg, options?: DSConfiguration): Array>; + ejectAll(params: DSFilterArg, options?: DSConfiguration): (T & DSInstanceShorthands)[]; + filter(params: DSFilterArg, options?: DSConfiguration): (T & DSInstanceShorthands)[]; get(id: string | number, options?: DSConfiguration): T & DSInstanceShorthands; - getAll(ids?: Array): Array>; + getAll(ids?: (string | number)[]): (T & DSInstanceShorthands)[]; hasChanges(id: string | number): boolean; inject(item: T, options?: DSConfiguration): T & DSInstanceShorthands; - inject(items: Array, options?: DSConfiguration): Array>; + inject(items: T[], options?: DSConfiguration): (T & DSInstanceShorthands)[]; is(object: Object): boolean; lastModified(id?: string | number): number; // timestamp lastSaved(id?: string | number): number; // timestamp diff --git a/kafka-node/index.d.ts b/kafka-node/index.d.ts index fb5834fcb5..212dc47d5d 100644 --- a/kafka-node/index.d.ts +++ b/kafka-node/index.d.ts @@ -16,7 +16,7 @@ export declare class Producer { constructor(client: Client); on(eventName: string, cb: () => any): void; on(eventName: string, cb: (error: any) => any): void; - send(payloads: Array, cb: (error: any, data: any) => any): void; + send(payloads: ProduceRequest[], cb: (error: any, data: any) => any): void; createTopics(topics: string[], async: boolean, cb?: (error: any, data: any) => any): void; } @@ -24,39 +24,39 @@ export declare class HighLevelProducer { constructor(client: Client); on(eventName: string, cb: () => any): void; on(eventName: string, cb: (error: any) => any): void; - send(payloads: Array, cb: (error: any, data: any) => any): void; + send(payloads: ProduceRequest[], cb: (error: any, data: any) => any): void; createTopics(topics: string[], async: boolean, cb?: (error: any, data: any) => any): void; } export declare class Consumer { - constructor(client: Client, fetchRequests: Array, options: ConsumerOptions); + constructor(client: Client, fetchRequests: OffsetFetchRequest[], options: ConsumerOptions); on(eventName: string, cb: (message: string) => any): void; on(eventName: string, cb: (error: any) => any): void; addTopics(topics: string[], cb: (error: any, added: boolean) => any): void; - addTopics(topics: Array, cb: (error: any, added: boolean) => any, fromOffset: boolean): void; + addTopics(topics: Topic[], cb: (error: any, added: boolean) => any, fromOffset: boolean): void; removeTopics(topics: string[], cb: (error: any, removed: boolean) => any): void; commit(cb: (error: any, data: any) => any): void; setOffset(topic: string, partition: number, offset: number): void; pause(): void; resume(): void; - pauseTopics(topics: any[] /* Array */): void; - resumeTopics(topics: any[] /* Array */): void; + pauseTopics(topics: any[] /* (string|Topic)[] */): void; + resumeTopics(topics: any[] /* (string|Topic)[] */): void; close(force: boolean, cb: () => any): void; } export declare class HighLevelConsumer { - constructor(client: Client, payloads: Array, options: ConsumerOptions); + constructor(client: Client, payloads: Topic[], options: ConsumerOptions); on(eventName: string, cb: (message: string) => any): void; on(eventName: string, cb: (error: any) => any): void; addTopics(topics: string[], cb: (error: any, added: boolean) => any): void; - addTopics(topics: Array, cb: (error: any, added: boolean) => any, fromOffset: boolean): void; + addTopics(topics: Topic[], cb: (error: any, added: boolean) => any, fromOffset: boolean): void; removeTopics(topics: string[], cb: (error: any, removed: boolean) => any): void; commit(cb: (error: any, data: any) => any): void; setOffset(topic: string, partition: number, offset: number): void; pause(): void; resume(): void; - pauseTopics(topics: any[] /* Array */): void; - resumeTopics(topics: any[] /* Array */): void; + pauseTopics(topics: any[] /* (string|Topic)[] */): void; + resumeTopics(topics: any[] /* (string|Topic)[] */): void; close(force: boolean, cb: () => any): void; } @@ -83,7 +83,7 @@ export interface ZKOptions { export interface ProduceRequest { topic: string; - messages: any; // string[] | Array | string | KeyedMessage + messages: any; // string[] | KeyedMessage[] | string | KeyedMessage partition?: number; attributes?: number; } diff --git a/klaw/index.d.ts b/klaw/index.d.ts index 29efce269e..172c6a5ba5 100644 --- a/klaw/index.d.ts +++ b/klaw/index.d.ts @@ -22,7 +22,7 @@ declare module "klaw" { interface Options extends ReadableOptions { queueMethod?: QueueMethod; - pathSorter?: (a: Array) => Array; + pathSorter?: (a: Item[]) => Item[]; fs?: any; // fs or mock-fs filter?: (a: Item) => boolean; } diff --git a/knex/index.d.ts b/knex/index.d.ts index cdd6785177..cc87be83ec 100644 --- a/knex/index.d.ts +++ b/knex/index.d.ts @@ -10,7 +10,7 @@ import * as events from "events"; type Callback = Function; type Client = Function; -type Value = string | number | boolean | Date | string[] | number[] | Array | boolean[] | Buffer | Knex.Raw; +type Value = string | number | boolean | Date | string[] | number[] | Date[] | boolean[] | Buffer | Knex.Raw; type ColumnName = string | Knex.Raw | Knex.QueryBuilder; type TableName = string | Knex.Raw | Knex.QueryBuilder; diff --git a/knockout/index.d.ts b/knockout/index.d.ts index e8f8ea4de1..cf96cd0f0d 100644 --- a/knockout/index.d.ts +++ b/knockout/index.d.ts @@ -276,7 +276,7 @@ interface KnockoutUtils { arrayRemoveItem(array: any[], itemToRemove: any): void; - compareArrays(a: T[], b: T[]): Array>; + compareArrays(a: T[], b: T[]): KnockoutArrayChange[]; extend(target: Object, source: Object): Object; diff --git a/ko.plus/index.d.ts b/ko.plus/index.d.ts index 23ea740219..49d7b88096 100644 --- a/ko.plus/index.d.ts +++ b/ko.plus/index.d.ts @@ -124,7 +124,7 @@ declare namespace KoPlus { } export interface EditableArrayStatic extends KnockoutObservableArrayStatic { - (value?: Array): EditableArray; + (value?: T[]): EditableArray; makeEditable(target: any): void; //> } diff --git a/koa-router/index.d.ts b/koa-router/index.d.ts index 2616eace1f..8ae1814e74 100644 --- a/koa-router/index.d.ts +++ b/koa-router/index.d.ts @@ -81,7 +81,7 @@ declare class Layer { path: string; constructor(path: string | RegExp, methods: string[], middleware: Router.IMiddleware, opts?: Layer.ILayerOptions); - constructor(path: string | RegExp, methods: string[], middleware: Array, opts?: Layer.ILayerOptions); + constructor(path: string | RegExp, methods: string[], middleware: Router.IMiddleware[], opts?: Layer.ILayerOptions); /** * Returns whether request `path` matches route. @@ -118,7 +118,7 @@ declare class Router { params: Object; - stack: Array; + stack: Layer[]; /** * Create a new router. @@ -132,62 +132,62 @@ declare class Router { * sequentially, requests start at the first middleware and work their way * "down" the middleware stack. */ - use(...middleware: Array): Router; - use(path: string | RegExp, ...middleware: Array): Router; + use(...middleware: Router.IMiddleware[]): Router; + use(path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; /** * HTTP get method */ - get(name: string, path: string | RegExp, ...middleware: Array): Router; - get(path: string | RegExp, ...middleware: Array): Router; + get(name: string, path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; + get(path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; /** * HTTP post method */ - post(name: string, path: string | RegExp, ...middleware: Array): Router; - post(path: string | RegExp, ...middleware: Array): Router; + post(name: string, path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; + post(path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; /** * HTTP put method */ - put(name: string, path: string | RegExp, ...middleware: Array): Router; - put(path: string | RegExp, ...middleware: Array): Router; + put(name: string, path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; + put(path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; /** * HTTP delete method */ - delete(name: string, path: string | RegExp, ...middleware: Array): Router; - delete(path: string | RegExp, ...middleware: Array): Router; + delete(name: string, path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; + delete(path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; /** * Alias for `router.delete()` because delete is a reserved word */ - del(name: string, path: string | RegExp, ...middleware: Array): Router; - del(path: string | RegExp, ...middleware: Array): Router; + del(name: string, path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; + del(path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; /** * HTTP head method */ - head(name: string, path: string | RegExp, ...middleware: Array): Router; - head(path: string | RegExp, ...middleware: Array): Router; + head(name: string, path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; + head(path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; /** * HTTP options method */ - options(name: string, path: string | RegExp, ...middleware: Array): Router; - options(path: string | RegExp, ...middleware: Array): Router; + options(name: string, path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; + options(path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; /** * HTTP path method */ - patch(name: string, path: string | RegExp, ...middleware: Array): Router; - patch(path: string | RegExp, ...middleware: Array): Router; + patch(name: string, path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; + patch(path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; /** * Register route with all methods. */ - all(name: string, path: string | RegExp, ...middleware: Array): Router; - all(path: string | RegExp, ...middleware: Array): Router; + all(name: string, path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; + all(path: string | RegExp, ...middleware: Router.IMiddleware[]): Router; /** * Set the path prefix for a Router instance that was already initialized. diff --git a/ldclient-js/index.d.ts b/ldclient-js/index.d.ts index 47792db29a..728b659556 100644 --- a/ldclient-js/index.d.ts +++ b/ldclient-js/index.d.ts @@ -132,7 +132,7 @@ declare namespace LaunchDarkly { * Any additional attributes associated with the user. */ custom?: { - [key: string]: string | boolean | number | Array, + [key: string]: string | boolean | number | (string | boolean | number)[], }; } diff --git a/leaflet/index.d.ts b/leaflet/index.d.ts index ebba37af80..2015f85ccb 100644 --- a/leaflet/index.d.ts +++ b/leaflet/index.d.ts @@ -159,7 +159,7 @@ declare namespace L { isValid(): boolean; } - export type LatLngBoundsLiteral = Array; + export type LatLngBoundsLiteral = LatLngTuple[]; type LatLngBoundsExpression = LatLngBounds | LatLngBoundsLiteral; @@ -205,7 +205,7 @@ declare namespace L { export function point(coords: {x: number, y: number}): Point; - export type BoundsLiteral = Array; + export type BoundsLiteral = PointTuple[]; export interface Bounds { extend(point: Point): this; @@ -233,7 +233,7 @@ declare namespace L { export function bounds(topLeft: PointTuple, bottomRight: PointTuple): Bounds; - export function bounds(points: Array): Bounds; + export function bounds(points: Point[]): Bounds; export function bounds(points: BoundsLiteral): Bounds; @@ -563,52 +563,52 @@ declare namespace L { } interface InternalPolyline extends Path { - getLatLngs(): Array; - setLatLngs(latlngs: Array): this; - setLatLngs(latlngs: Array): this; - setLatLngs(latlngs: Array): this; + getLatLngs(): LatLng[]; + setLatLngs(latlngs: LatLng[]): this; + setLatLngs(latlngs: LatLngLiteral[]): this; + setLatLngs(latlngs: LatLngTuple[]): this; isEmpty(): boolean; getCenter(): LatLng; getBounds(): LatLngBounds; addLatLng(latlng: LatLng): this; addLatLng(latlng: LatLngLiteral): this; addLatLng(latlng: LatLngTuple): this; - addLatLng(latlng: Array): this; // these three overloads aren't explicitly noted in the docs - addLatLng(latlng: Array): this; - addLatLng(latlng: Array): this; + addLatLng(latlng: LatLng[]): this; // these three overloads aren't explicitly noted in the docs + addLatLng(latlng: LatLngLiteral[]): this; + addLatLng(latlng: LatLngTuple[]): this; } export interface Polyline extends InternalPolyline { toGeoJSON(): GeoJSON.LineString | GeoJSON.MultiLineString; } - export function polyline(latlngs: Array, options?: PolylineOptions): Polyline; + export function polyline(latlngs: LatLng[], options?: PolylineOptions): Polyline; - export function polyline(latlngs: Array, options?: PolylineOptions): Polyline; + export function polyline(latlngs: LatLngLiteral[], options?: PolylineOptions): Polyline; - export function polyline(latlngs: Array, options?: PolylineOptions): Polyline; + export function polyline(latlngs: LatLngTuple[], options?: PolylineOptions): Polyline; - export function polyline(latlngs: Array>, options?: PolylineOptions): Polyline; + export function polyline(latlngs: LatLng[][], options?: PolylineOptions): Polyline; - export function polyline(latlngs: Array>, options?: PolylineOptions): Polyline; + export function polyline(latlngs: LatLngLiteral[][], options?: PolylineOptions): Polyline; - export function polyline(latlngs: Array>, options?: PolylineOptions): Polyline; + export function polyline(latlngs: LatLngTuple[][], options?: PolylineOptions): Polyline; export interface Polygon extends InternalPolyline { toGeoJSON(): GeoJSON.Polygon | GeoJSON.MultiPolygon; } - export function polygon(latlngs: Array, options?: PolylineOptions): Polygon; + export function polygon(latlngs: LatLng[], options?: PolylineOptions): Polygon; - export function polygon(latlngs: Array, options?: PolylineOptions): Polygon; + export function polygon(latlngs: LatLngLiteral[], options?: PolylineOptions): Polygon; - export function polygon(latlngs: Array, options?: PolylineOptions): Polygon; + export function polygon(latlngs: LatLngTuple[], options?: PolylineOptions): Polygon; - export function polygon(latlngs: Array>, options?: PolylineOptions): Polygon; + export function polygon(latlngs: LatLng[][], options?: PolylineOptions): Polygon; - export function polygon(latlngs: Array>, options?: PolylineOptions): Polygon; + export function polygon(latlngs: LatLngLiteral[][], options?: PolylineOptions): Polygon; - export function polygon(latlngs: Array>, options?: PolylineOptions): Polygon; + export function polygon(latlngs: LatLngTuple[][], options?: PolylineOptions): Polygon; export interface Rectangle extends Polygon { setBounds(latLngBounds: LatLngBounds): this; @@ -672,9 +672,9 @@ declare namespace L { export namespace SVG { export function create(name: string): SVGElement; - export function pointsToPath(rings: Array, close: boolean): string; + export function pointsToPath(rings: Point[], close: boolean): string; - export function pointsToPath(rings: Array, close: boolean): string; + export function pointsToPath(rings: PointTuple[], close: boolean): string; } export function svg(options?: RendererOptions): SVG; @@ -739,7 +739,7 @@ declare namespace L { /** * Returns an array of all the layers added to the group. */ - getLayers(): Array; + getLayers(): Layer[]; /** * Calls setZIndex on every layer contained in this group, passing the z-index. @@ -755,7 +755,7 @@ declare namespace L { /** * Create a layer group, optionally given an initial set of layers. */ - export function layerGroup(layers: Array): LayerGroup; + export function layerGroup(layers: Layer[]): LayerGroup; /** * Extended LayerGroup that also has mouse events (propagated from @@ -787,7 +787,7 @@ declare namespace L { /** * Create a feature group, optionally given an initial set of layers. */ - export function featureGroup(layers?: Array): FeatureGroup; + export function featureGroup(layers?: Layer[]): FeatureGroup; type StyleFunction = (feature: GeoJSON.Feature) => PathOptions; @@ -906,7 +906,7 @@ declare namespace L { * appended to the end of the array to close the feature, only used when levelsDeep is 0. * False by default. */ - latLngsToCoords(latlngs: Array, levelsDeep?: number, closed?: boolean): [number, number] | [number, number, number]; + latLngsToCoords(latlngs: LatLng[], levelsDeep?: number, closed?: boolean): [number, number] | [number, number, number]; /** * Normalize GeoJSON geometries/features into GeoJSON features. @@ -949,7 +949,7 @@ declare namespace L { zoom?: number; minZoom?: number; maxZoom?: number; - layers?: Array; + layers?: Layer[]; maxBounds?: LatLngBoundsExpression; renderer?: Renderer; diff --git a/lockr/index.d.ts b/lockr/index.d.ts index 97014879d0..5ac3bf16b4 100644 --- a/lockr/index.d.ts +++ b/lockr/index.d.ts @@ -25,7 +25,7 @@ declare namespace lockr { * @param key * @param value */ - set(key: string, value: Array): void; + set(key: string, value: T[]): void; /** * Removes all data associated to a key. @@ -53,7 +53,7 @@ declare namespace lockr { * @param key * @param value */ - sadd(key: string, value: Array): void; + sadd(key: string, value: T[]): void; /** * Returns the values of a particular set under a hash key. @@ -65,7 +65,7 @@ declare namespace lockr { * Returns the values of a particular set under a hash key. * @param key */ - smembers(key: string): Array; + smembers(key: string): T[]; /** * Returns whether the value exists in a particular set under a hash key. @@ -79,7 +79,7 @@ declare namespace lockr { * @param key * @param value */ - sismember(key: string, value: Array): boolean; + sismember(key: string, value: T[]): boolean; /** * Removes a value from a particular set under a hash key. @@ -93,7 +93,7 @@ declare namespace lockr { * @param key * @param value */ - srem(key: string, value: Array): void; + srem(key: string, value: T[]): void; /** * Returns all saved values & objects, in an Array. diff --git a/lodash/index.d.ts b/lodash/index.d.ts index cb19d57f3c..11930d5d27 100644 --- a/lodash/index.d.ts +++ b/lodash/index.d.ts @@ -280,7 +280,7 @@ declare namespace _ { (value: string): LoDashImplicitStringWrapper; (value: boolean): LoDashImplicitWrapper; (value: number[]): LoDashImplicitNumberArrayWrapper; - (value: Array): LoDashImplicitArrayWrapper; + (value: T[]): LoDashImplicitArrayWrapper; (value: T): LoDashImplicitObjectWrapper; (value: any): LoDashImplicitWrapper; @@ -532,7 +532,7 @@ declare namespace _ { */ difference( array: T[]|List, - ...values: Array> + ...values: (T[]|List)[] ): T[]; } @@ -5941,24 +5941,24 @@ declare namespace _ { * @param items * @return Returns the new concatenated array. */ - concat(...items: Array>): LoDashImplicitArrayWrapper; + concat(...items: (TItem|TItem[])[]): LoDashImplicitArrayWrapper; /** * @see _.concat */ - concat(...items: Array>): LoDashImplicitArrayWrapper; + concat(...items: (T|T[])[]): LoDashImplicitArrayWrapper; } interface LoDashExplicitWrapperBase { /** * @see _.concat */ - concat(...items: Array>): LoDashExplicitArrayWrapper; + concat(...items: (TItem|TItem[])[]): LoDashExplicitArrayWrapper; /** * @see _.concat */ - concat(...items: Array>): LoDashExplicitArrayWrapper; + concat(...items: (T|T[])[]): LoDashExplicitArrayWrapper; } //_.prototype.plant @@ -8551,7 +8551,7 @@ declare namespace _ { * @return Returns the accumulated value. **/ reduce( - collection: Array, + collection: T[], callback: MemoIterator, accumulator: TResult): TResult; @@ -8583,7 +8583,7 @@ declare namespace _ { * @see _.reduce **/ reduce( - collection: Array, + collection: T[], callback: MemoIterator): TResult; /** @@ -8681,7 +8681,7 @@ declare namespace _ { * @return The accumulated value. **/ reduceRight( - collection: Array, + collection: T[], callback: MemoIterator, accumulator: TResult): TResult; @@ -8705,7 +8705,7 @@ declare namespace _ { * @see _.reduceRight **/ reduceRight( - collection: Array, + collection: T[], callback: MemoIterator): TResult; /** @@ -9393,14 +9393,14 @@ declare namespace _ { * @see _.sortBy */ sortBy( - collection: (Array|List), + collection: (T[]|List), iteratees: (ListIterator|string|Object)[]): T[]; /** * @see _.sortBy */ sortBy( - collection: (Array|List), + collection: (T[]|List), ...iteratees: (ListIterator|Object|string)[]): T[]; } @@ -18271,7 +18271,7 @@ declare namespace _ { * Checks `value` to determine whether a default value should be returned in * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, * or `undefined`. - * + * * @param value The value to check. * @param defaultValue The default value. * @returns Returns the resolved value. diff --git a/lodash/lodash-3.10.d.ts b/lodash/lodash-3.10.d.ts index aa423acfd9..75d48eb278 100644 --- a/lodash/lodash-3.10.d.ts +++ b/lodash/lodash-3.10.d.ts @@ -42,7 +42,7 @@ declare namespace _ { (value: string): LoDashImplicitStringWrapper; (value: boolean): LoDashImplicitWrapper; (value: number[]): LoDashImplicitNumberArrayWrapper; - (value: Array): LoDashImplicitArrayWrapper; + (value: T[]): LoDashImplicitArrayWrapper; (value: T): LoDashImplicitObjectWrapper; (value: any): LoDashImplicitWrapper; @@ -4341,24 +4341,24 @@ declare namespace _ { * @param items * @return Returns the new concatenated array. */ - concat(...items: Array>): LoDashImplicitArrayWrapper; + concat(...items: (TItem|TItem[])[]): LoDashImplicitArrayWrapper; /** * @see _.concat */ - concat(...items: Array>): LoDashImplicitArrayWrapper; + concat(...items: (T|T[])[]): LoDashImplicitArrayWrapper; } interface LoDashExplicitWrapperBase { /** * @see _.concat */ - concat(...items: Array>): LoDashExplicitArrayWrapper; + concat(...items: (TItem|TItem[])[]): LoDashExplicitArrayWrapper; /** * @see _.concat */ - concat(...items: Array>): LoDashExplicitArrayWrapper; + concat(...items: (T|T[])[]): LoDashExplicitArrayWrapper; } //_.prototype.plant @@ -6023,7 +6023,7 @@ declare namespace _ { * @see _.find **/ findWhere( - collection: Array, + collection: T[], callback: ListIterator, thisArg?: any): T | undefined; @@ -6048,7 +6048,7 @@ declare namespace _ { * @param _.matches style callback **/ findWhere( - collection: Array, + collection: T[], whereValue: W): T | undefined; /** @@ -6072,7 +6072,7 @@ declare namespace _ { * @param _.property style callback **/ findWhere( - collection: Array, + collection: T[], pluckValue: string): T | undefined; /** @@ -6103,7 +6103,7 @@ declare namespace _ { * @return The found element, else undefined. **/ findLast( - collection: Array, + collection: T[], callback: ListIterator, thisArg?: any): T | undefined; @@ -6128,7 +6128,7 @@ declare namespace _ { * @param _.pluck style callback **/ findLast( - collection: Array, + collection: T[], whereValue: W): T | undefined; /** @@ -6152,7 +6152,7 @@ declare namespace _ { * @param _.where style callback **/ findLast( - collection: Array, + collection: T[], pluckValue: string): T | undefined; /** @@ -7071,7 +7071,7 @@ declare namespace _ { * @param args Arguments to invoke the method with. **/ invoke( - collection: Array, + collection: T[], methodName: string, ...args: any[]): any; @@ -7095,7 +7095,7 @@ declare namespace _ { * @see _.invoke **/ invoke( - collection: Array, + collection: T[], method: Function, ...args: any[]): any; @@ -7488,7 +7488,7 @@ declare namespace _ { * @return Returns the accumulated value. **/ reduce( - collection: Array, + collection: T[], callback: MemoIterator, accumulator: TResult, thisArg?: any): TResult; @@ -7515,7 +7515,7 @@ declare namespace _ { * @see _.reduce **/ reduce( - collection: Array, + collection: T[], callback: MemoIterator, thisArg?: any): TResult; @@ -7539,7 +7539,7 @@ declare namespace _ { * @see _.reduce **/ inject( - collection: Array, + collection: T[], callback: MemoIterator, accumulator: TResult, thisArg?: any): TResult; @@ -7566,7 +7566,7 @@ declare namespace _ { * @see _.reduce **/ inject( - collection: Array, + collection: T[], callback: MemoIterator, thisArg?: any): TResult; @@ -7590,7 +7590,7 @@ declare namespace _ { * @see _.reduce **/ foldl( - collection: Array, + collection: T[], callback: MemoIterator, accumulator: TResult, thisArg?: any): TResult; @@ -7617,7 +7617,7 @@ declare namespace _ { * @see _.reduce **/ foldl( - collection: Array, + collection: T[], callback: MemoIterator, thisArg?: any): TResult; @@ -7791,7 +7791,7 @@ declare namespace _ { * @return The accumulated value. **/ reduceRight( - collection: Array, + collection: T[], callback: MemoIterator, accumulator: TResult, thisArg?: any): TResult; @@ -7818,7 +7818,7 @@ declare namespace _ { * @see _.reduceRight **/ reduceRight( - collection: Array, + collection: T[], callback: MemoIterator, thisArg?: any): TResult; @@ -7842,7 +7842,7 @@ declare namespace _ { * @see _.reduceRight **/ foldr( - collection: Array, + collection: T[], callback: MemoIterator, accumulator: TResult, thisArg?: any): TResult; @@ -7869,7 +7869,7 @@ declare namespace _ { * @see _.reduceRight **/ foldr( - collection: Array, + collection: T[], callback: MemoIterator, thisArg?: any): TResult; @@ -8847,7 +8847,7 @@ declare namespace _ { * @return A new array of sorted elements. **/ sortByAll( - collection: Array, + collection: T[], iteratees: (ListIterator|string|Object)[]): T[]; /** @@ -8861,7 +8861,7 @@ declare namespace _ { * @see _.sortByAll **/ sortByAll( - collection: Array, + collection: T[], ...iteratees: (ListIterator|string|Object)[]): T[]; /** @@ -8876,7 +8876,7 @@ declare namespace _ { * @param args The rules by which to sort */ sortByAll( - collection: (Array|List), + collection: (T[]|List), ...args: (ListIterator|Object|string)[] ): T[]; } @@ -9121,7 +9121,7 @@ declare namespace _ { * @return A new array of elements that have the given properties. **/ where( - list: Array, + list: T[], properties: U): T[]; /** diff --git a/log4javascript/index.d.ts b/log4javascript/index.d.ts index 22ff616004..2d1f5cf9ce 100644 --- a/log4javascript/index.d.ts +++ b/log4javascript/index.d.ts @@ -469,7 +469,7 @@ declare namespace log4javascript { * Returns an array of the additional headers that are sent with each HTTP request. Each array item is an object with * properties name and value. */ - getHeaders(): Array<{ name: string; value: string; }>; + getHeaders(): { name: string; value: string; }[]; /** * Sends all log messages in the queue. If log messages are batched then only completed batches are sent. diff --git a/maquette/index.d.ts b/maquette/index.d.ts index 3ddf4beb0f..3c5fdef499 100644 --- a/maquette/index.d.ts +++ b/maquette/index.d.ts @@ -109,7 +109,7 @@ declare namespace maquette { } // The following line is not possible in Typescript, hence the workaround in the two lines below - // export type VNodeChild = string|VNode|Array + // export type VNodeChild = string|VNode|VNodeChild[] export interface VNodeChildren extends Array {} // A bit of a hack to create a recursive type export type VNodeChild = string|VNode|VNodeChildren; @@ -151,21 +151,21 @@ declare namespace maquette { * * @param {string} selector - Contains the tagName, id and fixed css classnames in CSS selector format. It is formatted as follows: `tagname.cssclass1.cssclass2#id`. * @param {Object} properties - An object literal containing attributes, properties, event handlers and more be placed on the DOM node. - * @param {Array} children - An array of virtual DOM nodes and strings to add as child nodes. May contain nested arrays, null or undefined. + * @param {VNodeChild[]} children - An array of virtual DOM nodes and strings to add as child nodes. May contain nested arrays, null or undefined. * * @returns {VNode} A VNode object, used to render a real DOM later. */ - export function h(selector: string, properties: VNodeProperties, children: Array): VNode; + export function h(selector: string, properties: VNodeProperties, children: VNodeChild[]): VNode; /** * Creates a virtual DOM node, used to render a real DOM later. * The `h` stands for (virtual) hyperscript. * * @param {string} selector - Contains the tagName, id and fixed css classnames in CSS selector format. It is formatted as follows: `tagname.cssclass1.cssclass2#id`. - * @param {Array} children - An array of virtual DOM nodes and strings to add as child nodes. May contain nested arrays, null or undefined. + * @param {VNodeChild[]} children - An array of virtual DOM nodes and strings to add as child nodes. May contain nested arrays, null or undefined. * * @returns {VNode} A VNode object, used to render a real DOM later. */ - export function h(selector: string, children: Array): VNode; + export function h(selector: string, children: VNodeChild[]): VNode; /** * Creates a virtual DOM node, used to render a real DOM later. * The `h` stands for (virtual) hyperscript. @@ -193,7 +193,7 @@ declare namespace maquette { export interface VNode { vnodeSelector: string; properties: VNodeProperties; - children: Array; + children: VNode[]; } // Not used anywhere in the maquette sourcecode, but it is a widely used pattern. @@ -235,12 +235,12 @@ declare namespace maquette { * The array of results. These results will be synchronized with the latest array of sources that were provided using {@link Mapping#map}. * @type {Object[]} */ - results: Array; + results: Target[]; /** * Maps a new array of sources and updates {@link Mapping#results}. * @param {Object[]} newSources - The new array of sources. */ - map(newSources: Array): void; + map(newSources: Source[]): void; } /** diff --git a/material-design-lite/index.d.ts b/material-design-lite/index.d.ts index 226f9bbdbb..b7525b1878 100644 --- a/material-design-lite/index.d.ts +++ b/material-design-lite/index.d.ts @@ -57,7 +57,7 @@ declare namespace MaterialDesignLite { * @param {!Array} elements * The elements we wish to upgrade. */ - upgradeElements(elements: Array): void; + upgradeElements(elements: HTMLElement[]): void; /** * Upgrades a specific list of elements rather than all in the DOM. * @@ -109,7 +109,7 @@ declare namespace MaterialDesignLite { * * @param {!Array} nodes The list of nodes. */ - downgradeElements(nodes: Array): void; + downgradeElements(nodes: Node[]): void; /** * Downgrade either a given node, an array of nodes, or a NodeList. * diff --git a/material-ui/index.d.ts b/material-ui/index.d.ts index 637078759b..2d3fcf1741 100644 --- a/material-ui/index.d.ts +++ b/material-ui/index.d.ts @@ -922,7 +922,7 @@ declare namespace __MaterialUI { text: string; } interface DialogProps extends React.DOMAttributes<{}>, React.Props { - actions?: Array>; + actions?: (DialogAction | React.ReactElement)[]; /** @deprecated use a custom `actions` property instead */ actionFocus?: string; actionsContainerClassName?: string; diff --git a/material-ui/legacy/material-ui-0.11.1.d.ts b/material-ui/legacy/material-ui-0.11.1.d.ts index 998c5f0303..903b610b3a 100644 --- a/material-ui/legacy/material-ui-0.11.1.d.ts +++ b/material-ui/legacy/material-ui-0.11.1.d.ts @@ -357,7 +357,7 @@ declare namespace __MaterialUI { onClick?: React.MouseEventHandler; } interface DialogProps extends React.Props { - actions?: Array>; + actions?: (DialogAction | React.ReactElement)[]; actionFocus?: string; autoDetectWindowHeight?: boolean; autoScrollBodyContent?: boolean; diff --git a/material-ui/legacy/material-ui-0.12.1.d.ts b/material-ui/legacy/material-ui-0.12.1.d.ts index 445aa75c7c..7314ecd015 100644 --- a/material-ui/legacy/material-ui-0.12.1.d.ts +++ b/material-ui/legacy/material-ui-0.12.1.d.ts @@ -347,7 +347,7 @@ declare namespace __MaterialUI { onClick?: React.MouseEventHandler; } interface DialogProps extends React.Props { - actions?: Array>; + actions?: (DialogAction | React.ReactElement)[]; actionFocus?: string; autoDetectWindowHeight?: boolean; autoScrollBodyContent?: boolean; diff --git a/material-ui/legacy/material-ui-0.13.4.d.ts b/material-ui/legacy/material-ui-0.13.4.d.ts index 5ed021d815..73d0833ec1 100644 --- a/material-ui/legacy/material-ui-0.13.4.d.ts +++ b/material-ui/legacy/material-ui-0.13.4.d.ts @@ -368,7 +368,7 @@ declare namespace __MaterialUI { onClick?: React.MouseEventHandler; } interface DialogProps extends React.Props { - actions?: Array>; + actions?: (DialogAction | React.ReactElement)[]; actionFocus?: string; autoDetectWindowHeight?: boolean; autoScrollBodyContent?: boolean; diff --git a/material-ui/legacy/material-ui-0.14.4.d.ts b/material-ui/legacy/material-ui-0.14.4.d.ts index 4b6043d4e5..9057e4174f 100644 --- a/material-ui/legacy/material-ui-0.14.4.d.ts +++ b/material-ui/legacy/material-ui-0.14.4.d.ts @@ -846,7 +846,7 @@ declare namespace __MaterialUI { interface DialogProps extends React.DOMAttributes, React.Props { /** @deprecated use a custom `actions` property instead */ actionFocus?: string; - actions?: Array>; + actions?: (DialogAction | React.ReactElement)[]; actionsContainerClassName?: string; actionsContainerStyle?: React.CSSProperties; autoDetectWindowHeight?: boolean; diff --git a/matter-js/index.d.ts b/matter-js/index.d.ts index 3f9fc777aa..94858525a8 100644 --- a/matter-js/index.d.ts +++ b/matter-js/index.d.ts @@ -20,14 +20,14 @@ declare namespace Matter { * @param {vertices} vertices * @return {axes} A new axes from the given vertices */ - static fromVertices(vertices: Array): Array; + static fromVertices(vertices: Vector[]): Vector[]; /** * Rotates a set of axes by the given angle. * @method rotate * @param {axes} axes * @param {number} angle */ - static rotate(axes: Array, angle: number): void; + static rotate(axes: Vector[], angle: number): void; } interface IChamfer { @@ -126,7 +126,7 @@ declare namespace Matter { * @param {number} [minimumArea=10] * @return {body} */ - static fromVertices(x: number, y: number, vertexSets: Array>, options?: IBodyDefinition, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): Body; + static fromVertices(x: number, y: number, vertexSets: Vector[][], options?: IBodyDefinition, flagInternal?: boolean, removeCollinear?: number, minimumArea?: number): Body; } export interface IBodyDefinition { @@ -173,7 +173,7 @@ declare namespace Matter { * @property axes * @type vector[] */ - axes?: Array; + axes?: Vector[]; /** * A `Bounds` object that defines the AABB region for the body. * It is automatically calculated from the given convex hull (`vertices` array) in `Body.create` and constantly updated by `Body.update` during simulation. @@ -416,7 +416,7 @@ declare namespace Matter { * @property vertices * @type vector[] */ - vertices?: Array; + vertices?: Vector[]; /** * An array of bodies that make up this body. * The first body in the array must always be a self reference to the current body instance. @@ -428,7 +428,7 @@ declare namespace Matter { * @property parts * @type body[] */ - parts?: Array; + parts?: Body[]; /** * A self reference if the body is _not_ a part of another body. * Otherwise this is a reference to the body that this is a part of. @@ -644,7 +644,7 @@ declare namespace Matter { * @param {body} body * @param {vector[]} vertices */ - static setVertices(body: Body, vertices: Array): void; + static setVertices(body: Body, vertices: Vector[]): void; /** * Sets the parts of the `body` and updates mass, inertia and centroid. * Each part will have its parent set to `body`. @@ -766,7 +766,7 @@ declare namespace Matter { * @property axes * @type vector[] */ - axes: Array; + axes: Vector[]; /** * A `Bounds` object that defines the AABB region for the body. * It is automatically calculated from the given convex hull (`vertices` array) in `Body.create` and constantly updated by `Body.update` during simulation. @@ -1001,7 +1001,7 @@ declare namespace Matter { * @property vertices * @type vector[] */ - vertices: Array; + vertices: Vector[]; /** * An array of bodies that make up this body. * The first body in the array must always be a self reference to the current body instance. @@ -1013,7 +1013,7 @@ declare namespace Matter { * @property parts * @type body[] */ - parts: Array; + parts: Body[]; /** * A self reference if the body is _not_ a part of another body. * Otherwise this is a reference to the body that this is a part of. @@ -1131,7 +1131,7 @@ declare namespace Matter { * @type body[] * @default [] */ - bodies?: Array; + bodies?: Body[]; /** * An array of `Composite` that are _direct_ children of this composite. @@ -1142,7 +1142,7 @@ declare namespace Matter { * @type composite[] * @default [] */ - composites?: Array; + composites?: Composite[]; /** * An array of `Constraint` that are _direct_ children of this composite. @@ -1153,7 +1153,7 @@ declare namespace Matter { * @type constraint[] * @default [] */ - constraints?: Array; + constraints?: Constraint[]; /** * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`. @@ -1229,7 +1229,7 @@ declare namespace Matter { * @param {composite} composite * @return {body[]} All the bodies */ - static allBodies(composite: Composite): Array; + static allBodies(composite: Composite): Body[]; /** * Returns all composites in the given composite, including all composites in its children, recursively. @@ -1237,7 +1237,7 @@ declare namespace Matter { * @param {composite} composite * @return {composite[]} All the composites */ - static allComposites(composite: Composite): Array; + static allComposites(composite: Composite): Composite[]; /** * Returns all constraints in the given composite, including all constraints in its children, recursively. @@ -1245,7 +1245,7 @@ declare namespace Matter { * @param {composite} composite * @return {constraint[]} All the constraints */ - static allConstraints(composite: Composite): Array; + static allConstraints(composite: Composite): Composite[]; /** * Removes all bodies, constraints and composites from the given composite. @@ -1284,7 +1284,7 @@ declare namespace Matter { * @param {compositeB} compositeB * @return {composite} Returns compositeA */ - static move(compositeA: Composite, objects: Array, compositeB: Composite): Composite; + static move(compositeA: Composite, objects: (Body | Composite | Constraint)[], compositeB: Composite): Composite; /** * Assigns new ids for all objects in the composite, recursively. @@ -1358,7 +1358,7 @@ declare namespace Matter { * @type body[] * @default [] */ - bodies: Array; + bodies: Body[]; /** * An array of `Composite` that are _direct_ children of this composite. @@ -1369,7 +1369,7 @@ declare namespace Matter { * @type composite[] * @default [] */ - composites: Array; + composites: Composite[]; /** * An array of `Constraint` that are _direct_ children of this composite. @@ -1380,7 +1380,7 @@ declare namespace Matter { * @type constraint[] * @default [] */ - constraints: Array; + constraints: Constraint[]; /** * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`. @@ -2052,7 +2052,7 @@ declare namespace Matter { * @param {engine} engine * @param {boolean} forceUpdate */ - static update(grid: Grid, bodies: Array, engine: Engine, forceUpdate: boolean): void; + static update(grid: Grid, bodies: Body[], engine: Engine, forceUpdate: boolean): void; /** * Clears the grid. @@ -2227,7 +2227,7 @@ declare namespace Matter { * @param {number} [rayWidth] * @return {object[]} Collisions */ - static ray(bodies: Array, startPoint: Vector, endPoint: Vector, rayWidth?: number): any[]; + static ray(bodies: Body[], startPoint: Vector, endPoint: Vector, rayWidth?: number): any[]; /** * Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies. @@ -2237,7 +2237,7 @@ declare namespace Matter { * @param {bool} [outside=false] * @return {body[]} The bodies matching the query */ - static region(bodies: Array, bounds: Bounds, outside?: boolean): Array; + static region(bodies: Body[], bounds: Bounds, outside?: boolean): Body[]; /** * Returns all bodies whose vertices contain the given point, from the given set of bodies. @@ -2246,7 +2246,7 @@ declare namespace Matter { * @param {vector} point * @return {body[]} The bodies matching the query */ - static point(bodies: Array, point: Vector): Array; + static point(bodies: Body[], point: Vector): Body[]; } export interface IRenderDefinition { @@ -2351,7 +2351,7 @@ declare namespace Matter { /** * Render wireframes only * @type boolean - * @default true + * @default true */ wireframes?: boolean; } @@ -2603,7 +2603,7 @@ declare namespace Matter { * @param {Number} [sampleLength=15] * @return {Vector[]} points */ - static pathToVertices(path: SVGPathElement, sampleLength: number): Array; + static pathToVertices(path: SVGPathElement, sampleLength: number): Vector[]; } /** @@ -2791,7 +2791,7 @@ declare namespace Matter { * @param {vertices} vertices * @return {vector} The average point */ - static mean(vertices: Array): Array; + static mean(vertices: Vector[]): Vector[]; /** * Sorts the input vertices into clockwise order in place. @@ -2799,7 +2799,7 @@ declare namespace Matter { * @param {vertices} vertices * @return {vertices} vertices */ - static clockwiseSort(vertices: Array): Array; + static clockwiseSort(vertices: Vector[]): Vector[]; /** * Returns true if the vertices form a convex shape (vertices must be in clockwise order). @@ -2807,7 +2807,7 @@ declare namespace Matter { * @param {vertices} vertices * @return {bool} `true` if the `vertices` are convex, `false` if not (or `null` if not computable). */ - static isConvex(vertices: Array): boolean; + static isConvex(vertices: Vector[]): boolean; /** * Returns the convex hull of the input vertices as a new array of points. @@ -2815,7 +2815,7 @@ declare namespace Matter { * @param {vertices} vertices * @return [vertex] vertices */ - static hull(vertices: Array): Array; + static hull(vertices: Vector[]): Vector[]; /** * Returns the area of the set of vertices. @@ -2824,7 +2824,7 @@ declare namespace Matter { * @param {bool} signed * @return {number} The area */ - static area(vertices: Array, signed: boolean): number; + static area(vertices: Vector[], signed: boolean): number; /** * Returns the centre (centroid) of the set of vertices. @@ -2832,7 +2832,7 @@ declare namespace Matter { * @param {vertices} vertices * @return {vector} The centre point */ - static centre(vertices: Array): Vector; + static centre(vertices: Vector[]): Vector; /** * Chamfers a set of vertices by giving them rounded corners, returns a new set of vertices. @@ -2844,7 +2844,7 @@ declare namespace Matter { * @param {number} qualityMin * @param {number} qualityMax */ - static chamfer(vertices: Array, radius: number | number[], quality: number, qualityMin: number, qualityMax: number): void; + static chamfer(vertices: Vector[], radius: number | number[], quality: number, qualityMin: number, qualityMax: number): void; /** @@ -2854,7 +2854,7 @@ declare namespace Matter { * @param {vector} point * @return {boolean} True if the vertices contains point, otherwise false */ - static contains(vertices: Array, point: Vector): boolean; + static contains(vertices: Vector[], point: Vector): boolean; /** * Creates a new set of `Matter.Body` compatible vertices. @@ -2871,7 +2871,7 @@ declare namespace Matter { * @param {vector[]} points * @param {body} body */ - static create(points: Array, body: Body): void; + static create(points: Vector[], body: Body): void; /** * Parses a string containing ordered x y pairs separated by spaces (and optionally commas), @@ -2882,7 +2882,7 @@ declare namespace Matter { * @param {body} body * @return {vertices} vertices */ - static fromPath(path: string, body: Body): Array; + static fromPath(path: string, body: Body): Vector[]; /** * Returns the moment of inertia (second moment of area) of the set of vertices given the total mass. @@ -2891,7 +2891,7 @@ declare namespace Matter { * @param {number} mass * @return {number} The polygon's moment of inertia */ - static inertia(vertices: Array, mass: number): number; + static inertia(vertices: Vector[], mass: number): number; /** * Rotates the set of vertices in-place. @@ -2900,7 +2900,7 @@ declare namespace Matter { * @param {number} angle * @param {vector} point */ - static rotate(vertices: Array, angle: number, point: Vector): void; + static rotate(vertices: Vector[], angle: number, point: Vector): void; /** * Scales the vertices from a point (default is centre) in-place. @@ -2910,7 +2910,7 @@ declare namespace Matter { * @param {number} scaleY * @param {vector} point */ - static scale(vertices: Array, scaleX: number, scaleY: number, point: Vector): void; + static scale(vertices: Vector[], scaleX: number, scaleY: number, point: Vector): void; /** * Translates the set of vertices in-place. @@ -2919,7 +2919,7 @@ declare namespace Matter { * @param {vector} vector * @param {number} scalar */ - static translate(vertices: Array, vector: Vector, scalar: number): void; + static translate(vertices: Vector[], vector: Vector, scalar: number): void; } interface IWorldDefinition extends ICompositeDefinition { @@ -3057,7 +3057,7 @@ declare namespace Matter { /** * The collision pair */ - pairs: Array; + pairs: IPair[]; } diff --git a/mdns/index.d.ts b/mdns/index.d.ts index 0c69b39a07..079321b61b 100644 --- a/mdns/index.d.ts +++ b/mdns/index.d.ts @@ -38,7 +38,7 @@ declare namespace MDNS { // --- Browser --- interface BrowserOptions { - resolverSequence?: Array<(service: Service, next: () => void) => boolean>; + resolverSequence?: ((service: Service, next: () => void) => boolean)[]; interfaceIndex?: number; networkInterface?: string; domain?: any; @@ -56,7 +56,7 @@ declare namespace MDNS { interface BrowserStatic { new(serviceType: ServiceType, options?: BrowserOptions): Browser; - defaultResolverSequence: Array<(service: Service, next: () => void) => boolean>; + defaultResolverSequence: ((service: Service, next: () => void) => boolean)[]; } // --- Services --- @@ -137,7 +137,7 @@ declare namespace MDNS { function createAdvertisement(serviceType: ServiceType, port: number, options?: AdvertisementOptions, callback?: (error: DnsSdError, service: Service) => void): Advertisement; - function resolve(service: Service, sequence?: Array<(service: Service, next: () => void) => boolean>, callback?: (error: DnsSdError, service: Service) => void): void; + function resolve(service: Service, sequence?: ((service: Service, next: () => void) => boolean)[], callback?: (error: DnsSdError, service: Service) => void): void; function browseThemAll(options: BrowserOptions): Browser; diff --git a/merge2/index.d.ts b/merge2/index.d.ts index 3e9c30b6c9..78170b3ac6 100644 --- a/merge2/index.d.ts +++ b/merge2/index.d.ts @@ -12,11 +12,11 @@ interface IOptions { } interface IMerge2Stream extends NodeJS.ReadWriteStream { - add(...args: Array>): IMerge2Stream; + add(...args: (NodeJS.ReadWriteStream | IMerge2Stream | (NodeJS.ReadWriteStream | IMerge2Stream | IOptions)[])[]): IMerge2Stream; } interface IMerge2 { - (...args: Array | IOptions>): IMerge2Stream; + (...args: (NodeJS.ReadWriteStream | IMerge2Stream | (NodeJS.ReadWriteStream | IMerge2Stream)[] | IOptions)[]): IMerge2Stream; } declare var _tmp: IMerge2; diff --git a/meteor/index.d.ts b/meteor/index.d.ts index 71c97ea354..6295d9a3d5 100644 --- a/meteor/index.d.ts +++ b/meteor/index.d.ts @@ -355,9 +355,9 @@ interface ITinytestAssertions { isNotUndefined(v: any, msg?: string): void; isNan(v: any, msg?: string): void; isNotNan(v: any, msg?: string): void; - include(s: Array|Object|string, value: any, msg?: string, not?: boolean): void; + include(s: T[]|Object|string, value: any, msg?: string, not?: boolean): void; - notInclude(s: Array|Object|string, value: any, msg?: string, not?: boolean): void; + notInclude(s: T[]|Object|string, value: any, msg?: string, not?: boolean): void; length(obj: ILengthAble, expected_length: number, msg?: string): void; _stringEqual(actual: string, expected: string, msg?: string): void; } @@ -674,9 +674,9 @@ declare namespace Mongo { } interface Cursor { count(): number; - fetch(): Array; + fetch(): T[]; forEach(callback: (doc: T, index: number, cursor: Mongo.Cursor) => void, thisArg?: any): void; - map(callback: (doc: T, index: number, cursor: Mongo.Cursor) => U, thisArg?: any): Array; + map(callback: (doc: T, index: number, cursor: Mongo.Cursor) => U, thisArg?: any): U[]; observe(callbacks: Object): Meteor.LiveQueryHandle; observeChanges(callbacks: Object): Meteor.LiveQueryHandle; } diff --git a/microsoft-sdk-soap/index.d.ts b/microsoft-sdk-soap/index.d.ts index b330b4fb90..7aed73f7aa 100644 --- a/microsoft-sdk-soap/index.d.ts +++ b/microsoft-sdk-soap/index.d.ts @@ -16,7 +16,7 @@ declare namespace Sdk { interface IEntityCollectionView { entityName: string; - entities: Array; + entities: IEntityView[]; minActiveRowVersion: string; moreRecords: boolean; pagingCookie: string; @@ -185,7 +185,7 @@ declare namespace Sdk { * @param type The function that specifies the type. * @param items An array of items to add to the collection. */ - constructor( type: T, items?: Array ); + constructor( type: T, items?: T[] ); /** * Gets the type defined for the collection. @@ -248,7 +248,7 @@ declare namespace Sdk { /** * Gets a copy of the array of items in the collection. */ - toArray(): Array; + toArray(): T[]; /** * Returns the number of items in the collection. @@ -1116,7 +1116,7 @@ declare namespace Sdk { /*** * */ - public getEntityMetadata(): Array; + public getEntityMetadata(): Mdq.IEntityMetadata[]; /*** * @@ -2297,7 +2297,7 @@ declare namespace Sdk.Mdq { * @param propertyNames: >An array of strings representing the metadata properties to retrieve. */ export class MetadataPropertiesExpression { - constructor( allProperties: boolean, propertyNames?: Array ); + constructor( allProperties: boolean, propertyNames?: (EntityMetadataProperties|AttributeMetadataProperties|RelationshipMetadataProperties|any)[] ); } export enum RelationshipMetadataProperties { diff --git a/mongodb/index.d.ts b/mongodb/index.d.ts index bddc8255e9..0204078820 100644 --- a/mongodb/index.d.ts +++ b/mongodb/index.d.ts @@ -105,7 +105,7 @@ export interface ServerOptions { ssl?: boolean; sslValidate?: Object; checkServerIdentity?: boolean | Function; - sslCA?: Array; + sslCA?: (Buffer | string)[]; sslCert?: Buffer | string; sslKey?: Buffer | string; sslPass?: Buffer | string; @@ -126,7 +126,7 @@ export interface ReplSetOptions { ssl?: boolean; sslValidate?: Object; checkServerIdentity?: boolean | Function; - sslCA?: Array; + sslCA?: (Buffer | string)[]; sslCert?: Buffer | string; sslKey?: Buffer | string; sslPass?: Buffer | string; @@ -142,7 +142,7 @@ export interface MongosOptions { ssl?: boolean; sslValidate?: Object; checkServerIdentity?: boolean | Function; - sslCA?: Array; + sslCA?: (Buffer | string)[]; sslCert?: Buffer | string; sslKey?: Buffer | string; sslPass?: Buffer | string; @@ -251,14 +251,14 @@ export class Server extends EventEmitter { // Deprecated http://mongodb.github.io/node-mongodb-native/2.1/api/ReplSet.html export class ReplSet extends EventEmitter { - constructor(servers: Array, options?: ReplSetOptions); + constructor(servers: Server[], options?: ReplSetOptions); connections(): any[]; } // Deprecated http://mongodb.github.io/node-mongodb-native/2.1/api/ReplSet.html export class Mongos extends EventEmitter { - constructor(servers: Array, options?: MongosOptions); + constructor(servers: Server[], options?: MongosOptions); connections(): any[]; } @@ -1036,7 +1036,7 @@ export interface FindOneOptions { export interface InsertWriteOpResult { insertedCount: number; ops: any[]; - insertedIds: Array; + insertedIds: ObjectID[]; connection: any; result: { ok: number, n: number }; } diff --git a/mongoose-paginate/index.d.ts b/mongoose-paginate/index.d.ts index 4ccb5645de..549fd36881 100644 --- a/mongoose-paginate/index.d.ts +++ b/mongoose-paginate/index.d.ts @@ -18,7 +18,7 @@ declare module 'mongoose' { } export interface PaginateResult { - docs: Array; + docs: T[]; total: number; limit: number; page?: number; diff --git a/msportalfx-test/index.d.ts b/msportalfx-test/index.d.ts index cd81d992d8..ebdb4a35cc 100644 --- a/msportalfx-test/index.d.ts +++ b/msportalfx-test/index.d.ts @@ -19,14 +19,14 @@ declare namespace MsPortalTestFx { } export class ContentLocator extends Locator { - locators: Array; + locators: Locator[]; constructor(innerLocators: Locator[]); findElements(context: any): any; toString(): string; } export class ChainedLocator extends Locator { - locators: Array; + locators: Locator[]; constructor(innerLocators: Locator[]); findElements(context: any): any; toString(): string; @@ -174,7 +174,7 @@ declare namespace MsPortalTestFx { } export class ResourceSummaryPart extends Part { - public properties: Array; + public properties: PartProperty[]; public resourceGroupProperty: PartProperty; public quickStartHotSpot: Controls.HotSpot; public accessHotSpot: Controls.HotSpot; diff --git a/ndarray/index.d.ts b/ndarray/index.d.ts index 52d86ff0c8..ef6f3175c2 100644 --- a/ndarray/index.d.ts +++ b/ndarray/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Giff Song // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -type Data = Array | Int8Array | Int16Array | Int32Array | +type Data = number[] | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Float32Array | Float64Array | Uint8ClampedArray; diff --git a/nedb/index.d.ts b/nedb/index.d.ts index b9e521cdaf..5e36690034 100644 --- a/nedb/index.d.ts +++ b/nedb/index.d.ts @@ -52,13 +52,13 @@ declare class NeDBDataStore { * Add one or several document(s) to all indexes */ addToIndexes(doc: T): void; - addToIndexes(doc: Array): void; + addToIndexes(doc: T[]): void; /** * Remove one or several document(s) from all indexes */ removeFromIndexes(doc: T): void; - removeFromIndexes(doc: Array): void; + removeFromIndexes(doc: T[]): void; /** * Update one or several documents in all indexes @@ -66,7 +66,7 @@ declare class NeDBDataStore { * If one update violates a constraint, all changes are rolled back */ updateIndexes(oldDoc: T, newDoc: T): void; - updateIndexes(updates: Array<{oldDoc: T; newDoc: T}>): void; + updateIndexes(updates: {oldDoc: T; newDoc: T}[]): void; /** * Return the list of candidates for a given query @@ -98,7 +98,7 @@ declare class NeDBDataStore { * @param {any} query MongoDB-style query * @param {any} projection MongoDB-style projection */ - find(query: any, projection: T, callback: (err: Error, documents: Array) => void): void; + find(query: any, projection: T, callback: (err: Error, documents: T[]) => void): void; find(query: any, projection: T): NeDB.Cursor; /** @@ -106,7 +106,7 @@ declare class NeDBDataStore { * If no callback is passed, we return the cursor so that user can limit, skip and finally exec * * @param {any} query MongoDB-style query */ - find(query: any, callback: (err: Error, documents: Array) => void): void; + find(query: any, callback: (err: Error, documents: T[]) => void): void; find(query: any): NeDB.Cursor; /** @@ -174,7 +174,7 @@ declare namespace NeDB { skip(n: number): Cursor; limit(n: number): Cursor; projection(query: any): Cursor; - exec(callback: (err: Error, documents: Array) => void): void; + exec(callback: (err: Error, documents: T[]) => void): void; } interface CursorCount { diff --git a/ng-file-upload/index.d.ts b/ng-file-upload/index.d.ts index 1985b20e45..605560e09e 100644 --- a/ng-file-upload/index.d.ts +++ b/ng-file-upload/index.d.ts @@ -126,10 +126,10 @@ declare module 'angular' { * base64 data url representation of the file(s). * Could be used to send file in base64 format inside json to the databases * - * @param {Array} + * @param {File[]} * @return {angular.IPromise} */ - base64DataUrl(files: File | Array): angular.IPromise; + base64DataUrl(files: File | File[]): angular.IPromise; /** * Convert the file to blob url object or base64 data url based on boolean disallowObjectUrl value * diff --git a/node-array-ext/index.d.ts b/node-array-ext/index.d.ts index 40991495ce..8091db0df7 100644 --- a/node-array-ext/index.d.ts +++ b/node-array-ext/index.d.ts @@ -8,9 +8,9 @@ * Processes each of the elements in the array and triggers a callback once every element has been processed. * - note that the elements are called in order but are not guaranteed to finish in order. */ -export declare function asyncEach(array: Array, each: (i: number, element: T, done: (err?: Error) => void) => void, finish: (err?: Error) => void): void; +export declare function asyncEach(array: T[], each: (i: number, element: T, done: (err?: Error) => void) => void, finish: (err?: Error) => void): void; /** * Processes each of the elements in the array and triggers a callback once every element has been processed. * - note that the elements are called in order and are guaranteed to finish in order. */ -export declare function awaitEach(array: Array, each: (i: number, element: T, done: (err?: Error) => void) => void, finish: (err?: Error) => void): void; +export declare function awaitEach(array: T[], each: (i: number, element: T, done: (err?: Error) => void) => void, finish: (err?: Error) => void): void; diff --git a/node-mysql-wrapper/my-meteor.d.ts b/node-mysql-wrapper/my-meteor.d.ts index 73856fd0b0..e8fc8ee65f 100644 --- a/node-mysql-wrapper/my-meteor.d.ts +++ b/node-mysql-wrapper/my-meteor.d.ts @@ -62,9 +62,9 @@ declare namespace Mongo { } interface Cursor { count(): number; - fetch(): Array; + fetch(): T[]; forEach(callback: (doc: T, index: number, cursor: Mongo.Cursor) => void, thisArg?: any): void; - map(callback: (doc: T, index: number, cursor: Mongo.Cursor) => U, thisArg?: any): Array; + map(callback: (doc: T, index: number, cursor: Mongo.Cursor) => U, thisArg?: any): U[]; observe(callbacks: Object): any; observeChanges(callbacks: Object): any; } diff --git a/object-path/index.d.ts b/object-path/index.d.ts index 90ff1ad812..97704eed9e 100644 --- a/object-path/index.d.ts +++ b/object-path/index.d.ts @@ -7,8 +7,8 @@ declare var objectPath: ObjectPathGlobal.IObjectPathStatic; declare namespace ObjectPathGlobal { - type IPath = Array|number|string; - type IMultiArray = Array; + type IPath = (number|string)[]|number|string; + type IMultiArray = IPath[]; interface IObjectPathStatic { /** diff --git a/observe-js/index.d.ts b/observe-js/index.d.ts index 9d28afed51..01c047f360 100644 --- a/observe-js/index.d.ts +++ b/observe-js/index.d.ts @@ -98,11 +98,11 @@ declare namespace observejs { * @param current array of current state * @param splices splices to apply */ - applySplices(previous: any[], current: any[], splices: Array): void; + applySplices(previous: any[], current: any[], splices: splice[]): void; } interface ArrayObserver_instance extends Observable { - open(onChange: (splices: Array) => any): void; + open(onChange: (splices: splice[]) => any): void; } /** diff --git a/office-js/index.d.ts b/office-js/index.d.ts index f558764e56..60700ea8c1 100644 --- a/office-js/index.d.ts +++ b/office-js/index.d.ts @@ -4218,14 +4218,7 @@ declare module Excel { index: number; /** * -<<<<<<< HEAD * Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string. -======= - * The first criterion used to filter data. Used as an operator in the case of "custom" filtering. - For example ">50" for number greater than 50 or "=*s" for values ending in "s". - - Used as a number in the case of top/bottom items/percents. E.g. "5" for the top 5 items if filterOn is set to "topItems" ->>>>>>> types-2.0 * * [Api set: ExcelApi 1.1] */ diff --git a/onoff/index.d.ts b/onoff/index.d.ts index bc425ed3a0..abb2bce05b 100644 --- a/onoff/index.d.ts +++ b/onoff/index.d.ts @@ -25,7 +25,7 @@ declare namespace __ONOFF { gpioPath: string; opts: GpioOptions; readBuffer: Buffer; - listeners: Array<(error: Error, value: number) => void>; + listeners: ((error: Error, value: number) => void)[]; valueFd: number; read(cb: (err: Error, value: number) => void): void; diff --git a/openpgp/index.d.ts b/openpgp/index.d.ts index f998372894..46b8092dd2 100644 --- a/openpgp/index.d.ts +++ b/openpgp/index.d.ts @@ -30,7 +30,7 @@ declare namespace openpgp { interface VerifiedMessage { text: string; - signatures: Array; + signatures: Signature[]; } /** Decrypts message and verifies signatures @@ -39,7 +39,7 @@ declare namespace openpgp { @param publicKeys array of keys to verify signatures @param msg the message object with signed and encrypted data */ - function decryptAndVerifyMessage(privateKey: key.Key, publicKeys: Array, msg: string): Promise; + function decryptAndVerifyMessage(privateKey: key.Key, publicKeys: key.Key[], msg: string): Promise; /** Decrypts message and verifies signatures @param privateKey private key with decrypted secret key data @@ -60,7 +60,7 @@ declare namespace openpgp { @param text message as native JavaScript string @returns encrypted ASCII armored message */ - function encryptMessage(keys: Array, message: string): Promise; + function encryptMessage(keys: key.Key[], message: string): Promise; /** Encrypts message text with keys @param single key used to encrypt the message @@ -79,7 +79,7 @@ declare namespace openpgp { @param privateKey private key with decrypted secret key data for signing @param text private key with decrypted secret key data for signing */ - function signAndEncryptMessage(publicKeys: Array, privateKey: key.Key, text: string): Promise; + function signAndEncryptMessage(publicKeys: key.Key[], privateKey: key.Key, text: string): Promise; /** Signs message text and encrypts it @param publicKeys single key used to encrypt the message @@ -93,7 +93,7 @@ declare namespace openpgp { @param privateKeys array of keys with decrypted secret key data to sign cleartext @param text cleartext */ - function signClearMessage(privateKeys: Array, text: string): Promise; + function signClearMessage(privateKeys: key.Key[], text: string): Promise; /** Signs a cleartext message @param privateKeys single key with decrypted secret key data to sign cleartext @@ -106,7 +106,7 @@ declare namespace openpgp { @param publicKeys array of keys to verify signatures @param msg cleartext message object with signatures */ - function verifyClearSignedMessage(publicKeys: Array, msg: cleartext.CleartextMessage): Promise; + function verifyClearSignedMessage(publicKeys: key.Key[], msg: cleartext.CleartextMessage): Promise; /** Verifies signatures of cleartext signed message @param publicKeys single key to verify signatures @@ -144,7 +144,7 @@ declare namespace openpgp.cleartext { /** Returns the key IDs of the keys that signed the cleartext message */ - getSigningKeyIds(): Array; + getSigningKeyIds(): Keyid[]; /** Get cleartext */ @@ -153,12 +153,12 @@ declare namespace openpgp.cleartext { /** Sign the cleartext message @param privateKeys private keys with decrypted secret key data for signing */ - sign(privateKeys: Array): void; + sign(privateKeys: key.Key[]): void; /** Verify signatures of cleartext signed message @param keys array of keys to verify signatures */ - verify(keys: Array): Array; + verify(keys: key.Key[]): VerifiedMessage[]; } function readArmored(armoredText: string): CleartextMessage; @@ -203,14 +203,14 @@ declare namespace openpgp.crypto { @param secretMPIs Algorithm dependent multiprecision integers of the private key used @param data Data to be encrypted as MPI */ - function publicKeyDecrypt(algo: enums.publicKey, publicMPIs: Array, secretMPIs: Array, data: Mpi): Mpi; + function publicKeyDecrypt(algo: enums.publicKey, publicMPIs: Mpi[], secretMPIs: Mpi[], data: Mpi): Mpi; /** Encrypts data using the specified public key multiprecision integers and the specified algorithm. @param algo Algorithm to be used @param publicMPIs Algorithm dependent multiprecision integers @param data Data to be encrypted as MPI */ - function publicKeyEncrypt(algo: enums.publicKey, publicMPIs: Array, data: Mpi): Array; + function publicKeyEncrypt(algo: enums.publicKey, publicMPIs: Mpi[], data: Mpi): Mpi[]; } declare namespace openpgp.crypto.cfb { @@ -283,7 +283,7 @@ declare namespace openpgp.crypto.signature { @param secretMPIs Private key multiprecision integers which is used to sign the data @param data Data to be signed */ - function sign(hash_algo: enums.hash, algo: enums.publicKey, publicMPIs: Array, secretMPIs: Array, data: string): Mpi; + function sign(hash_algo: enums.hash, algo: enums.publicKey, publicMPIs: Mpi[], secretMPIs: Mpi[], data: string): Mpi; /** @param algo public Key algorithm @@ -292,7 +292,7 @@ declare namespace openpgp.crypto.signature { @param publickey_MPIs Public key multiprecision integers @param data Data on where the signature was computed on */ - function verify(algo: enums.publicKey, hash_algo: enums.hash, msg_MPIs: Array, publickey_MPIs: Array, data: string): boolean; + function verify(algo: enums.publicKey, hash_algo: enums.hash, msg_MPIs: Mpi[], publickey_MPIs: Mpi[], data: string): boolean; } declare namespace openpgp.enums { @@ -375,8 +375,8 @@ declare namespace openpgp.enums { declare namespace openpgp.key { interface KeyResult { - keys: Array; - err: Array; + keys: Key[]; + err: Error[]; } /** Class that represents an OpenPGP key. Must contain a primary key. Can contain additional subkeys, signatures, user ids, user attributes. @@ -385,7 +385,7 @@ declare namespace openpgp.key { armor(): string; decrypt(passphrase: string): boolean; getExpirationTime(): Date; - getKeyIds(): Array; + getKeyIds(): Keyid[]; getPreferredHashAlgorithm(): string; getPrimaryUser(): any; getUserIds(): string[]; @@ -422,16 +422,16 @@ declare namespace openpgp.message { /** Decrypt the message @param privateKey private key with decrypted secret data */ - decrypt(privateKey: key.Key): Array; + decrypt(privateKey: key.Key): Message[]; /** Encrypt the message @param keys array of keys, used to encrypt the message */ - encrypt(keys: Array): Array; + encrypt(keys: key.Key[]): Message[]; /** Returns the key IDs of the keys to which the session key is encrypted */ - getEncryptionKeyIds(): Array; + getEncryptionKeyIds(): Keyid[]; /** Get literal data that is the body of the message */ @@ -439,7 +439,7 @@ declare namespace openpgp.message { /** Returns the key IDs of the keys that signed the message */ - getSigningKeyIds(): Array; + getSigningKeyIds(): Keyid[]; /** Get literal data as text */ @@ -448,7 +448,7 @@ declare namespace openpgp.message { /** Sign the message (the literal data packet of the message) @param privateKey private keys with decrypted secret key data for signing */ - sign(privateKey: Array): Message; + sign(privateKey: key.Key[]): Message; /** Unwrap compressed message */ @@ -457,7 +457,7 @@ declare namespace openpgp.message { /** Verify message signatures @param keys array of keys to verify signatures */ - verify(keys: Array): Object[]; + verify(keys: key.Key[]): Object[]; } /** creates new message object from binary data diff --git a/oracledb/index.d.ts b/oracledb/index.d.ts index 3f097195bf..bcbd7dc4c7 100644 --- a/oracledb/index.d.ts +++ b/oracledb/index.d.ts @@ -147,7 +147,7 @@ declare namespace oracledb { interface IExecuteReturn { /** Metadata information - column names is always given. If the Oracledb extendedMetaData or execute() option extendedMetaData are true then additional information is included. */ - metaData?: Array; + metaData?: IMetaData[]; /** This is either an array or an object containing OUT and IN OUT bind values. If bindParams is passed as an array, then outBinds is returned as an array. If bindParams is passed as an object, then outBinds is returned as an object. */ outBinds?: any[] | Object; /** For SELECT statements when the resultSet option is true, use the resultSet object to fetch rows. See ResultSet Class. */ @@ -180,7 +180,7 @@ declare namespace oracledb { * Contains an array of objects with metadata about the query or REF CURSOR columns. * Each column's name is always given. If the Oracledb extendedMetaData or execute() option extendedMetaData are true then additional information is included. */ - metaData?: Array; + metaData?: IMetaData[]; /** * Closes a ResultSet. Applications should always call this at the end of fetch or when no more rows are needed. diff --git a/p2/index.d.ts b/p2/index.d.ts index 5fb85052e6..49a7abf635 100644 --- a/p2/index.d.ts +++ b/p2/index.d.ts @@ -827,8 +827,8 @@ declare namespace p2 { export class Utils { - static appendArray(a: Array, b: Array): Array; - static splice(array: Array, index: number, howMany: number): void; + static appendArray(a: T[], b: T[]): T[]; + static splice(array: T[], index: number, howMany: number): void; static extend(a: any, b: any): void; static defaults(options: any, defaults: any): any; diff --git a/packery/index.d.ts b/packery/index.d.ts index 012ad09f6b..847f56a5c1 100644 --- a/packery/index.d.ts +++ b/packery/index.d.ts @@ -101,9 +101,9 @@ declare class Packery { /** * [addItems Add item elements to the Packery instance] - * @param {Array} elements [description] + * @param {Element[]} elements [description] */ - addItems(elements: Array): void; + addItems(elements: Element[]): void; /** * [appended Add and lay out newly appended item elements] @@ -119,9 +119,9 @@ declare class Packery { /** * [appended Add and lay out newly appended item elements] - * @param {Array} elements [description] + * @param {Element[]} elements [description] */ - appended(elements: Array): void; + appended(elements: Element[]): void; /** * [bindDraggabillyEvents Bind Draggabilly events, so that the Packery instance will layout around the dragged element] @@ -162,9 +162,9 @@ declare class Packery { /** * [getItemElements Get an array of elements used as the Packery instance's items.] - * @return {Array} [description] + * @return {Element[]} [description] */ - getItemElements(): Array; + getItemElements(): Element[]; /** * [getItem Get a Packery.Item from an element] @@ -180,7 +180,7 @@ declare class Packery { /** * [layoutItems Lay out specified items] - * @param {Array} items [description] + * @param {Packery.items[]} items [description] */ layoutItems(items: any[]): void; @@ -221,9 +221,9 @@ declare class Packery { /** * [prepended Add and lay out newly prepended item elements at the beginning of layout] - * @param {Array} elements [description] + * @param {Element[]} elements [description] */ - prepended(elements: Array): void; + prepended(elements: Element[]): void; /** * [reloadItems Recollect all item elements] @@ -244,9 +244,9 @@ declare class Packery { /** * [remove Remove elements from the Packery instance, then from the DOM] - * @param {Array} elements [description] + * @param {Element[]} elements [description] */ - remove(elements: Array): void; + remove(elements: Element[]): void; /** * [stamp Stamp the elements in the layout. Packery will lay out item elements around stamped element] @@ -262,9 +262,9 @@ declare class Packery { /** * [stamp Stamp the elements in the layout. Packery will lay out item elements around stamped element] - * @param {Array} elements [description] + * @param {Element[]} elements [description] */ - stamp(elements: Array): void; + stamp(elements: Element[]): void; /** * [unbindResize Un-bind layout to window resize event] @@ -285,9 +285,9 @@ declare class Packery { /** * [unstamp Un-stamp the elements, so that Packery will no longer layout item elements around them] - * @param {Array} element [description] + * @param {Element[]} element [description] */ - unstamp(element: Array): void; + unstamp(element: Element[]): void; } export = Packery; diff --git a/papaparse/index.d.ts b/papaparse/index.d.ts index a8a24825dc..b954be7769 100644 --- a/papaparse/index.d.ts +++ b/papaparse/index.d.ts @@ -116,7 +116,7 @@ declare namespace PapaParse { */ interface ParseResult { data: any[]; - errors: Array; + errors: ParseError[]; meta: ParseMeta; } diff --git a/parse-torrent/index.d.ts b/parse-torrent/index.d.ts index 676cfc33a6..344867e9d8 100644 --- a/parse-torrent/index.d.ts +++ b/parse-torrent/index.d.ts @@ -20,7 +20,7 @@ declare namespace ParseTorrent { comment?: string; announce?: string[]; urlList?: string[]; - files?: Array<{path: string, name: string, length: number, offset: number}>; + files?: {path: string, name: string, length: number, offset: number}[]; length?: number; pieceLength?: number; lastPieceLength?: number; diff --git a/passport-http/index.d.ts b/passport-http/index.d.ts index efd474404d..f3ce3bb774 100644 --- a/passport-http/index.d.ts +++ b/passport-http/index.d.ts @@ -13,10 +13,10 @@ interface BasicStrategyOptions { interface DigestStrategyOptions { realm?: string; - domain?: string | Array; + domain?: string | string[]; opaque?: string; algorithm?: string; - qop?: string | Array; + qop?: string | string[]; } interface DigestValidateOptions { diff --git a/pdfkit/index.d.ts b/pdfkit/index.d.ts index 4efe501235..8793d210c4 100644 --- a/pdfkit/index.d.ts +++ b/pdfkit/index.d.ts @@ -140,8 +140,8 @@ declare namespace PDFKit.Mixins { text(text: string, options?: TextOptions): TDocument; widthOfString(text: string, options?: TextOptions): number; heightOfString(text: string, options?: TextOptions): number; - list(list: Array, x?: number, y?: number, options?: TextOptions): TDocument; - list(list: Array, options?: TextOptions): TDocument; + list(list: (string|any)[], x?: number, y?: number, options?: TextOptions): TDocument; + list(list: (string|any)[], options?: TextOptions): TDocument; } interface PDFVector { diff --git a/phonegap-nfc/index.d.ts b/phonegap-nfc/index.d.ts index ae21035cf6..60349b748e 100644 --- a/phonegap-nfc/index.d.ts +++ b/phonegap-nfc/index.d.ts @@ -49,7 +49,7 @@ declare namespace PhoneGapNfc { canMakeReadOnly: boolean; isWritable: boolean; maxSize: number; - ndefMessage: Array; + ndefMessage: NdefRecord[]; } interface TagEvent extends Event { @@ -200,7 +200,7 @@ declare namespace PhoneGapNfc { * * @return NdefRecord */ - smartPoster(ndefRecords: Array, id: number[]): NdefRecord; + smartPoster(ndefRecords: NdefRecord[], id: number[]): NdefRecord; /** * Helper that creates an empty NdefRecord. @@ -225,7 +225,7 @@ declare namespace PhoneGapNfc { * * @see NFC Data Exchange Format (NDEF) http://www.nfc-forum.org/specs/spec_list/ */ - encodeMessage(ndefRecords: Array): number[]; + encodeMessage(ndefRecords: NdefRecord[]): number[]; /** * Decodes an array bytes into an NDEF Message @@ -236,7 +236,7 @@ declare namespace PhoneGapNfc { * * @see NFC Data Exchange Format (NDEF) http://www.nfc-forum.org/specs/spec_list/ */ - decodeMessage(bytes: number[]): Array; + decodeMessage(bytes: number[]): NdefRecord[]; /** * Decode the bit flags from a TNF Byte. @@ -340,7 +340,7 @@ declare namespace PhoneGapNfc { * @param win The callback that is called when the tag is written. * @param fail The callback that is called if there was an error. */ - write(ndefMessage: Array, win?: () => void, fail?: () => void): void; + write(ndefMessage: NdefRecord[], win?: () => void, fail?: () => void): void; /** * Function nfc.makeReadOnly make a NFC tag read only. @@ -358,7 +358,7 @@ declare namespace PhoneGapNfc { * @param win The callback that is called when the message is pushed. * @param fail The callback that is called if there was an error. */ - share(ndefMessage: Array, win?: () => void, fail?: () => void): void; + share(ndefMessage: NdefRecord[], win?: () => void, fail?: () => void): void; /** * Function nfc.unshare stops sharing data via peer-to-peer. diff --git a/pkijs/index.d.ts b/pkijs/index.d.ts index 85cae0773a..5d07dbe520 100644 --- a/pkijs/index.d.ts +++ b/pkijs/index.d.ts @@ -10,7 +10,7 @@ declare module "pkijs/src/Attribute" { export default class Attribute { type: string; - value: Array; + value: any[]; constructor(params?: any); diff --git a/playerframework/index.d.ts b/playerframework/index.d.ts index 9bb53fb251..4b174800f0 100644 --- a/playerframework/index.d.ts +++ b/playerframework/index.d.ts @@ -337,7 +337,7 @@ declare namespace PlayerFramework { /** * **/ - playlist: Array; + playlist: PlaylistItem[]; /** * **/ diff --git a/pleasejs/index.d.ts b/pleasejs/index.d.ts index 3c93483efb..fb993345fc 100644 --- a/pleasejs/index.d.ts +++ b/pleasejs/index.d.ts @@ -13,8 +13,8 @@ declare namespace PleaseJS { * @returns {Array} */ make_color(options?: MakeColorOption): string[]; - make_color(options?: MakeColorOption): Array; - make_color(options?: MakeColorOption): Array; + make_color(options?: MakeColorOption): RGB[]; + make_color(options?: MakeColorOption): HSV[]; /*** * make a color scheme @@ -22,8 +22,8 @@ declare namespace PleaseJS { * @returns {Array} */ make_scheme(base_color: HSV, options?: MakeSchemeOption): string[]; - make_scheme(base_color: HSV, options?: MakeSchemeOption): Array; - make_scheme(base_color: HSV, options?: MakeSchemeOption): Array; + make_scheme(base_color: HSV, options?: MakeSchemeOption): RGB[]; + make_scheme(base_color: HSV, options?: MakeSchemeOption): HSV[]; /*** * convert color name into hex string diff --git a/poly2tri/index.d.ts b/poly2tri/index.d.ts index ed8d9e838f..1f5f60a55b 100644 --- a/poly2tri/index.d.ts +++ b/poly2tri/index.d.ts @@ -70,23 +70,23 @@ declare namespace poly2tri { class SweepContext { - constructor(contour: Array); + constructor(contour: IPointLike[]); - constructor(contour: Array, options: JSON); + constructor(contour: IPointLike[], options: JSON); - addHole(polyline: Array): SweepContext; + addHole(polyline: IPointLike[]): SweepContext; - addHoles(holes: Array>): SweepContext; + addHoles(holes: IPointLike[][]): SweepContext; addPoint(point: IPointLike): SweepContext; - addPoints(point: Array): SweepContext; + addPoints(point: IPointLike[]): SweepContext; triangulate(): SweepContext; getBoundingBox(): { min: IPointLike; max: IPointLike; }; - getTriangles(): Array; + getTriangles(): Triangle[]; } class Triangle { @@ -96,7 +96,7 @@ declare namespace poly2tri { getPoint(index: number): IPointLike; - getPoints(): Array; + getPoints(): IPointLike[]; containsPoint(point: IPointLike): boolean; diff --git a/polymer-ts/index.d.ts b/polymer-ts/index.d.ts index 200d012b58..d49e4602af 100644 --- a/polymer-ts/index.d.ts +++ b/polymer-ts/index.d.ts @@ -28,7 +28,7 @@ declare namespace polymer { elementMatches(selector: string, node: Element): any; fire(type: string, detail?: Object, options?: FireOptions): any; flushDebouncer(jobName: string): void; - get(path: string | Array): any; + get(path: string | (string | number)[]): any; getContentChildNodes(slctr: string): any; getContentChildren(slctr: string): any; getNativePrototype(tag: string): any; @@ -54,7 +54,7 @@ declare namespace polymer { scopeSubtree(container: Element, shouldObserve: boolean): void; serialize(value: string): any; serializeValueToAttribute(value: any, attribute: string, node: Element): void; - set(path: string | Array, value: any, root?: Object): any; + set(path: string | (string | number)[], value: any, root?: Object): any; setScrollDirection(direction: string, node: HTMLElement): void; shift(path: string, value: any): any; splice(path: string, start: number, deleteCount: number, ...items: any[]): any; diff --git a/postal/postal-0.8.9.d.ts b/postal/postal-0.8.9.d.ts index 8afc5256a9..230af1ec9f 100644 --- a/postal/postal-0.8.9.d.ts +++ b/postal/postal-0.8.9.d.ts @@ -17,7 +17,7 @@ interface ISubscriptionDefinition { distinctUntilChanged(): ISubscriptionDefinition; once(): ISubscriptionDefinition; withConstraint(predicate: Function): ISubscriptionDefinition; - withConstraints(predicates: Array): ISubscriptionDefinition; + withConstraints(predicates: Function[]): ISubscriptionDefinition; withContext(context: any): ISubscriptionDefinition; withDebounce(milliseconds: number, immediate: boolean ): ISubscriptionDefinition; diff --git a/prismjs/index.d.ts b/prismjs/index.d.ts index 776c56a316..7dbfe4bccd 100644 --- a/prismjs/index.d.ts +++ b/prismjs/index.d.ts @@ -80,7 +80,7 @@ declare namespace PrismJS { } interface Util { - encode(tokens: Token | Array | string): Token | Array | string; + encode(tokens: Token | Token[] | string): Token | Token[] | string; type(o: Object): string; objId(obj: Object): Identifier; clone(o: LanguageDefinition): LanguageDefinition; @@ -128,7 +128,7 @@ declare namespace PrismJS { /** * Accepts an object literal with tokens and appends them to the end of the current object literal. */ - rest?: Array; + rest?: Token[]; } interface Languages extends Array { @@ -148,14 +148,14 @@ declare namespace PrismJS { } interface Hooks { - all: Array void>>; + all: ((env: Environment) => void)[][]; add(name: string, callback: (env: Environment) => void): void; run(name: string, env: Environment): void; } interface Token { type: string; - content: Token | Array | string; + content: Token | Token[] | string; alias: string; stringify(o: string| any[], language: LanguageDefinition, parent: HTMLPreElement): string; } diff --git a/promise/index.d.ts b/promise/index.d.ts index 5682a724b0..d3584aae95 100644 --- a/promise/index.d.ts +++ b/promise/index.d.ts @@ -14,7 +14,7 @@ declare namespace Promise { resolve: (value: T) => IThenable; reject: (value: T) => IThenable; - all: (array: Array>) => IThenable; + all: (array: IThenable[]) => IThenable; denodeify: (fn: Function) => (...args: any[]) => IThenable; nodeify: (fn: Function) => Function; } diff --git a/protractor-http-mock/index.d.ts b/protractor-http-mock/index.d.ts index 2c416ed6a4..e48dc28af3 100644 --- a/protractor-http-mock/index.d.ts +++ b/protractor-http-mock/index.d.ts @@ -14,7 +14,7 @@ declare namespace mock { * @param plugins An array of Plugin objects. * @param skipDefaults Set true to skip loading of default mocks. */ - (mocks?: Array>, plugins?: Array, skipDefaults?: boolean): ProtractorHttpMock; + (mocks?: requests.AllRequests[], plugins?: Plugin[], skipDefaults?: boolean): ProtractorHttpMock; /** * Instantiate mock module. This must be done before the browser connects. @@ -23,7 +23,7 @@ declare namespace mock { * @param plugins An array of NPM modules as strings. * @param skipDefaults Set true to skip loading of default mocks. */ - (mocks?: Array>, plugins?: string[], skipDefaults?: boolean): ProtractorHttpMock; + (mocks?: requests.AllRequests[], plugins?: string[], skipDefaults?: boolean): ProtractorHttpMock; /** * Instantiate mock modules from files. This must be done before the browser connects. @@ -32,7 +32,7 @@ declare namespace mock { * @param plugins An array of Plugin objects. * @param skipDefaults Set true to skip loading of default mocks. */ - (mocks: string[], plugins?: Array, skipDefaults?: boolean): ProtractorHttpMock; + (mocks: string[], plugins?: Plugin[], skipDefaults?: boolean): ProtractorHttpMock; /** * Instantiate mock modules from files. This must be done before the browser connects. @@ -54,7 +54,7 @@ declare namespace mock { * Returns a promise that will be resolved with an array of * all matched HTTP requests. */ - requestsMade(): webdriver.promise.Promise>; + requestsMade(): webdriver.promise.Promise; /** * Returns a promise that will be resolved with a true boolean @@ -86,7 +86,7 @@ declare namespace mock { * * @param mocks An array of mock modules to load into the application. */ - add(mocks: Array>): webdriver.promise.Promise; + add(mocks: requests.AllRequests[]): webdriver.promise.Promise; /** * Remove mocks during test execution. @@ -95,7 +95,7 @@ declare namespace mock { * * @param mocks An array of mock modules to remove from the application. */ - remove(mocks: Array>): webdriver.promise.Promise; + remove(mocks: requests.AllRequests[]): webdriver.promise.Promise; } /** diff --git a/qs/index.d.ts b/qs/index.d.ts index c23c02f871..9968adb41c 100644 --- a/qs/index.d.ts +++ b/qs/index.d.ts @@ -13,7 +13,7 @@ declare namespace QueryString { skipNulls?: boolean; encode?: boolean; encoder?: (str: string) => any; - filter?: Array | ((prefix: string, value: any) => any); + filter?: string | number[] | ((prefix: string, value: any) => any); arrayFormat?: 'indices' | 'brackets' | 'repeat'; indices?: boolean; } diff --git a/qunit/qunit-1.16.d.ts b/qunit/qunit-1.16.d.ts index c7ad3bbfb2..b795167063 100644 --- a/qunit/qunit-1.16.d.ts +++ b/qunit/qunit-1.16.d.ts @@ -135,7 +135,7 @@ interface Config { reorder: boolean; requireExpects: boolean; testTimeout: number; - urlConfig: Array; + urlConfig: URLConfigItem[]; done: any; } diff --git a/random-js/index.d.ts b/random-js/index.d.ts index aa04a9d449..972b455a05 100644 --- a/random-js/index.d.ts +++ b/random-js/index.d.ts @@ -36,10 +36,10 @@ declare class TemporaryName { static real(min: number, max: number, inclusive: boolean): (engine: TemporaryName.Engine) => number; static bool(percentage?: number): (engine: TemporaryName.Engine) => boolean; static bool(numerator: number, denominator: number): (engine: TemporaryName.Engine) => boolean; - static pick(engine: TemporaryName.Engine, array: Array, begin?: number, end?: number): T; - static picker(array: Array, begin?: number, end?: number): (engine: TemporaryName.Engine) => T; - static shuffle(engine: TemporaryName.Engine, array: Array): Array; - static sample(engine: TemporaryName.Engine, population: Array, sampleSize: number): Array; + static pick(engine: TemporaryName.Engine, array: T[], begin?: number, end?: number): T; + static picker(array: T[], begin?: number, end?: number): (engine: TemporaryName.Engine) => T; + static shuffle(engine: TemporaryName.Engine, array: T[]): T[]; + static sample(engine: TemporaryName.Engine, population: T[], sampleSize: number): T[]; static die(sideCount: number): (engine: TemporaryName.Engine) => number; static dice(sideCount: number, dieCount: number): (engine: TemporaryName.Engine) => number; static uuid4(engine: TemporaryName.Engine): string; @@ -52,10 +52,10 @@ declare class TemporaryName { real(min: number, max: number, inclusive: boolean): number; bool(percentage?: number): (engine: TemporaryName.Engine) => boolean; bool(numerator: number, denominator: number): boolean; - pick(engine: TemporaryName.Engine, array: Array, begin?: number, end?: number): T; - picker(array: Array, begin?: number, end?: number): (engine: TemporaryName.Engine) => T; - shuffle(engine: TemporaryName.Engine, array: Array): Array; - sample(engine: TemporaryName.Engine, population: Array, sampleSize: number): Array; + pick(engine: TemporaryName.Engine, array: T[], begin?: number, end?: number): T; + picker(array: T[], begin?: number, end?: number): (engine: TemporaryName.Engine) => T; + shuffle(engine: TemporaryName.Engine, array: T[]): T[]; + sample(engine: TemporaryName.Engine, population: T[], sampleSize: number): T[]; die(sideCount: number): (engine: TemporaryName.Engine) => number; dice(sideCount: number, dieCount: number): number; uuid4(engine: TemporaryName.Engine): string; diff --git a/react-data-grid/index.d.ts b/react-data-grid/index.d.ts index 1f953a1921..170acd23f3 100644 --- a/react-data-grid/index.d.ts +++ b/react-data-grid/index.d.ts @@ -25,7 +25,7 @@ declare namespace AdazzleReactDataGrid { /** * The columns to render. */ - columns?: Array; + columns?: Column[]; /** * Invoked when the user changes the value of a single cell. diff --git a/react-motion/index.d.ts b/react-motion/index.d.ts index 1384f6c2df..64f4f48b1b 100644 --- a/react-motion/index.d.ts +++ b/react-motion/index.d.ts @@ -96,7 +96,7 @@ interface TransitionPlainStyle { // same as TransitionStyle, passed as argument to style/children function style: PlainStyle; } -type InterpolateFunction = (previousInterpolatedStyles?: Array) => Array; +type InterpolateFunction = (previousInterpolatedStyles?: TransitionPlainStyle[]) => TransitionStyle[]; /** * Transition properties */ @@ -104,13 +104,13 @@ interface TransitionProps { /** * Default styles on first render */ - defaultStyles?: Array; + defaultStyles?: TransitionPlainStyle[]; /** * Styles to interpolate. Accepts array of TransitionStyle objects or interpolated function similar as for * */ - styles: Array | InterpolateFunction; - children: (interpolatedStyles: Array) => ReactElement; + styles: TransitionStyle[] | InterpolateFunction; + children: (interpolatedStyles: TransitionPlainStyle[]) => ReactElement; /** * Triggers when new elements appears * @param styleThatEntered @@ -129,12 +129,12 @@ interface StaggeredMotionProps { /** * Default styles */ - defaultStyles?: Array; + defaultStyles?: PlainStyle[]; /** * Styles to interpolate * @param previousInterpolatedStyles The previously interpolating (array of) styles (undefined at first render, unless defaultStyles is provided). */ - styles: (previousInterpolatedStyles?: Array) => Array