Fix incorrect tuple usage and syntax

This commit is contained in:
Nathan Shively-Sanders
2017-11-09 13:55:03 -08:00
parent c6835d5e17
commit a364bb7a8c
9 changed files with 22 additions and 21 deletions

View File

@@ -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[];
}
/**

View File

@@ -13,7 +13,7 @@ declare class Fingerprint2 {
interface Fingerprint2Options {
swfContainerId?: string;
swfPath?: string;
userDefinedFonts?: [string];
userDefinedFonts?: string[];
excludeUserAgent?: boolean;
excludeLanguage?: boolean;
excludeColorDepth?: boolean;

View File

@@ -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> {

View File

@@ -141,7 +141,7 @@ declare namespace H.datalens {
/** Column names */
columns: string[];
/** Rows of data */
rows: [any[]];
rows: any[][];
}
}

View File

@@ -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<Array<string | number>>;
/**
* 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.

View File

@@ -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
]
}]
});

View File

@@ -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);

View File

@@ -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;
}
}

View File

@@ -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;
}