mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-12 22:36:10 +08:00
Fix incorrect tuple usage and syntax
This commit is contained in:
4
types/aws-lambda/index.d.ts
vendored
4
types/aws-lambda/index.d.ts
vendored
@@ -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[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
2
types/fingerprintjs2/index.d.ts
vendored
2
types/fingerprintjs2/index.d.ts
vendored
@@ -13,7 +13,7 @@ declare class Fingerprint2 {
|
||||
interface Fingerprint2Options {
|
||||
swfContainerId?: string;
|
||||
swfPath?: string;
|
||||
userDefinedFonts?: [string];
|
||||
userDefinedFonts?: string[];
|
||||
excludeUserAgent?: boolean;
|
||||
excludeLanguage?: boolean;
|
||||
excludeColorDepth?: boolean;
|
||||
|
||||
@@ -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> {
|
||||
|
||||
2
types/heredatalens/index.d.ts
vendored
2
types/heredatalens/index.d.ts
vendored
@@ -141,7 +141,7 @@ declare namespace H.datalens {
|
||||
/** Column names */
|
||||
columns: string[];
|
||||
/** Rows of data */
|
||||
rows: [any[]];
|
||||
rows: any[][];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
6
types/highcharts/index.d.ts
vendored
6
types/highcharts/index.d.ts
vendored
@@ -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.
|
||||
|
||||
@@ -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
|
||||
]
|
||||
}]
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
|
||||
2
types/validate.js/index.d.ts
vendored
2
types/validate.js/index.d.ts
vendored
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
8
types/xml2js/index.d.ts
vendored
8
types/xml2js/index.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user