diff --git a/types/aws-lambda/index.d.ts b/types/aws-lambda/index.d.ts index 523aafd41f..342d489d68 100644 --- a/types/aws-lambda/index.d.ts +++ b/types/aws-lambda/index.d.ts @@ -331,9 +331,9 @@ interface PolicyDocument { * http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html#api-gateway-custom-authorizer-output */ interface Statement { - Action: string | [string]; + Action: string | string[]; Effect: string; - Resource: string | [string]; + Resource: string | string[]; } /** diff --git a/types/fingerprintjs2/index.d.ts b/types/fingerprintjs2/index.d.ts index c9fc9b2a39..94b705b807 100644 --- a/types/fingerprintjs2/index.d.ts +++ b/types/fingerprintjs2/index.d.ts @@ -13,7 +13,7 @@ declare class Fingerprint2 { interface Fingerprint2Options { swfContainerId?: string; swfPath?: string; - userDefinedFonts?: [string]; + userDefinedFonts?: string[]; excludeUserAgent?: boolean; excludeLanguage?: boolean; excludeColorDepth?: boolean; diff --git a/types/fixed-data-table/fixed-data-table-tests.tsx b/types/fixed-data-table/fixed-data-table-tests.tsx index cdbd46eb6c..bb09fedcaf 100644 --- a/types/fixed-data-table/fixed-data-table-tests.tsx +++ b/types/fixed-data-table/fixed-data-table-tests.tsx @@ -36,7 +36,7 @@ class MyTable2 extends React.Component { // provide Custom Data interface MyTable3State { - myTableData: [{name: string}]; + myTableData: {name: string}[]; } class MyTable3 extends React.Component<{}, MyTable3State> { diff --git a/types/heredatalens/index.d.ts b/types/heredatalens/index.d.ts index 0fcf4dc3e1..cb9a4d7807 100644 --- a/types/heredatalens/index.d.ts +++ b/types/heredatalens/index.d.ts @@ -141,7 +141,7 @@ declare namespace H.datalens { /** Column names */ columns: string[]; /** Rows of data */ - rows: [any[]]; + rows: any[][]; } } diff --git a/types/highcharts/index.d.ts b/types/highcharts/index.d.ts index b026403b48..a79441dd47 100644 --- a/types/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -1036,7 +1036,7 @@ declare namespace Highcharts { * Datetime axis only. An array determining what time intervals the ticks are allowed to fall on. Each array item is * an array where the first value is the time unit and the second value another array of allowed multiples. */ - units?: [[string, [number]]]; + units?: [string, number[]][]; /** * Whether axis, including axis title, line, ticks and labels, should be visible. * @default true @@ -2040,7 +2040,7 @@ declare namespace Highcharts { * switchRowsAndColumns is set, the columns are interpreted as series. * @since 4.0 */ - columns?: Array<[string | number]>; + columns?: Array>; /** * The callback that is evaluated when the data is finished loading, optionally from an external source, and parsed. * The first argument passed is a finished chart options object, containing the series. These options can be @@ -6575,7 +6575,7 @@ declare namespace Highcharts { * a subset is supported: absolute moveTo (M), absolute lineTo (L), absolute curveTo (C) and close (Z). * @param path An SVG path split up in array form. */ - path(path: [string | number]): ElementObject; + path(path: (string | number)[]): ElementObject; /** * Add a rectangle. * @param x The x position of the rectangle's upper left corner. diff --git a/types/highcharts/test/index.ts b/types/highcharts/test/index.ts index e96a0665e8..717e875362 100644 --- a/types/highcharts/test/index.ts +++ b/types/highcharts/test/index.ts @@ -1345,11 +1345,11 @@ function test_BoxPlot() { series: [{ name: 'Observations', data: [ - [760, 801, 848, 895, 965], - [733, 853, 939, 980, 1080], - [714, 762, 817, 870, 918], - [724, 802, 806, 871, 950], - [834, 836, 864, 882, 910] + 760, 801, 848, 895, 965, + 733, 853, 939, 980, 1080, + 714, 762, 817, 870, 918, + 724, 802, 806, 871, 950, + 834, 836, 864, 882, 910 ] }] }); diff --git a/types/leaflet/leaflet-tests.ts b/types/leaflet/leaflet-tests.ts index b85c8bf4d7..3315d33bc0 100644 --- a/types/leaflet/leaflet-tests.ts +++ b/types/leaflet/leaflet-tests.ts @@ -380,12 +380,13 @@ draggable.disable(); draggable.on('drag', () => {}); let twoCoords: [number, number] = [1, 2]; +let outCoords: [number, number] | [number, number, number]; latLng = L.GeoJSON.coordsToLatLng(twoCoords); -twoCoords = L.GeoJSON.latLngToCoords(latLng); +outCoords = L.GeoJSON.latLngToCoords(latLng); -let threeCoords: [number, number] = [1, 2]; +let threeCoords: [number, number, number] = [1, 2, 3]; latLng = L.GeoJSON.coordsToLatLng(threeCoords); -threeCoords = L.GeoJSON.latLngToCoords(latLng); +outCoords = L.GeoJSON.latLngToCoords(latLng); let nestedTwoCoords = [ [12, 13], [13, 14], [14, 15] ]; const nestedLatLngs: L.LatLng[] = L.GeoJSON.coordsToLatLngs(nestedTwoCoords, 1); diff --git a/types/validate.js/index.d.ts b/types/validate.js/index.d.ts index 35754e844c..ed0a964d3e 100644 --- a/types/validate.js/index.d.ts +++ b/types/validate.js/index.d.ts @@ -84,7 +84,7 @@ declare namespace ValidateJS { export interface Presence extends Validator {} export interface Url extends Validator { - schemes?: [string | RegExp]; + schemes?: (string | RegExp)[]; allowLocal?: boolean; } } diff --git a/types/xml2js/index.d.ts b/types/xml2js/index.d.ts index 59af909a09..6685185376 100644 --- a/types/xml2js/index.d.ts +++ b/types/xml2js/index.d.ts @@ -31,8 +31,8 @@ export class Parser extends EventEmitter { export interface Options { async?: boolean; attrkey?: string; - attrNameProcessors?: [(name: string) => any]; - attrValueProcessors?: [(name: string) => any]; + attrNameProcessors?: ((name: string) => any)[]; + attrValueProcessors?: ((name: string) => any)[]; charkey?: string; charsAsChildren?: boolean; childkey?: string; @@ -47,10 +47,10 @@ export interface Options { normalize?: boolean; normalizeTags?: boolean; strict?: boolean; - tagNameProcessors?: [(name: string) => any]; + tagNameProcessors?: ((name: string) => any)[]; trim?: boolean; validator?: Function; - valueProcessors?: [(name: string) => any]; + valueProcessors?: ((name: string) => any)[]; xmlns?: boolean; }