WIP: Array<> stuff

This commit is contained in:
Andy Hanson
2016-11-28 11:21:35 -08:00
parent 53f202fdae
commit 8e2c6958a6
76 changed files with 577 additions and 577 deletions
+5 -5
View File
@@ -17,13 +17,13 @@ declare module 'angular' {
* @summary If logging is enabled then all outbound calls are accessible via an in-memory array.
* This is useful for troubleshooting and seeing the order of outbound calls with parameters.
*/
log: Array<Object>;
log: Object[];
/**
* @summary If in offline mode then all calls are queued to an in-memory array for future processing.
* All calls queued to the offlineQueue are not outbound calls yet and hence do not show up in the log.
*/
offlineQueue: Array<Object>;
offlineQueue: Object[];
/**
* @summary Returns the current URL that would be sent if a `trackPage` call was made.
@@ -109,7 +109,7 @@ declare module 'angular' {
* @param {Object} tracker The account identifier(s).
* @return {angular.google.analytics.IAnalyticsProvider} The object instance.
*/
setAccount(tracker: string | Object | Array<Object>): AnalyticsProvider;
setAccount(tracker: string | Object | Object[]): AnalyticsProvider;
/**
* @summary Set Cookie Configuration.
@@ -121,10 +121,10 @@ declare module 'angular' {
/**
* @summary Set cross-linked domains.
* @param {Array<string>} domains The domains.
* @param {string[]} domains The domains.
* @return {angular.google.analytics.IAnalyticsProvider} The object instance.
*/
setCrossLinkDomains(domains: Array<string>): AnalyticsProvider;
setCrossLinkDomains(domains: string[]): AnalyticsProvider;
/**
* @summary Set currency.
+1 -1
View File
@@ -5,7 +5,7 @@
declare class Awesomplete {
constructor(input: Element | HTMLElement | string, o?: AwesompleteOptions);
static all: Array<any>;
static all: any[];
static $$: (expr: string | NodeSelector, con?: any) => NodeList;
static ITEM: (text: string, input: string) => HTMLElement;
static $: {
+3 -3
View File
@@ -967,13 +967,13 @@ export function exportDefaultDeclaration(declaration?: FunctionDeclaration | Cla
export function exportNamedDeclaration(declaration?: Declaration, specifiers?: ExportSpecifier[], source?: StringLiteral): ExportNamedDeclaration;
export function exportSpecifier(local?: Identifier, exported?: Identifier): ExportSpecifier;
export function forOfStatement(left?: VariableDeclaration | LVal, right?: Expression, body?: Statement): ForOfStatement;
export function importDeclaration(specifiers?: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>, source?: StringLiteral): ImportDeclaration;
export function importDeclaration(specifiers?: (ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[], source?: StringLiteral): ImportDeclaration;
export function importDefaultSpecifier(local?: Identifier): ImportDefaultSpecifier;
export function importNamespaceSpecifier(local?: Identifier): ImportNamespaceSpecifier;
export function importSpecifier(local?: Identifier, imported?: Identifier): ImportSpecifier;
export function metaProperty(meta?: string, property?: string): MetaProperty;
export function classMethod(kind?: "constructor" | "method" | "get" | "set", key?: Expression, params?: Pattern[], body?: BlockStatement, computed?: boolean, _static?: boolean): ClassMethod;
export function objectPattern(properties?: Array<AssignmentProperty | RestProperty>, typeAnnotation?: TypeAnnotation): ObjectPattern;
export function objectPattern(properties?: (AssignmentProperty | RestProperty)[], typeAnnotation?: TypeAnnotation): ObjectPattern;
export function spreadElement(argument?: Expression): SpreadElement;
export function taggedTemplateExpression(tag?: Expression, quasi?: TemplateLiteral): TaggedTemplateExpression;
export function templateElement(value?: {cooked?: string; raw?: string}, tail?: boolean): TemplateElement;
@@ -1022,7 +1022,7 @@ export function unionTypeAnnotation(types?: FlowTypeAnnotation[]): UnionTypeAnno
export function voidTypeAnnotation(): VoidTypeAnnotation;
export function jSXAttribute(name?: JSXIdentifier | JSXNamespacedName, value?: JSXElement | StringLiteral | JSXExpressionContainer): JSXAttribute;
export function jSXClosingElement(name?: JSXIdentifier | JSXMemberExpression): JSXClosingElement;
export function jSXElement(openingElement?: JSXOpeningElement, closingElement?: JSXClosingElement, children?: Array<JSXElement | JSXExpressionContainer | JSXText>, selfClosing?: boolean): JSXElement;
export function jSXElement(openingElement?: JSXOpeningElement, closingElement?: JSXClosingElement, children?: (JSXElement | JSXExpressionContainer | JSXText)[], selfClosing?: boolean): JSXElement;
export function jSXEmptyExpression(): JSXEmptyExpression;
export function jSXExpressionContainer(expression?: Expression): JSXExpressionContainer;
export function jSXIdentifier(name?: string): JSXIdentifier;
+11 -11
View File
@@ -1609,7 +1609,7 @@ declare namespace BABYLON {
private _trackConvolver;
private _scene;
id: number;
soundCollection: Array<Sound>;
soundCollection: Sound[];
private _isMainTrack;
private _connectedAnalyser;
private _options;
@@ -2164,7 +2164,7 @@ declare namespace BABYLON {
boxMinimum: number[];
boxMaximum: number[];
worldMatrixFromCache: any;
subMeshes: Array<SerializedSubMesh>;
subMeshes: SerializedSubMesh[];
checkCollisions: boolean;
}
interface SerializedSubMesh {
@@ -4153,7 +4153,7 @@ declare namespace BABYLON {
* @param type the type of simplification to run.
* @param successCallback optional success callback to be called after the simplification finished processing all settings.
*/
simplify(settings: Array<ISimplificationSettings>, parallelProcessing?: boolean, simplificationType?: SimplificationType, successCallback?: (mesh?: Mesh, submeshIndex?: number) => void): void;
simplify(settings: ISimplificationSettings[], parallelProcessing?: boolean, simplificationType?: SimplificationType, successCallback?: (mesh?: Mesh, submeshIndex?: number) => void): void;
/**
* Optimization of the mesh's indices, in case a mesh has duplicated vertices.
* The function will only reorder the indices and will not remove unused vertices to avoid problems with submeshes.
@@ -4227,12 +4227,12 @@ declare namespace BABYLON {
static Center(meshesOrMinMaxVector: any): Vector3;
/**
* Merge the array of meshes into a single mesh for performance reasons.
* @param {Array<Mesh>} meshes - The vertices source. They should all be of the same material. Entries can empty
* @param {Mesh[]} meshes - The vertices source. They should all be of the same material. Entries can empty
* @param {boolean} disposeSource - When true (default), dispose of the vertices from the source meshes
* @param {boolean} allow32BitsIndices - When the sum of the vertices > 64k, this must be set to true.
* @param {Mesh} meshSubclass - When set, vertices inserted into this Mesh. Meshes can then be merged into a Mesh sub-class.
*/
static MergeMeshes(meshes: Array<Mesh>, disposeSource?: boolean, allow32BitsIndices?: boolean, meshSubclass?: Mesh): Mesh;
static MergeMeshes(meshes: Mesh[], disposeSource?: boolean, allow32BitsIndices?: boolean, meshSubclass?: Mesh): Mesh;
}
}
@@ -4648,7 +4648,7 @@ declare namespace BABYLON {
constructor(quality: number, distance: number, optimizeMesh?: boolean);
}
interface ISimplificationTask {
settings: Array<ISimplificationSettings>;
settings: ISimplificationSettings[];
simplificationType: SimplificationType;
mesh: Mesh;
successCallback?: () => void;
@@ -4671,7 +4671,7 @@ declare namespace BABYLON {
QUADRATIC = 0,
}
class DecimationTriangle {
vertices: Array<DecimationVertex>;
vertices: DecimationVertex[];
normal: Vector3;
error: number[];
deleted: boolean;
@@ -4679,7 +4679,7 @@ declare namespace BABYLON {
borderFactor: number;
deletePending: boolean;
originalOffset: number;
constructor(vertices: Array<DecimationVertex>);
constructor(vertices: DecimationVertex[]);
}
class DecimationVertex {
position: Vector3;
@@ -6034,8 +6034,8 @@ declare namespace BABYLON {
rootUrl: string;
sceneFilename: string;
loadedMeshes: AbstractMesh[];
loadedParticleSystems: Array<ParticleSystem>;
loadedSkeletons: Array<Skeleton>;
loadedParticleSystems: ParticleSystem[];
loadedSkeletons: Skeleton[];
onSuccess: (task: IAssetTask) => void;
onError: (task: IAssetTask) => void;
isCompleted: boolean;
@@ -6472,7 +6472,7 @@ declare namespace BABYLON.Internals {
declare namespace BABYLON {
interface IAnimatable {
animations: Array<Animation>;
animations: Animation[];
}
interface ISize {
width: number;
+1 -1
View File
@@ -120,7 +120,7 @@ declare namespace BabyParse {
*/
interface ParseResult {
data: any[];
errors: Array<ParseError>;
errors: ParseError[];
meta: ParseMeta;
}
interface ParserConstructor { new (config: ParseConfig): Parser; }
+2 -2
View File
@@ -26,10 +26,10 @@ declare namespace Microsoft.Maps.AdvancedShapes {
export class Polygon implements Entity {
constructor(locations: Array<Location>, options?: PolygonOptions);
constructor(locations: Location[], options?: PolygonOptions);
getFillColor(): Color;
getLocations(): Array<Location>;
getLocations(): Location[];
getStrokeColor(): Color;
getStrokeDashArray(): string;
getStrokeThickness(): number;
+12 -12
View File
@@ -50,10 +50,10 @@ declare namespace Microsoft.Maps.Directions {
export interface Disambiguation {
businessSuggestions?: Array<BusinessDisambiguationSuggestion>;
businessSuggestions?: BusinessDisambiguationSuggestion[];
hasMoreSuggestions?: boolean;
headerText?: string;
locationSuggestions?: Array<LocationDisambiguationSuggestion>;
locationSuggestions?: LocationDisambiguationSuggestion[];
}
export interface WaypointEventArgs {
@@ -149,7 +149,7 @@ declare namespace Microsoft.Maps.Directions {
avoidTraffic?: boolean;
distanceUnit?: DistanceUnit;
maxRoutes?: number;
routeAvoidance?: Array<RouteAvoidance>;
routeAvoidance?: RouteAvoidance[];
routeDraggable?: boolean;
routeIndex?: boolean;
routeMode?: RouteMode;
@@ -166,12 +166,12 @@ declare namespace Microsoft.Maps.Directions {
calculateDirections(): void;
clearDisplay(): void;
dispose(): void;
getAllWaypoints(): Array<Waypoint>;
getAllWaypoints(): Waypoint[];
getMap(): Map;
getNearbyMajorRoads(location: Location, callback: any, errorCallback: any, userData: any): void;
getRenderOptions(): DirectionsRenderOptions;
getRequestOptions(): DirectionsRequestOptions;
getRouteResult(): Array<Route>;
getRouteResult(): Route[];
removeWaypoint(waypoint: Waypoint): void;
removeWaypoint(index: number): void;
resetDirections(options: ResetDirectionsOptions): void;
@@ -197,8 +197,8 @@ declare namespace Microsoft.Maps.Directions {
}
export interface DirectionsEventArgs {
routeSummary: Array<RouteSummary>;
route: Array<Route>;
routeSummary: RouteSummary[];
route: Route[];
}
export interface DisambiguationRenderEventArgs {
@@ -232,7 +232,7 @@ declare namespace Microsoft.Maps.Directions {
export interface DirectionsStep {
childItineraryItems: Array<DirectionsStep>;
childItineraryItems: DirectionsStep[];
coordinate: Location;
distance: string;
durationInSeconds: number;
@@ -249,7 +249,7 @@ declare namespace Microsoft.Maps.Directions {
transitStepIcon: string;
transitStopId: string;
transitTerminus: string;
warnings: Array<DirectionsStepWarning>;
warnings: DirectionsStepWarning[];
}
export enum IconType {
@@ -360,17 +360,17 @@ declare namespace Microsoft.Maps.Directions {
}
export interface Route {
routeLegs: Array<RouteLeg>;
routeLegs: RouteLeg[];
}
export interface RouteLeg {
endTime: Date;
endWaypointLocation: Location;
itineraryItems: Array<DirectionsStep>;
itineraryItems: DirectionsStep[];
originalRouteIndex: number;
startTime: Date;
startWaypointLocation: Location;
subLegs: Array<RouteSubLeg>;
subLegs: RouteSubLeg[];
summary: RouteSummary;
}
+6 -6
View File
@@ -36,7 +36,7 @@ declare namespace Microsoft.Maps.Search {
parsedAddress: Address;
parsedKeyword: string;
parsedSeparator: string;
results: Array<PlaceResult>;
results: PlaceResult[];
}
export enum LocationPrecision {
@@ -62,7 +62,7 @@ declare namespace Microsoft.Maps.Search {
export interface PlaceResult {
bestView: LocationRect;
location: GeocodeLocation;
locations: Array<GeocodeLocation>;
locations: GeocodeLocation[];
matchCode: MatchCode;
matchConfidence: MatchConfidence;
name: string;
@@ -93,7 +93,7 @@ declare namespace Microsoft.Maps.Search {
export interface SearchRegion {
address: Address;
geocodeLocations: Array<GeocodeLocation>;
geocodeLocations: GeocodeLocation[];
explicitLocation: GeocodeLocation;
mapBounds: LocationRect;
matchCode: MatchCode;
@@ -115,12 +115,12 @@ declare namespace Microsoft.Maps.Search {
}
export interface SearchResponse {
alternateSearchRegions: Array<SearchRegion>;
alternateSearchRegions: SearchRegion[];
hasMore: boolean;
parseResults: Array<SearchParseResult>;
parseResults: SearchParseResult[];
responseSummary: SearchResponseSummary;
searchRegion: SearchRegion;
searchResults: Array<SearchResult>;
searchResults: SearchResult[];
}
export interface SearchResponseSummary {
+7 -7
View File
@@ -40,12 +40,12 @@ declare namespace Microsoft.Maps.VenueMaps {
export interface Floor {
name: string;
primitives: Array<Primitive>;
primitives: Primitive[];
zoomRange: number[];
}
export interface Footprint {
polygons: Array<Polygon>;
polygons: Polygon[];
zoomRange: number[];
}
@@ -54,7 +54,7 @@ declare namespace Microsoft.Maps.VenueMaps {
CenterLongitude: number;
DefaultFloor: string;
FloorHeader: string;
Floors: Array<Floor>;
Floors: Floor[];
Footprint: Footprint;
MapId: string;
MapType: string;
@@ -68,7 +68,7 @@ declare namespace Microsoft.Maps.VenueMaps {
}
export interface NearbyVenueOptions {
callback?: (maps: Array<VenueMap>) => any;
callback?: (maps: VenueMap[]) => any;
location?: Location;
map?: Map;
radius?: number;
@@ -77,7 +77,7 @@ declare namespace Microsoft.Maps.VenueMaps {
export interface Polygon {
bounds: LocationRect;
center: Location;
locations: Array<Location>;
locations: Location[];
}
export interface Primitive {
@@ -89,7 +89,7 @@ declare namespace Microsoft.Maps.VenueMaps {
center: Location;
floor: Floor;
id: string;
locations: Array<Location>;
locations: Location[];
name: string;
highlight(): void;
@@ -105,7 +105,7 @@ declare namespace Microsoft.Maps.VenueMaps {
defaultFloor: string;
directory: Directory;
floorHeader: string;
floors: Array<Floor>;
floors: Floor[];
footprint: Footprint;
id: string;
name: string;
+9 -9
View File
@@ -36,7 +36,7 @@ declare namespace Microsoft.Maps {
static fromCorners(northwest: Location, southeast: Location): LocationRect;
static fromEdges(north: number, west: number, south: number, east: number, altitude: number, altitudeReference: AltitudeReference): LocationRect;
static fromLocations(locations: Array<Location>): LocationRect;
static fromLocations(locations: Location[]): LocationRect;
static fromString(value: string): LocationRect;
clone(): LocationRect;
@@ -139,9 +139,9 @@ declare namespace Microsoft.Maps {
setOptions(options: MapOptions): void;
setView(options: ViewOptions): void;
tryLocationToPixel(locations: Location, reference?: PixelReference): Point;
tryLocationToPixel(locations: Array<Location>, reference?: PixelReference): Array<Point>;
tryLocationToPixel(locations: Location[], reference?: PixelReference): Point[];
tryPixelToLocation(points: Point, reference?: PixelReference): Location;
tryPixelToLocation(points: Array<Point>, reference?: PixelReference): Array<Location>;
tryPixelToLocation(points: Point[], reference?: PixelReference): Location[];
}
export class MapMode {
@@ -327,7 +327,7 @@ declare namespace Microsoft.Maps {
export interface InfoboxOptions {
actions?: Array<Action>;
actions?: Action[];
description?: string;
htmlContent?: string;
id?: string;
@@ -355,14 +355,14 @@ declare namespace Microsoft.Maps {
export class Polyline implements Entity {
constructor(locations: Array<Location>, options?: PolylineOptions);
constructor(locations: Location[], options?: PolylineOptions);
getLocations(): Array<Location>;
getLocations(): Location[];
getStrokeColor(): Color;
getStrokeDashArray(): string;
getStrokeThickness(): number;
getVisible(): boolean;
setLocations(locations: Array<Location>): void;
setLocations(locations: Location[]): void;
setOptions(options: PolylineOptions): void;
toString(): string;
}
@@ -381,10 +381,10 @@ declare namespace Microsoft.Maps {
export class Polygon implements Entity {
constructor(locations: Array<Location>, options?: PolygonOptions);
constructor(locations: Location[], options?: PolygonOptions);
getFillColor(): Color;
getLocations(): Array<Location>;
getLocations(): Location[];
getStrokeColor(): Color;
getStrokeDashArray(): string;
getStrokeThickness(): number;
@@ -43,8 +43,8 @@ export interface DatetimepickerOptions {
collapse?: boolean;
language?: string;
defaultDate?: moment.Moment | Date | string;
disabledDates?: Array<moment.Moment | Date | string>;
enabledDates?: Array<moment.Moment | Date | string>;
disabledDates?: (moment.Moment | Date | string)[];
enabledDates?: (moment.Moment | Date | string)[];
icons?: DatetimepickerIcons;
useStrict?: boolean;
direction?: string;
+9 -9
View File
@@ -105,7 +105,7 @@ export interface Datetimepicker {
*/
defaultDate(date: string | Date | moment.Moment | boolean): void;
/**Returns the options.disabledDates option.
* NOTES: probably should be: disabledDates(): boolean | Array<moment.Moment>; see: DatetimepickerOptions
* NOTES: probably should be: disabledDates(): boolean | moment.Moment[]; see: DatetimepickerOptions
*/
disabledDates(): boolean | any;
/**Takes an array of values and disallows the user to select those days.
@@ -113,7 +113,7 @@ export interface Datetimepicker {
* Also calling this function removes the configuration of options.enabledDates if such exist.
* Note: These values are matched with Day granularity.
*/
disabledDates(dates: boolean | Array<string | Date | moment.Moment>): void;
disabledDates(dates: boolean | (string | Date | moment.Moment)[]): void;
/**Returns the options.disabledHours option.
* NOTES: probably should be: disabledHours(): boolean | number[]; see: DatetimepickerOptions
*/
@@ -126,13 +126,13 @@ export interface Datetimepicker {
* eg { "0": [<moment.Moment1>, <moment.Moment2>], "1": [...] }
* https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1498
*/
disabledTimeIntervals(): boolean | Array<Array<moment.Moment>>;
disabledTimeIntervals(): boolean | moment.Moment[][];
/**Disables time selection between the given moments
* eg: [[moment({ h: 0 }), moment({ h: 8 })], [moment({ h: 18 }), moment({ h: 24 })]]
*/
disabledTimeIntervals(value: boolean | Array<Array<moment.Moment>>): void;
disabledTimeIntervals(value: boolean | moment.Moment[][]): void;
/**Returns the options.enabledDates option
* NOTES: probably should be: enabledDates(): boolean | Array<moment.Moment>; see: DatetimepickerOptions
* NOTES: probably should be: enabledDates(): boolean | moment.Moment[]; see: DatetimepickerOptions
*/
enabledDates(): boolean | any;
/**Takes an array of values and allows the user to select only from those days.
@@ -140,7 +140,7 @@ export interface Datetimepicker {
* Also calling this function removes the configuration of options.disabledDates if such exist.
* Note: These values are matched with Day granularity.
*/
enabledDates(dates: boolean | Array<string | Date | moment.Moment>): void;
enabledDates(dates: boolean | (string | Date | moment.Moment)[]): void;
/**Returns the options.enabledHours option.
* NOTES: probably should be: enabledHours(): boolean | number[]; see: DatetimepickerOptions
*/
@@ -334,7 +334,7 @@ export interface DatetimepickerOptions {
* eg disabledDates = ["2010-10-10"]; -> disabledDated will be { "2010-01-01": true }
* https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1499
*/
disabledDates?: boolean | Array<moment.Moment | Date | string> | any;
disabledDates?: boolean | (moment.Moment | Date | string)[] | any;
/**Will allow or disallow hour selections (much like disabledTimeIntervals) but will affect all days
* @default: false
* IMPORTANT! The getter returns an Object NOT an Array, with keys being the hours, values being true.
@@ -346,14 +346,14 @@ export interface DatetimepickerOptions {
* eg: [[moment({ h: 0 }), moment({ h: 8 })], [moment({ h: 18 }), moment({ h: 24 })]]
* @default: false
*/
disabledTimeIntervals?: boolean | Array<Array<moment.Moment>>;
disabledTimeIntervals?: boolean | moment.Moment[][];
/**Disables selection of dates NOT in the array, e.g. holidays
* @default: false
* IMPORTANT! The getter returns an Object NOT an Array, with keys being the dates, values being true.
* eg enabledDates = ["2010-10-10"]; -> enabledDated will be { "2010-01-01": true }
* https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1499
*/
enabledDates?: boolean | Array<moment.Moment | Date | string> | any;
enabledDates?: boolean | (moment.Moment | Date | string)[] | any;
/**Will allow or disallow hour selections (much like disabledTimeIntervals) but will affect all days
* @default: false
* IMPORTANT! The getter returns an Object NOT an Array, with keys being the hours, values being true.
+1 -1
View File
@@ -139,7 +139,7 @@ declare class ByteBuffer {
/**
* Concatenates multiple ByteBuffers into one.
*/
static concat( buffers: Array<ByteBuffer | ArrayBuffer | Uint8Array | string>, encoding?: string | boolean, litteEndian?: boolean, noAssert?: boolean ): ByteBuffer;
static concat( buffers: (ByteBuffer | ArrayBuffer | Uint8Array | string)[], encoding?: string | boolean, litteEndian?: boolean, noAssert?: boolean ): ByteBuffer;
/**
* Decodes a base64 encoded string to a ByteBuffer.
+12 -12
View File
@@ -10,7 +10,7 @@ export as namespace c3;
declare namespace c3 {
type PrimitiveArray = Array<string | boolean | number>;
type PrimitiveArray = (string | boolean | number)[];
type FormatFunction = (v: any, id: string, i: number, j: number) => void;
interface TargetIds {
@@ -124,7 +124,7 @@ declare namespace c3 {
* This option accepts array including object that has axis, start, end and class. The keys start, end and class are optional.
* axis must be x, y or y2. start and end should be the value where regions start and end. If not specified, the edge values will be used. If timeseries x axis, date string, Date object and unixtime integer can be used. If class is set, the region element will have it as class.
*/
regions?: Array<RegionOptions>;
regions?: RegionOptions[];
legend?: LegendOptions;
@@ -262,11 +262,11 @@ declare namespace c3 {
/**
* Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order.
*/
rows?: Array<PrimitiveArray>;
rows?: PrimitiveArray[];
/*
* Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values.
*/
columns?: Array<PrimitiveArray>;
columns?: PrimitiveArray[];
/**
* Used if loading JSON via data.url
*/
@@ -304,7 +304,7 @@ declare namespace c3 {
/**
* Set groups for the data for stacking.
*/
groups?: Array<string[]>;
groups?: string[][];
/**
* Set y axis the data related to. y and y2 can be used.
*/
@@ -586,7 +586,7 @@ declare namespace c3 {
* This option accepts array including object that has value, text, position and class. text, position and class are optional. For position, start, middle and end (default) are available.
* If x axis is category axis, value can be category name. If x axis is timeseries axis, value can be date string, Date object and unixtime integer.
*/
lines?: Array<LineOptions>;
lines?: LineOptions[];
};
y?: {
/**
@@ -597,7 +597,7 @@ declare namespace c3 {
* Show additional grid lines along y axis.
* This option accepts array including object that has value, text, position and class.
*/
lines?: Array<LineOptions>;
lines?: LineOptions[];
};
}
@@ -825,8 +825,8 @@ declare namespace c3 {
url?: string;
json?: Object;
keys?: { x?: string; value: string[]; }
rows?: Array<PrimitiveArray>;
columns?: Array<PrimitiveArray>;
rows?: PrimitiveArray[];
columns?: PrimitiveArray[];
classes?: { [key: string]: string };
categories?: string[];
axes?: { [key: string]: string };
@@ -856,8 +856,8 @@ declare namespace c3 {
flow(args: {
json?: Object;
keys?: { x?: string; value: string[]; }
rows?: Array<PrimitiveArray>;
columns?: Array<PrimitiveArray>;
rows?: PrimitiveArray[];
columns?: PrimitiveArray[];
to?: any;
length?: number;
duration?: number;
@@ -891,7 +891,7 @@ declare namespace c3 {
* Update groups for the targets.
* @param groups This argument needs to be an Array that includes one or more Array that includes target ids to be grouped.
*/
groups(groups: Array<string[]>): void;
groups(groups: string[][]): void;
xgrids: GridOperations;
+2 -2
View File
@@ -370,7 +370,7 @@ declare namespace CacheFactory {
* Call.removeExpired() on all registered caches.Returns a hash of any expired items, keyed by cache id.
* @returns {}
*/
removeExpiredFromAll(): Array<{ [key: string]: Array<{ [key: string]: any }> }>;
removeExpiredFromAll(): { [key: string]: { [key: string]: any }[] }[];
}
export interface IUtils {
@@ -391,7 +391,7 @@ declare namespace CacheFactory {
export interface IBinaryHeap {
(w?: IWeightFunc, c?: ICompareFunc): void;
heap: Array<HeapItem>;
heap: HeapItem[];
weightFunc: IWeightFunc;
compareFunc: ICompareFunc;
+1 -1
View File
@@ -198,7 +198,7 @@ declare namespace CanvasGauges {
public pixelRatio: number;
public static redraw(): any;
public static collection: Array<SmartCanvas>;
public static collection: SmartCanvas[];
}
export class DomObserver {
+21 -21
View File
@@ -47,8 +47,8 @@ export namespace policies {
}
interface DCAwareRoundRobinPolicy extends LoadBalancingPolicy {
localHostsArray: Array<Host>;
remoteHostsArray: Array<Host>;
localHostsArray: Host[];
remoteHostsArray: Host[];
}
interface RoundRobinPolicyStatic {
@@ -346,15 +346,15 @@ export namespace types {
warnings: string[],
customPayload: any
};
rows: Array<Row>;
rows: Row[];
rowLength: number;
columns: Array<{ [key: string]: string; }>;
columns: { [key: string]: string }[];
pageState: string;
nextPage: any; // function
first(): Row;
getPageState(): string;
getColumns(): Array<{ [key: string]: string; }>;
getColumns(): { [key: string]: string }[];
}
interface ResultStreamStatic {
@@ -370,12 +370,12 @@ export namespace types {
}
interface RowStatic {
new (columns: Array<{ [key: string]: string; }>): Row;
new (columns: { [key: string]: string }[]): Row;
}
interface Row {
get(columnName: string | number): { [key: string]: any; };
values(): Array<{ [key: string]: any; }>;
values(): { [key: string]: any; }[];
keys(): string[];
forEach(callback: Callback): void;
}
@@ -489,7 +489,7 @@ export interface QueryOptions {
retry?: policies.retry.RetryPolicy;
retryOnTimeout?: boolean;
routingIndexes?: number[];
routingKey?: Buffer | Array<Buffer>;
routingKey?: Buffer | Buffer[];
routingNames?: string[];
serialConsistency?: number;
timestamp?: number | _Long;
@@ -505,7 +505,7 @@ export interface Client extends events.EventEmitter {
keyspace: string;
metadata: metadata.Metadata;
batch(queries: string[] | Array<{ query: string, params?: any }>, options: QueryOptions, callback: ResultCallback): void;
batch(queries: string[] | { query: string, params?: any }[], options: QueryOptions, callback: ResultCallback): void;
connect(callback: Callback): void;
eachRow(query: string, params?: any, options?: QueryOptions, rowCallback?: Callback, callback?: Callback): void;
execute(query: string, params?: any, options?: QueryOptions, callback?: ResultCallback): void;
@@ -543,7 +543,7 @@ export interface HostMap extends events.EventEmitter {
remove(key: string): void;
removeMultiple(keys: string[]): void;
set(key: string, value: Host): void;
values(): Array<Host>;
values(): Host[];
}
export interface EncoderStatic {
@@ -629,7 +629,7 @@ export namespace metadata {
}
interface Aggregate {
argumentTypes: Array<{ code: number, info: any }>;
argumentTypes: { code: number, info: any }[];
finalFunction: string;
initCondition: string;
keyspaceName: string;
@@ -641,7 +641,7 @@ export namespace metadata {
interface DataTypeInfo {
code: number;
info: string | DataTypeInfo | Array<DataTypeInfo>;
info: string | DataTypeInfo | DataTypeInfo[];
options: {
frozen: boolean,
reversed: boolean
@@ -656,9 +656,9 @@ export namespace metadata {
interface DataCollection {
bloomFilterFalsePositiveChance: number;
caching: caching;
clusterKeys: Array<{ c: ColumnInfo, index: number, order: string }>;
clusterKeys: { c: ColumnInfo, index: number, order: string }[];
clusteringOrder: string[];
columns: Array<ColumnInfo>;
columns: ColumnInfo[];
columnsByName: { [key: string]: ColumnInfo };
comment: string;
compactionClass: string;
@@ -672,7 +672,7 @@ export namespace metadata {
maxIndexInterval?: number;
minIndexInterval?: number;
name: string;
partitionKeys: Array<{ c: ColumnInfo, index: number }>;
partitionKeys: { c: ColumnInfo, index: number }[];
populateCacheOnFlush: boolean;
readRepairChance: number;
speculateRetry: string;
@@ -687,8 +687,8 @@ export namespace metadata {
interface IndexStatic {
new (name: string, target: string, kind: IndexType, options: Object): Index;
fromRows(indexRows: Array<types.Row>): Array<Index>;
fromColumnRows(columnRows: Array<types.Row>, columnsByName: { [key: string]: ColumnInfo }): Array<Index>;
fromRows(indexRows: types.Row[]): Index[];
fromColumnRows(columnRows: types.Row[], columnsByName: { [key: string]: ColumnInfo }): Index[];
}
interface Index {
@@ -715,9 +715,9 @@ export namespace metadata {
interface Metadata {
clearPrepared(): void;
getAggregate(keyspaceName: string, name: string, signature: string[] | Array<{ code: number, info: any }>, callback: Callback): void;
getAggregate(keyspaceName: string, name: string, signature: string[] | { code: number, info: any }[], callback: Callback): void;
getAggregates(keyspaceName: string, name: string, callback: Callback): void;
getFunction(keyspaceName: string, name: string, signature: string[] | Array<{ code: number, info: any }>, callback: Callback): void;
getFunction(keyspaceName: string, name: string, signature: string[] | { code: number, info: any }[], callback: Callback): void;
getFunctions(keyspaceName: string, name: string, callback: Callback): void;
getMaterializedView(keyspaceName: string, name: string, callback: Callback): void;
getReplicas(keyspaceName: string, tokenBuffer: Buffer): any[];
@@ -734,7 +734,7 @@ export namespace metadata {
interface SchemaFunction {
argumentNames: string[];
argumentTypes: Array<{ code: number, info: any }>;
argumentTypes: { code: number, info: any }[];
body: string;
calledOnNullInput: boolean;
keyspaceName: string;
@@ -749,7 +749,7 @@ export namespace metadata {
}
interface TableMetadata extends DataCollection {
indexes: Array<Index>;
indexes: Index[];
indexInterval?: number;
isCompact: boolean;
memtableFlushPeriod: number;
+1 -1
View File
@@ -10,7 +10,7 @@ export function fail(message: string): void;
/** Returns the total number of assertions created using the expect() method. */
export function count(): number;
/** Returns an array of the locations where incomplete assertions were declared or null if no incomplete assertions found. */
export function incomplete(): Array<string> | null;
export function incomplete(): string[] | null;
/** Returns the filename, line number, and column number of where the error was created. */
export function thrownAt(error?: Error): CodeError;
/** Configure code. */
+4 -4
View File
@@ -106,7 +106,7 @@ export function extent<T extends Numeric>(array: T[]): [T, T] | [undefined, unde
/**
* Return the min and max simultaneously.
*/
export function extent<T extends Numeric>(array: Array<T | Primitive>): [T | Primitive, T | Primitive] | [undefined, undefined];
export function extent<T extends Numeric>(array: (T | Primitive)[]): [T | Primitive, T | Primitive] | [undefined, undefined];
/**
* Return the min and max simultaneously.
@@ -224,7 +224,7 @@ export function merge<T>(arrays: T[][]): T[];
* For each adjacent pair of elements in the specified array, returns a new array of tuples of elements i and i - 1.
* Returns the empty array if the input array has fewer than two elements.
*/
export function pairs<T>(array: T[]): Array<[T, T]>;
export function pairs<T>(array: T[]): [T, T][];
/**
* Given the specified array, return an array corresponding to the list of indices in 'keys'.
@@ -282,7 +282,7 @@ export function zip<T>(...arrays: T[][]): T[][];
// Histogram
// --------------------------------------------------------------------------------------
export interface Bin<Datum, Value extends number | Date> extends Array<Datum> {
export interface Bin<Datum, Value extends number | Date> extends Datum[] {
x0: Value;
x1: Value;
}
@@ -300,7 +300,7 @@ export type ThresholdArrayGenerator<Value extends number | Date> = (values: Valu
export interface HistogramGenerator<Datum, Value extends number | Date> {
(data: Datum[]): Array<Bin<Datum, Value>>;
(data: Datum[]): Bin<Datum, Value>[];
value(): (d: Datum, i: number, data: Datum[]) => Value;
value(valueAccessor: (d: Datum, i: number, data: Datum[]) => Value): this;
domain(): (values: Value[]) => [Value, Value];
+1 -1
View File
@@ -28,7 +28,7 @@ export interface ChordGroup {
}
export interface Chords extends Array<Chord> {
groups: Array<ChordGroup>;
groups: ChordGroup[];
}
export interface ChordLayout {
+9 -9
View File
@@ -20,8 +20,8 @@ export function keys(object: Object): string[];
export function values<T>(object: { [key: string]: T }): T[];
export function values(object: Object): any[];
export function entries<T>(object: { [key: string]: T }): Array<{ key: string, value: T }>;
export function entries(object: Object): Array<{ key: string, value: any }>;
export function entries<T>(object: { [key: string]: T }): { key: string, value: T }[];
export function entries(object: Object): { key: string, value: any }[];
// ---------------------------------------------------------------------
// map / Map
@@ -36,7 +36,7 @@ export interface Map<T> {
clear(): void;
keys(): string[];
values(): T[];
entries(): Array<{ key: string, value: T }>;
entries(): { key: string, value: T }[];
each(func: (value: T, key: string, map: Map<T>) => void): void;
empty(): boolean;
size(): number;
@@ -73,7 +73,7 @@ export interface Set {
export function set(): Set;
export function set(d3Set: Set): Set;
export function set(array: Array<string | Stringifiable>): Set;
export function set(array: (string | Stringifiable)[]): Set;
export function set<T>(array: T[], key: (value: T, index?: number, array?: T[]) => string): Set;
// ---------------------------------------------------------------------
@@ -93,14 +93,14 @@ export function set<T>(array: T[], key: (value: T, index?: number, array?: T[])
// Also note, that the below return types for Nest.entries(...), Nest.map(...) and Nest.object(...) strictly only work,
// if AT LEAST ONE KEY was set. This seems a reasonable constraint in practice, given the intent of the nest operator.
// Otherwise, an additional '| Array<Datum> | RollupType` would have to be added to the union type. This would cover
// Otherwise, an additional '| Datum[] | RollupType` would have to be added to the union type. This would cover
// cases (a) without key or rollup (b) without key but with rollup. However, again, the union types make it cumbersome
// without much gain.
export interface NestedArray<Datum, RollupType> extends Array<{ key: string, values: NestedArray<Datum, RollupType> | Array<Datum> | undefined, value: RollupType | undefined }> { }
export interface NestedMap<Datum, RollupType> extends Map<NestedMap<Datum, RollupType> | Array<Datum> | RollupType> { }
export interface NestedArray<Datum, RollupType> extends Array<{ key: string, values: NestedArray<Datum, RollupType> | Datum[] | undefined, value: RollupType | undefined }> { }
export interface NestedMap<Datum, RollupType> extends Map<NestedMap<Datum, RollupType> | Datum[] | RollupType> { }
export interface NestedObject<Datum, RollupType> {
[key: string]: NestedObject<Datum, RollupType> | Array<Datum> | RollupType;
[key: string]: NestedObject<Datum, RollupType> | Datum[] | RollupType;
}
interface Nest<Datum, RollupType> {
@@ -110,7 +110,7 @@ interface Nest<Datum, RollupType> {
rollup(func: (values: Datum[]) => RollupType): this;
map(array: Datum[]): Map<any>; // more specifically it returns NestedMap<Datum, RollupType>
object(array: Datum[]): { [key: string]: any }; // more specifically it returns NestedObject<Datum, RollupType>
entries(array: Datum[]): Array<{ key: string; values: any; value: RollupType | undefined }>; // more specifically it returns NestedArray<Datum, RollupType>
entries(array: Datum[]): { key: string; values: any; value: RollupType | undefined }[]; // more specifically it returns NestedArray<Datum, RollupType>
}
export function nest<Datum>(): Nest<Datum, undefined>;
+9 -9
View File
@@ -31,12 +31,12 @@ export function csvParse<ParsedRow extends DSVRowAny>(csvString: string, row: (r
// csvParseRows(...) ========================================================================
export function csvParseRows(csvString: string): string[][];
export function csvParseRows<ParsedRow extends DSVRowAny>(csvString: string, row: (rawRow: string[], index: number) => ParsedRow): Array<ParsedRow>;
export function csvParseRows<ParsedRow extends DSVRowAny>(csvString: string, row: (rawRow: string[], index: number) => ParsedRow): ParsedRow[];
// csvFormat(...) ============================================================================
export function csvFormat(rows: Array<DSVRowAny>): string;
export function csvFormat(rows: Array<DSVRowAny>, columns: string[]): string;
export function csvFormat(rows: DSVRowAny[]): string;
export function csvFormat(rows: DSVRowAny[], columns: string[]): string;
// csvFormatRows(...) ========================================================================
@@ -54,12 +54,12 @@ export function tsvParse<MappedRow extends DSVRowAny>(tsvString: string, row: (r
// tsvParseRows(...) ========================================================================
export function tsvParseRows(tsvString: string): string[][];
export function tsvParseRows<MappedRow extends DSVRowAny>(tsvString: string, row: (rawRow: string[], index: number) => MappedRow): Array<MappedRow>;
export function tsvParseRows<MappedRow extends DSVRowAny>(tsvString: string, row: (rawRow: string[], index: number) => MappedRow): MappedRow[];
// tsvFormat(...) ============================================================================
export function tsvFormat(rows: Array<DSVRowAny>): string;
export function tsvFormat(rows: Array<DSVRowAny>, columns: string[]): string;
export function tsvFormat(rows: DSVRowAny[]): string;
export function tsvFormat(rows: DSVRowAny[], columns: string[]): string;
// tsvFormatRows(...) ========================================================================
@@ -73,9 +73,9 @@ export interface DSV {
parse(dsvString: string): DSVParsedArray<DSVRowString>;
parse<ParsedRow extends DSVRowAny>(dsvString: string, row: (rawRow: DSVRowString, index: number, columns: string[]) => ParsedRow): DSVParsedArray<ParsedRow>;
parseRows(dsvString: string): string[][];
parseRows<ParsedRow extends DSVRowAny>(dsvString: string, row: (rawRow: string[], index: number) => ParsedRow): Array<ParsedRow>;
format(rows: Array<DSVRowAny>): string;
format(rows: Array<DSVRowAny>, columns: string[]): string;
parseRows<ParsedRow extends DSVRowAny>(dsvString: string, row: (rawRow: string[], index: number) => ParsedRow): ParsedRow[];
format(rows: DSVRowAny[]): string;
format(rows: DSVRowAny[], columns: string[]): string;
formatRows(rows: string[][]): string;
}
+29 -29
View File
@@ -114,7 +114,7 @@ export interface Simulation<NodeDatum extends SimulationNodeDatum, LinkDatum ext
/**
* Returns the simulation’s array of nodes as specified to the constructor.
*/
nodes(): Array<NodeDatum>;
nodes(): NodeDatum[];
/**
* Set the simulation’s nodes to the specified array of objects, initialize their positions and velocities if necessary,
* and then re-initialize any bound forces; Returns the simulation.
@@ -142,7 +142,7 @@ export interface Simulation<NodeDatum extends SimulationNodeDatum, LinkDatum ext
* this method must be called again with the new (or changed) array to notify the simulation and bound forces of the change;
* the simulation does not make a defensive copy of the specified array.
*/
nodes(nodesData: Array<NodeDatum>): this;
nodes(nodesData: NodeDatum[]): this;
/**
* Return the current alpha of the simulation, which defaults to 1.
@@ -307,7 +307,7 @@ export interface Simulation<NodeDatum extends SimulationNodeDatum, LinkDatum ext
*
* @param nodesData Optional array of nodes data, defaults to empty array.
*/
export function forceSimulation<NodeDatum extends SimulationNodeDatum>(nodesData?: Array<NodeDatum>): Simulation<NodeDatum, undefined>;
export function forceSimulation<NodeDatum extends SimulationNodeDatum>(nodesData?: NodeDatum[]): Simulation<NodeDatum, undefined>;
/**
* Create a new simulation with the specified array of nodes and no forces.
* If nodes is not specified, it defaults to the empty array.
@@ -321,7 +321,7 @@ export function forceSimulation<NodeDatum extends SimulationNodeDatum>(nodesData
*
* @param nodesData Optional array of nodes data, defaults to empty array.
*/
export function forceSimulation<NodeDatum extends SimulationNodeDatum, LinkDatum extends SimulationLinkDatum<NodeDatum>>(nodesData?: Array<NodeDatum>): Simulation<NodeDatum, LinkDatum>;
export function forceSimulation<NodeDatum extends SimulationNodeDatum, LinkDatum extends SimulationLinkDatum<NodeDatum>>(nodesData?: NodeDatum[]): Simulation<NodeDatum, LinkDatum>;
// ----------------------------------------------------------------------
// Forces
@@ -351,7 +351,7 @@ export interface Force<NodeDatum extends SimulationNodeDatum, LinkDatum extends
*
* A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
*/
initialize?(nodes: Array<NodeDatum>): void;
initialize?(nodes: NodeDatum[]): void;
}
@@ -421,7 +421,7 @@ export interface ForceCollide<NodeDatum extends SimulationNodeDatum> extends For
/**
* Returns the current radius accessor function.
*/
radius(): (node: NodeDatum, i: number, nodes: Array<NodeDatum>) => number;
radius(): (node: NodeDatum, i: number, nodes: NodeDatum[]) => number;
/**
* Set the radius used in collision detection to a constant number for each node.
*
@@ -444,7 +444,7 @@ export interface ForceCollide<NodeDatum extends SimulationNodeDatum> extends For
* @param radius A radius accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
* The function returns a radius.
*/
radius(radius: (node: NodeDatum, i: number, nodes: Array<NodeDatum>) => number): this;
radius(radius: (node: NodeDatum, i: number, nodes: NodeDatum[]) => number): this;
/**
* Return the current strength, which defaults to 0.7.
@@ -514,7 +514,7 @@ export function forceCollide<NodeDatum extends SimulationNodeDatum>(radius: numb
* @param radius A radius accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
* The function returns a radius.
*/
export function forceCollide<NodeDatum extends SimulationNodeDatum>(radius: (node: NodeDatum, i: number, nodes: Array<NodeDatum>) => number): ForceCollide<NodeDatum>;
export function forceCollide<NodeDatum extends SimulationNodeDatum>(radius: (node: NodeDatum, i: number, nodes: NodeDatum[]) => number): ForceCollide<NodeDatum>;
// Link ----------------------------------------------------------------
@@ -530,7 +530,7 @@ export interface ForceLink<NodeDatum extends SimulationNodeDatum, LinkDatum exte
* Return the current array of links, which defaults to the empty array.
*
*/
links(): Array<LinkDatum>;
links(): LinkDatum[];
/**
* Set the array of links associated with this force, recompute the distance and strength parameters for each link, and return this force.
*
@@ -546,12 +546,12 @@ export interface ForceLink<NodeDatum extends SimulationNodeDatum, LinkDatum exte
*
* @param links An array of link data.
*/
links(links: Array<LinkDatum>): this;
links(links: LinkDatum[]): this;
/**
* Return the current node id accessor, which defaults to the numeric index of the node.
*/
id(): (node: NodeDatum, i: number, nodesData: Array<NodeDatum>) => (string | number);
id(): (node: NodeDatum, i: number, nodesData: NodeDatum[]) => (string | number);
/**
* Set the node id accessor to the specified function and return this force.
*
@@ -565,12 +565,12 @@ export interface ForceLink<NodeDatum extends SimulationNodeDatum, LinkDatum exte
* being passed the node, its zero-based index and the complete array of nodes. It returns a string to represent the node id which can be used
* for matching link source and link target strings during the ForceLink initialization.
*/
id(id: (node: NodeDatum, i: number, nodesData: Array<NodeDatum>) => string): this;
id(id: (node: NodeDatum, i: number, nodesData: NodeDatum[]) => string): this;
/**
* Return the current distance accessor, which defaults to implying a default distance of 30.
*/
distance(): (link: LinkDatum, i: number, links: Array<LinkDatum>) => number;
distance(): (link: LinkDatum, i: number, links: LinkDatum[]) => number;
/**
* Set the distance accessor to use the specified constant number for all links,
* re-evaluates the distance accessor for each link, and returns this force.
@@ -595,13 +595,13 @@ export interface ForceLink<NodeDatum extends SimulationNodeDatum, LinkDatum exte
* @param distance A distance accessor function which is invoked for each link being passed the link,
* its zero-based index and the complete array of links. It returns the distance.
*/
distance(distance: (link: LinkDatum, i: number, links: Array<LinkDatum>) => number): this;
distance(distance: (link: LinkDatum, i: number, links: LinkDatum[]) => number): this;
/**
* Return the current strength accessor.
* For details regarding the default behavior see: {@link https://github.com/d3/d3-force#link_strength}
*/
strength(): (link: LinkDatum, i: number, links: Array<LinkDatum>) => number;
strength(): (link: LinkDatum, i: number, links: LinkDatum[]) => number;
/**
* Set the strenght accessor to use the specified constant number for all links,
* re-evaluates the strength accessor for each link, and returns this force.
@@ -626,7 +626,7 @@ export interface ForceLink<NodeDatum extends SimulationNodeDatum, LinkDatum exte
* @param strength A distance accessor function which is invoked for each link being passed the link,
* its zero-based index and the complete array of links. It returns the strength.
*/
strength(strength: (link: LinkDatum, i: number, links: Array<LinkDatum>) => number): this;
strength(strength: (link: LinkDatum, i: number, links: LinkDatum[]) => number): this;
/**
* Return the current iteration count which defaults to 1.
@@ -665,7 +665,7 @@ export function forceLink<NodeDatum extends SimulationNodeDatum, LinksDatum exte
*
* @param links An array of link data.
*/
export function forceLink<NodeDatum extends SimulationNodeDatum, LinksDatum extends SimulationLinkDatum<NodeDatum>>(links: Array<LinksDatum>): ForceLink<NodeDatum, LinksDatum>;
export function forceLink<NodeDatum extends SimulationNodeDatum, LinksDatum extends SimulationLinkDatum<NodeDatum>>(links: LinksDatum[]): ForceLink<NodeDatum, LinksDatum>;
// Many Body ----------------------------------------------------------------
@@ -684,7 +684,7 @@ export interface ForceManyBody<NodeDatum extends SimulationNodeDatum> extends Fo
*
* For details regarding the default behavior see: {@link https://github.com/d3/d3-force#manyBody_strength}
*/
strength(): (d: NodeDatum, i: number, data: Array<NodeDatum>) => number;
strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
/**
* Set the strength accessor to the specified constant strength for all nodes, re-evaluates the strength accessor for each node, and
* returns this force.
@@ -719,7 +719,7 @@ export interface ForceManyBody<NodeDatum extends SimulationNodeDatum> extends Fo
* @param strength A strength accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
* The function returns the strength.
*/
strength(strength: (d: NodeDatum, i: number, data: Array<NodeDatum>) => number): this;
strength(strength: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this;
/**
* Return the current value of the Barnes–Hut approximation criterion , which defaults to 0.9
@@ -801,7 +801,7 @@ export interface ForceX<NodeDatum extends SimulationNodeDatum> extends Force<Nod
/**
* Returns the current strength accessor, which defaults to a constant strength for all nodes of 0.1.
*/
strength(): (d: NodeDatum, i: number, data: Array<NodeDatum>) => number;
strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
/**
* Set the strength accessor to the specified constant strength for all nodes, re-evaluates the strength accessor for each node, and returns this force.
*
@@ -838,12 +838,12 @@ export interface ForceX<NodeDatum extends SimulationNodeDatum> extends Force<Nod
* @param strength A strength accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
* The function returns the strength.
*/
strength(strength: (d: NodeDatum, i: number, data: Array<NodeDatum>) => number): this;
strength(strength: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this;
/**
* Return the current x-accessor, which defaults to a function returning 0 for all nodes.
*/
x(): (d: NodeDatum, i: number, data: Array<NodeDatum>) => number;
x(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
/**
* Set the x-coordinate accessor to the specified number, re-evaluates the x-accessor for each node,
* and returns this force.
@@ -868,7 +868,7 @@ export interface ForceX<NodeDatum extends SimulationNodeDatum> extends Force<Nod
* @param x A x-coordinate accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
* The function returns the x-coordinate.
*/
x(x: (d: NodeDatum, i: number, data: Array<NodeDatum>) => number): this;
x(x: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this;
}
/**
@@ -906,7 +906,7 @@ export function forceX<NodeDatum extends SimulationNodeDatum>(x: number): ForceX
* @param x A x-coordinate accessor function which is invoked for each node in the simulation, being passed the node and its zero-based index.
* The function returns the x-coordinate.
*/
export function forceX<NodeDatum extends SimulationNodeDatum>(x: (d: NodeDatum, i: number, data: Array<NodeDatum>) => number): ForceX<NodeDatum>;
export function forceX<NodeDatum extends SimulationNodeDatum>(x: (d: NodeDatum, i: number, data: NodeDatum[]) => number): ForceX<NodeDatum>;
/**
* The y-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength.
@@ -919,7 +919,7 @@ export interface ForceY<NodeDatum extends SimulationNodeDatum> extends Force<Nod
/**
* Returns the current strength accessor, which defaults to a constant strength for all nodes of 0.1.
*/
strength(): (d: NodeDatum, i: number, data: Array<NodeDatum>) => number;
strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
/**
* Set the strength accessor to the specified constant strength for all nodes, re-evaluates the strength accessor for each node, and returns this force.
*
@@ -956,12 +956,12 @@ export interface ForceY<NodeDatum extends SimulationNodeDatum> extends Force<Nod
* @param strength A strength accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
* The function returns the strength.
*/
strength(strength: (d: NodeDatum, i: number, data: Array<NodeDatum>) => number): this;
strength(strength: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this;
/**
* Return the current y-accessor, which defaults to a function returning 0 for all nodes.
*/
y(): (d: NodeDatum, i: number, data: Array<NodeDatum>) => number;
y(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
/**
* Set the y-coordinate accessor to the specified number, re-evaluates the y-accessor for each node,
* and returns this force.
@@ -986,7 +986,7 @@ export interface ForceY<NodeDatum extends SimulationNodeDatum> extends Force<Nod
* @param y A y-coordinate accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes.
* The function returns the y-coordinate.
*/
y(y: (d: NodeDatum, i: number, data: Array<NodeDatum>) => number): this;
y(y: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this;
}
/**
@@ -1024,4 +1024,4 @@ export function forceY<NodeDatum extends SimulationNodeDatum>(y: number): ForceY
* @param y A y-coordinate accessor function which is invoked for each node in the simulation, being passed the node and its zero-based index.
* The function returns the y-coordinate.
*/
export function forceY<NodeDatum extends SimulationNodeDatum>(y: (d: NodeDatum, i: number, data: Array<NodeDatum>) => number): ForceY<NodeDatum>;
export function forceY<NodeDatum extends SimulationNodeDatum>(y: (d: NodeDatum, i: number, data: NodeDatum[]) => number): ForceY<NodeDatum>;
+32 -32
View File
@@ -18,7 +18,7 @@ export interface HierarchyNode<Datum> {
readonly depth: number;
readonly height: number;
parent: HierarchyNode<Datum> | null;
children?: Array<HierarchyNode<Datum>>;
children?: HierarchyNode<Datum>[];
/**
* Aggregated numeric value as calculated by sum(value),
* if previously invoked.
@@ -29,11 +29,11 @@ export interface HierarchyNode<Datum> {
* hierarchical data was created from tabular data using stratify()
*/
readonly id?: string;
ancestors(): Array<HierarchyNode<Datum>>;
descendants(): Array<HierarchyNode<Datum>>;
leaves(): Array<HierarchyNode<Datum>>;
path(target: HierarchyNode<Datum>): Array<HierarchyNode<Datum>>;
links(): Array<HierarchyLink<Datum>>;
ancestors(): HierarchyNode<Datum>[];
descendants(): HierarchyNode<Datum>[];
leaves(): HierarchyNode<Datum>[];
path(target: HierarchyNode<Datum>): HierarchyNode<Datum>[];
links(): HierarchyLink<Datum>[];
sum(value: (d: Datum) => number): this;
sort(compare: (a: HierarchyNode<Datum>, b: HierarchyNode<Datum>) => number): this;
each(func: (node: HierarchyNode<Datum>) => void): this;
@@ -43,7 +43,7 @@ export interface HierarchyNode<Datum> {
}
export function hierarchy<Datum>(data: Datum, children?: (d: Datum) => (Array<Datum> | null)): HierarchyNode<Datum>;
export function hierarchy<Datum>(data: Datum, children?: (d: Datum) => (Datum[] | null)): HierarchyNode<Datum>;
// -----------------------------------------------------------------------
// Stratify
@@ -53,11 +53,11 @@ export function hierarchy<Datum>(data: Datum, children?: (d: Datum) => (Array<Da
export interface StratifyOperator<Datum> {
(data: Array<Datum>): HierarchyNode<Datum>;
id(): (d: Datum, i: number, data: Array<Datum>) => (string | null | '' | undefined);
id(id: (d: Datum, i?: number, data?: Array<Datum>) => (string | null | '' | undefined)): this;
parentId(): (d: Datum, i: number, data: Array<Datum>) => (string | null | '' | undefined);
parentId(parentId: (d: Datum, i?: number, data?: Array<Datum>) => (string | null | '' | undefined)): this;
(data: Datum[]): HierarchyNode<Datum>;
id(): (d: Datum, i: number, data: Datum[]) => (string | null | '' | undefined);
id(id: (d: Datum, i?: number, data?: Datum[]) => (string | null | '' | undefined)): this;
parentId(): (d: Datum, i: number, data: Datum[]) => (string | null | '' | undefined);
parentId(parentId: (d: Datum, i?: number, data?: Datum[]) => (string | null | '' | undefined)): this;
}
export function stratify<Datum>(): StratifyOperator<Datum>;
@@ -78,7 +78,7 @@ export interface HierarchyPointNode<Datum> {
readonly depth: number;
readonly height: number;
parent: HierarchyPointNode<Datum> | null;
children?: Array<HierarchyPointNode<Datum>>;
children?: HierarchyPointNode<Datum>[];
/**
* Aggregated numeric value as calculated by sum(value),
* if previously invoked.
@@ -89,11 +89,11 @@ export interface HierarchyPointNode<Datum> {
* hierarchical data was created from tabular data using stratify()
*/
readonly id?: string;
ancestors(): Array<HierarchyPointNode<Datum>>;
descendants(): Array<HierarchyPointNode<Datum>>;
leaves(): Array<HierarchyPointNode<Datum>>;
path(target: HierarchyPointNode<Datum>): Array<HierarchyPointNode<Datum>>;
links(): Array<HierarchyPointLink<Datum>>;
ancestors(): HierarchyPointNode<Datum>[];
descendants(): HierarchyPointNode<Datum>[];
leaves(): HierarchyPointNode<Datum>[];
path(target: HierarchyPointNode<Datum>): HierarchyPointNode<Datum>[];
links(): HierarchyPointLink<Datum>[];
sum(value: (d: Datum) => number): this;
sort(compare: (a: HierarchyPointNode<Datum>, b: HierarchyPointNode<Datum>) => number): this;
each(func: (node: HierarchyPointNode<Datum>) => void): this;
@@ -148,7 +148,7 @@ export interface HierarchyRectangularNode<Datum> {
readonly depth: number;
readonly height: number;
parent: HierarchyRectangularNode<Datum> | null;
children?: Array<HierarchyRectangularNode<Datum>>;
children?: HierarchyRectangularNode<Datum>[];
/**
* Aggregated numeric value as calculated by sum(value),
* if previously invoked.
@@ -159,11 +159,11 @@ export interface HierarchyRectangularNode<Datum> {
* hierarchical data was created from tabular data using stratify()
*/
readonly id?: string;
ancestors(): Array<HierarchyRectangularNode<Datum>>;
descendants(): Array<HierarchyRectangularNode<Datum>>;
leaves(): Array<HierarchyRectangularNode<Datum>>;
path(target: HierarchyRectangularNode<Datum>): Array<HierarchyRectangularNode<Datum>>;
links(): Array<HierarchyRectangularLink<Datum>>;
ancestors(): HierarchyRectangularNode<Datum>[];
descendants(): HierarchyRectangularNode<Datum>[];
leaves(): HierarchyRectangularNode<Datum>[];
path(target: HierarchyRectangularNode<Datum>): HierarchyRectangularNode<Datum>[];
links(): HierarchyRectangularLink<Datum>[];
sum(value: (d: Datum) => number): this;
sort(compare: (a: HierarchyRectangularNode<Datum>, b: HierarchyRectangularNode<Datum>) => number): this;
each(func: (node: HierarchyRectangularNode<Datum>) => void): this;
@@ -256,7 +256,7 @@ export interface HierarchyCircularNode<Datum> {
readonly depth: number;
readonly height: number;
parent: HierarchyCircularNode<Datum> | null;
children?: Array<HierarchyCircularNode<Datum>>;
children?: HierarchyCircularNode<Datum>[];
/**
* Aggregated numeric value as calculated by sum(value),
* if previously invoked.
@@ -267,11 +267,11 @@ export interface HierarchyCircularNode<Datum> {
* hierarchical data was created from tabular data using stratify()
*/
readonly id?: string;
ancestors(): Array<HierarchyCircularNode<Datum>>;
descendants(): Array<HierarchyCircularNode<Datum>>;
leaves(): Array<HierarchyCircularNode<Datum>>;
path(target: HierarchyCircularNode<Datum>): Array<HierarchyCircularNode<Datum>>;
links(): Array<HierarchyCircularLink<Datum>>;
ancestors(): HierarchyCircularNode<Datum>[];
descendants(): HierarchyCircularNode<Datum>[];
leaves(): HierarchyCircularNode<Datum>[];
path(target: HierarchyCircularNode<Datum>): HierarchyCircularNode<Datum>[];
links(): HierarchyCircularLink<Datum>[];
sum(value: (d: Datum) => number): this;
sort(compare: (a: HierarchyCircularNode<Datum>, b: HierarchyCircularNode<Datum>) => number): this;
each(func: (node: HierarchyCircularNode<Datum>) => void): this;
@@ -310,6 +310,6 @@ export interface PackCircle {
// For invocation of packEnclose the x and y coordinates are mandatory. It seems easier to just comment
// on the mandatory nature, then to create separate interfaces and having to deal with recasting.
export function packSiblings<Datum extends PackCircle>(circles: Array<Datum>): Array<Datum>;
export function packSiblings<Datum extends PackCircle>(circles: Datum[]): Datum[];
export function packEnclose<Datum extends PackCircle>(circles: Array<Datum>): { r: number, x: number, y: number };
export function packEnclose<Datum extends PackCircle>(circles: Datum[]): { r: number, x: number, y: number };
+3 -3
View File
@@ -72,14 +72,14 @@ export function interpolateTransformSvg(a: string, b: string): ((t: number) => s
export function interpolateZoom(a: ZoomView, b: ZoomView): ZoomInterpolator;
export function quantize<T>(interpolator: ((t: number) => T), n: number): Array<T>;
export function quantize<T>(interpolator: ((t: number) => T), n: number): T[];
// Color interpolation related
export var interpolateRgb: ColorGammaInterpolationFactory;
export function interpolateRgbBasis(colors: Array<string | ColorCommonInstance>): ((t: number) => string);
export function interpolateRgbBasisClosed(colors: Array<string | ColorCommonInstance>): ((t: number) => string);
export function interpolateRgbBasis(colors: (string | ColorCommonInstance)[]): ((t: number) => string);
export function interpolateRgbBasisClosed(colors: (string | ColorCommonInstance)[]): ((t: number) => string);
export function interpolateHsl(a: string | ColorCommonInstance, b: string | ColorCommonInstance): ((t: number) => string);
export function interpolateHslLong(a: string | ColorCommonInstance, b: string | ColorCommonInstance): ((t: number) => string);
+5 -5
View File
@@ -10,14 +10,14 @@
*
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on.
*/
export function polygonArea(polygon: Array<[number, number]>): number;
export function polygonArea(polygon: [number, number][]): number;
/**
* Returns the centroid of the specified polygon.
*
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on.
*/
export function polygonCentroid(polygon: Array<[number, number]>): [number, number];
export function polygonCentroid(polygon: [number, number][]): [number, number];
/**
* Returns the convex hull of the specified points using Andrew’s monotone chain algorithm.
@@ -26,7 +26,7 @@ export function polygonCentroid(polygon: Array<[number, number]>): [number, numb
*
* @param points Array of coordinates <x0, y0>, <x1, y1> and so on.
*/
export function polygonHull(points: Array<[number, number]>): Array<[number, number]> | null;
export function polygonHull(points: [number, number][]): [number, number][] | null;
/**
* Returns true if and only if the specified point is inside the specified polygon.
@@ -34,11 +34,11 @@ export function polygonHull(points: Array<[number, number]>): Array<[number, num
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on.
* @param point Coordinates of point <x, y>
*/
export function polygonContains(polygon: Array<[number, number]>, point: [number, number]): boolean;
export function polygonContains(polygon: [number, number][], point: [number, number]): boolean;
/**
* Returns the length of the perimeter of the specified polygon.
*
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on.
*/
export function polygonLength(polygon: Array<[number, number]>): number;
export function polygonLength(polygon: [number, number][]): number;
+5 -5
View File
@@ -31,12 +31,12 @@ export interface Quadtree<T> {
extent(extend: [[number, number], [number, number]]): this;
cover(x: number, y: number): this;
add(datum: T): this;
addAll(data: Array<T>): this;
addAll(data: T[]): this;
remove(datum: T): this;
removeAll(data: Array<T>): this;
removeAll(data: T[]): this;
copy(): Quadtree<T>;
root(): QuadtreeInternalNode<T> | QuadtreeLeaf<T>;
data(): Array<T>;
data(): T[];
size(): number;
find(x: number, y: number, radius?: number): T | undefined;
visit(callback: (node: QuadtreeInternalNode<T> | QuadtreeLeaf<T>, x0: number, y0: number, x1: number, y1: number) => (void | boolean)): this;
@@ -45,6 +45,6 @@ export interface Quadtree<T> {
export function quadtree(): Quadtree<[number, number]>;
export function quadtree(data: Array<[number, number]>): Quadtree<[number, number]>;
export function quadtree(data: [number, number][]): Quadtree<[number, number]>;
export function quadtree<T>(): Quadtree<T>;
export function quadtree<T>(data: Array<T>, x?: (d: T) => number, y?: (d: T) => number): Quadtree<T>;
export function quadtree<T>(data: T[], x?: (d: T) => number, y?: (d: T) => number): Quadtree<T>;
+41 -41
View File
@@ -28,14 +28,14 @@ export interface ScaleLinear<Range, Output> {
*/
invert(value: number | { valueOf(): number }): number;
domain(): number[];
domain(domain: Array<number | { valueOf(): number }>): this;
range(): Array<Range>;
range(range: Array<Range>): this;
domain(domain: (number | { valueOf(): number })[]): this;
range(): Range[];
range(range: Range[]): this;
/**
* Important: While value should come out of range R, this is method is only applicable to
* values that can be coerced to numeric.
*/
rangeRound(range: Array<number | { valueOf(): number }>): this;
rangeRound(range: (number | { valueOf(): number })[]): this;
clamp(): boolean;
clamp(clamp: boolean): ScaleLinear<Range, Output>;
interpolate(): InterpolatorFactory<any, any>;
@@ -64,14 +64,14 @@ export interface ScalePower<Range, Output> {
*/
invert(value: number | { valueOf(): number }): number;
domain(): number[];
domain(domain: Array<number | { valueOf(): number }>): this;
range(): Array<Range>;
range(range: Array<Range>): this;
domain(domain: (number | { valueOf(): number })[]): this;
range(): Range[];
range(range: Range[]): this;
/**
* Important: While value should come out of range R, this is method is only applicable to
* values that can be coerced to numeric.
*/
rangeRound(range: Array<number | { valueOf(): number }>): this;
rangeRound(range: (number | { valueOf(): number })[]): this;
clamp(): boolean;
clamp(clamp: boolean): this;
interpolate(): InterpolatorFactory<any, any>;
@@ -107,14 +107,14 @@ export interface ScaleLogarithmic<Range, Output> {
*/
invert(value: number | { valueOf(): number }): number;
domain(): number[];
domain(domain: Array<number | { valueOf(): number }>): this;
range(): Array<Range>;
range(range: Array<Range>): this;
domain(domain: (number | { valueOf(): number })[]): this;
range(): Range[];
range(range: Range[]): this;
/**
* Important: While value should come out of range R, this is method is only applicable to
* values that can be coerced to numeric.
*/
rangeRound(range: Array<number | { valueOf(): number }>): this;
rangeRound(range: (number | { valueOf(): number })[]): this;
clamp(): boolean;
clamp(clamp: boolean): this;
interpolate(): InterpolatorFactory<any, any>;
@@ -146,9 +146,9 @@ export interface ScaleIdentity {
*/
invert(value: number | { valueOf(): number }): number;
domain(): number[];
domain(domain: Array<number | { valueOf(): number }>): this;
domain(domain: (number | { valueOf(): number })[]): this;
range(): number[];
range(range: Array<Range | { valueOf(): number }>): this;
range(range: (Range | { valueOf(): number })[]): this;
ticks(count?: number): number[];
tickFormat(count?: number, specifier?: string): ((d: number | { valueOf(): number }) => string);
nice(count?: number): this;
@@ -169,23 +169,23 @@ export interface ScaleTime<Range, Output> {
* values that can be coerced to numeric. Otherwise, returns NaN
*/
invert(value: number | { valueOf(): number }): Date;
domain(): Array<Date>;
domain(domain: Array<Date>): this;
range(): Array<Range>;
range(range: Array<Range>): this;
domain(): Date[];
domain(domain: Date[]): this;
range(): Range[];
range(range: Range[]): this;
/**
* Important: While value should come out of range R, this is method is only applicable to
* values that can be coerced to numeric.
*/
rangeRound(range: Array<number | { valueOf(): number }>): this;
rangeRound(range: (number | { valueOf(): number })[]): this;
clamp(): boolean;
clamp(clamp: boolean): this;
interpolate(): InterpolatorFactory<any, any>;
interpolate(interpolate: InterpolatorFactory<Range, Output>): this;
interpolate<NewOutput>(interpolate: InterpolatorFactory<Range, NewOutput>): ScaleTime<Range, NewOutput>;
ticks(): Array<Date>;
ticks(count: number): Array<Date>;
ticks(interval: TimeInterval): Array<Date>;
ticks(): Date[];
ticks(count: number): Date[];
ticks(interval: TimeInterval): Date[];
tickFormat(): ((d: Date) => string);
tickFormat(count: number, specifier?: string): ((d: Date) => string);
tickFormat(interval: TimeInterval, specifier?: string): ((d: Date) => string);
@@ -256,8 +256,8 @@ export interface ScaleQuantize<Range> {
invertExtent(value: Range): [number, number];
domain(): [number, number];
domain(domain: [number | { valueOf(): number }, number | { valueOf(): number }]): this;
range(): Array<Range>;
range(range: Array<Range>): this;
range(): Range[];
range(range: Range[]): this;
ticks(count?: number): number[];
tickFormat(count?: number, specifier?: string): ((d: number | { valueOf(): number }) => string);
nice(count?: number): this;
@@ -275,9 +275,9 @@ export interface ScaleQuantile<Range> {
(value: number | { valueOf(): number }): Range;
invertExtent(value: Range): [number, number];
domain(): number[];
domain(domain: Array<number | { valueOf(): number }>): this;
range(): Array<Range>;
range(range: Array<Range>): this;
domain(domain: (number | { valueOf(): number })[]): this;
range(): Range[];
range(range: Range[]): this;
quantiles(): number[];
copy(): ScaleQuantile<Range>;
}
@@ -297,10 +297,10 @@ export interface ScaleThreshold<Domain extends number | string | Date, Range> {
* values that can be coerced to numeric. Otherwise, returns NaN
*/
invertExtent(value: Range): [Domain, Domain] | [undefined, Domain] | [Domain, undefined] | [undefined, undefined];
domain(): Array<Domain>;
domain(domain: Array<Domain>): this;
range(): Array<Range>;
range(range: Array<Range>): this;
domain(): Domain[];
domain(domain: Domain[]): this;
range(): Range[];
range(range: Range[]): this;
copy(): ScaleThreshold<Domain, Range>;
}
@@ -314,17 +314,17 @@ export function scaleThreshold<Domain extends number | string | Date, Range>():
export interface ScaleOrdinal<Domain extends { toString(): string }, Range> {
(x: Domain): Range;
domain(): Array<Domain>;
domain(domain: Array<Domain>): this;
range(): Array<Range>;
range(range: Array<Range>): this;
domain(): Domain[];
domain(domain: Domain[]): this;
range(): Range[];
range(range: Range[]): this;
unknown(): Range | { name: 'implicit' };
unknown(value: Range | { name: 'implicit' }): this;
copy(): ScaleOrdinal<Domain, Range>;
}
export function scaleOrdinal<Range>(range?: Array<Range>): ScaleOrdinal<string, Range>;
export function scaleOrdinal<Domain extends { toString(): string }, Range>(range?: Array<Range>): ScaleOrdinal<Domain, Range>;
export function scaleOrdinal<Range>(range?: Range[]): ScaleOrdinal<string, Range>;
export function scaleOrdinal<Domain extends { toString(): string }, Range>(range?: Range[]): ScaleOrdinal<Domain, Range>;
export const scaleImplicit: { name: 'implicit' };
@@ -335,8 +335,8 @@ export const scaleImplicit: { name: 'implicit' };
export interface ScaleBand<Domain extends { toString(): string }> {
(x: Domain): number | undefined;
domain(): Array<Domain>;
domain(domain: Array<Domain>): this;
domain(): Domain[];
domain(domain: Domain[]): this;
range(): [number, number];
range(range: [number | { valueOf(): number }, number | { valueOf(): number }]): this;
rangeRound(range: [number | { valueOf(): number }, number | { valueOf(): number }]): this;
@@ -370,8 +370,8 @@ export function scaleBand<Domain extends { toString(): string }>(): ScaleBand<Do
export interface ScalePoint<Domain extends { toString(): string }> {
(x: Domain): number | undefined;
domain(): Array<Domain>;
domain(domain: Array<Domain>): this;
domain(): Domain[];
domain(domain: Domain[]): this;
range(): [number, number];
range(range: [number | { valueOf(): number }, number | { valueOf(): number }]): this;
rangeRound(range: [number | { valueOf(): number }, number | { valueOf(): number }]): this;
+6 -6
View File
@@ -65,7 +65,7 @@ export type CustomEventParameters = {
/**
* Callback type for selections and transitions
*/
export type ValueFn<Element, Datum, Result> = (this: Element, datum: Datum, index: number, groups: Array<Element> | ArrayLike<Element>) => Result;
export type ValueFn<Element, Datum, Result> = (this: Element, datum: Datum, index: number, groups: Element[] | ArrayLike<Element>) => Result;
/**
@@ -239,7 +239,7 @@ interface Selection<GElement extends BaseType, Datum, PElement extends BaseType,
* the current index (i), and the current group (nodes), with this as the current DOM element. It must return an array of elements
* (or a pseudo-array, such as a NodeList), or the empty array if there are no matching elements.
*/
selectAll<DescElement extends BaseType, OldDatum>(selector: ValueFn<GElement, Datum, Array<DescElement> | ArrayLike<DescElement>>): Selection<DescElement, OldDatum, GElement, Datum>;
selectAll<DescElement extends BaseType, OldDatum>(selector: ValueFn<GElement, Datum, DescElement[] | ArrayLike<DescElement>>): Selection<DescElement, OldDatum, GElement, Datum>;
// Modifying -------------------------------
@@ -699,7 +699,7 @@ interface Selection<GElement extends BaseType, Datum, PElement extends BaseType,
* The datum for a given key is assigned to the element with the matching key. If multiple elements have the same key,
* the duplicate elements are put into the exit selection; if multiple data have the same key, the duplicate data are put into the enter selection.
*/
data<NewDatum>(data: Array<NewDatum>, key?: ValueFn<GElement | PElement, Datum | NewDatum, string>): Selection<GElement, NewDatum, PElement, PDatum>;
data<NewDatum>(data: NewDatum[], key?: ValueFn<GElement | PElement, Datum | NewDatum, string>): Selection<GElement, NewDatum, PElement, PDatum>;
/**
* Joins the data returned by the specified value function with the selected elements, returning a new selection that it represents
* the update selection: the elements successfully bound to data. Also defines the enter and exit selections on
@@ -731,7 +731,7 @@ interface Selection<GElement extends BaseType, Datum, PElement extends BaseType,
* The datum for a given key is assigned to the element with the matching key. If multiple elements have the same key,
* the duplicate elements are put into the exit selection; if multiple data have the same key, the duplicate data are put into the enter selection.
*/
data<NewDatum>(data: ValueFn<PElement, PDatum, Array<NewDatum>>, key?: ValueFn<GElement | PElement, Datum | NewDatum, string>): Selection<GElement, NewDatum, PElement, PDatum>;
data<NewDatum>(data: ValueFn<PElement, PDatum, NewDatum[]>, key?: ValueFn<GElement | PElement, Datum | NewDatum, string>): Selection<GElement, NewDatum, PElement, PDatum>;
/**
* Return the enter selection: placeholder nodes for each datum that had no corresponding DOM element
@@ -850,7 +850,7 @@ interface Selection<GElement extends BaseType, Datum, PElement extends BaseType,
/**
* Return an array of all (non-null) elements in this selection.
*/
nodes(): Array<GElement>;
nodes(): GElement[];
/**
* Returns the total number of elements in this selection.
@@ -983,7 +983,7 @@ export function touch(container: ContainerElement, touches: TouchList, identifie
* @param container Container element relative to which coordinates are calculated.
* @param touches TouchList to be used.
*/
export function touches(container: ContainerElement, touches?: TouchList): Array<[number, number]>;
export function touches(container: ContainerElement, touches?: TouchList): [number, number][];
// ---------------------------------------------------------------------------
// local.js related
+61 -61
View File
@@ -61,25 +61,25 @@ export interface PieArcDatum<T> {
export interface Pie<This, Datum> {
(this: This, data: Array<Datum>, ...args: any[]): Array<PieArcDatum<Datum>>;
value(): (d: Datum, i: number, data: Array<Datum>) => number;
(this: This, data: Datum[], ...args: any[]): PieArcDatum<Datum>[];
value(): (d: Datum, i: number, data: Datum[]) => number;
value(value: number): this;
value(value: (d: Datum, i: number, data: Array<Datum>) => number): this;
value(value: (d: Datum, i: number, data: Datum[]) => number): this;
sort(): ((a: Datum, b: Datum) => number) | null;
sort(comparator: (a: Datum, b: Datum) => number): this;
sort(comparator: null): this;
sortValues(): ((a: number, b: number) => number) | null;
sortValues(comparator: (a: number, b: number) => number): this;
sortValues(comparator: null): this;
startAngle(): (this: This, data: Array<Datum>, ...args: any[]) => number;
startAngle(): (this: This, data: Datum[], ...args: any[]) => number;
startAngle(angle: number): this;
startAngle(angle: (this: This, data: Array<Datum>, ...args: any[]) => number): this;
endAngle(): (this: This, data: Array<Datum>, ...args: any[]) => number;
startAngle(angle: (this: This, data: Datum[], ...args: any[]) => number): this;
endAngle(): (this: This, data: Datum[], ...args: any[]) => number;
endAngle(angle: number): this;
endAngle(angle: (this: This, data: Array<Datum>, ...args: any[]) => number): this;
padAngle(): (this: This, data: Array<Datum>, ...args: any[]) => number;
endAngle(angle: (this: This, data: Datum[], ...args: any[]) => number): this;
padAngle(): (this: This, data: Datum[], ...args: any[]) => number;
padAngle(angle: number): this;
padAngle(angle: (this: This, data: Array<Datum>, ...args: any[]) => number): this;
padAngle(angle: (this: This, data: Datum[], ...args: any[]) => number): this;
}
export function pie(): Pie<any, number | { valueOf(): number }>;
@@ -92,16 +92,16 @@ export function pie<This, Datum>(): Pie<This, Datum>;
export interface Line<Datum> {
(data: Array<Datum>): string | undefined;
x(): (d: Datum, index: number, data: Array<Datum>) => number;
(data: Datum[]): string | undefined;
x(): (d: Datum, index: number, data: Datum[]) => number;
x(x: number): this;
x(x: (d: Datum, index: number, data: Array<Datum>) => number): this;
y(): (d: Datum, index: number, data: Array<Datum>) => number;
x(x: (d: Datum, index: number, data: Datum[]) => number): this;
y(): (d: Datum, index: number, data: Datum[]) => number;
y(y: number): this;
y(y: (d: Datum, index: number, data: Array<Datum>) => number): this;
defined(): (d: Datum, index: number, data: Array<Datum>) => boolean;
y(y: (d: Datum, index: number, data: Datum[]) => number): this;
defined(): (d: Datum, index: number, data: Datum[]) => boolean;
defined(defined: boolean): this;
defined(defined: (d: Datum, index: number, data: Array<Datum>) => boolean): this;
defined(defined: (d: Datum, index: number, data: Datum[]) => boolean): this;
curve(): CurveFactory | CurveFactoryLineOnly;
curve(curve: CurveFactory | CurveFactoryLineOnly): this;
context(): CanvasRenderingContext2D | null;
@@ -113,16 +113,16 @@ export function line<Datum>(): Line<Datum>;
export function line<This, Datum>(): Line<Datum>;
export interface RadialLine<Datum> {
(data: Array<Datum>): string | undefined;
angle(): (d: Datum, index: number, data: Array<Datum>) => number;
(data: Datum[]): string | undefined;
angle(): (d: Datum, index: number, data: Datum[]) => number;
angle(angle: number): this;
angle(angle: (d: Datum, index: number, data: Array<Datum>) => number): this;
radius(): (d: Datum, index: number, data: Array<Datum>) => number;
angle(angle: (d: Datum, index: number, data: Datum[]) => number): this;
radius(): (d: Datum, index: number, data: Datum[]) => number;
radius(radius: number): this;
radius(radius: (d: Datum, index: number, data: Array<Datum>) => number): this;
defined(): (d: Datum, index: number, data: Array<Datum>) => boolean;
radius(radius: (d: Datum, index: number, data: Datum[]) => number): this;
defined(): (d: Datum, index: number, data: Datum[]) => boolean;
defined(defined: boolean): this;
defined(defined: (d: Datum, index: number, data: Array<Datum>) => boolean): this;
defined(defined: (d: Datum, index: number, data: Datum[]) => boolean): this;
curve(): CurveFactory | CurveFactoryLineOnly;
curve(curve: CurveFactory | CurveFactoryLineOnly): this;
context(): CanvasRenderingContext2D | null;
@@ -139,28 +139,28 @@ export function radialLine<Datum>(): RadialLine<Datum>;
export interface Area<Datum> {
(data: Array<Datum>): string | undefined;
x(): (d: Datum, index: number, data: Array<Datum>) => number;
(data: Datum[]): string | undefined;
x(): (d: Datum, index: number, data: Datum[]) => number;
x(x: number): this;
x(x: (d: Datum, index: number, data: Array<Datum>) => number): this;
x0(): (d: Datum, index: number, data: Array<Datum>) => number;
x(x: (d: Datum, index: number, data: Datum[]) => number): this;
x0(): (d: Datum, index: number, data: Datum[]) => number;
x0(x0: number): this;
x0(x0: (d: Datum, index: number, data: Array<Datum>) => number): this;
x1(): ((d: Datum, index: number, data: Array<Datum>) => number) | null;
x0(x0: (d: Datum, index: number, data: Datum[]) => number): this;
x1(): ((d: Datum, index: number, data: Datum[]) => number) | null;
x1(x: number): this;
x1(x: (d: Datum, index: number, data: Array<Datum>) => number): this;
y(): (d: Datum, index: number, data: Array<Datum>) => number;
x1(x: (d: Datum, index: number, data: Datum[]) => number): this;
y(): (d: Datum, index: number, data: Datum[]) => number;
y(y: number): this;
y(y: (d: Datum, index: number, data: Array<Datum>) => number): this;
y0(): (d: Datum, index: number, data: Array<Datum>) => number;
y(y: (d: Datum, index: number, data: Datum[]) => number): this;
y0(): (d: Datum, index: number, data: Datum[]) => number;
y0(y: number): this;
y0(y: (d: Datum, index: number, data: Array<Datum>) => number): this;
y1(): (d: Datum, index: number, data: Array<Datum>) => number;
y0(y: (d: Datum, index: number, data: Datum[]) => number): this;
y1(): (d: Datum, index: number, data: Datum[]) => number;
y1(y: number): this;
y1(y: (d: Datum, index: number, data: Array<Datum>) => number): this;
defined(): (d: Datum, index: number, data: Array<Datum>) => boolean;
y1(y: (d: Datum, index: number, data: Datum[]) => number): this;
defined(): (d: Datum, index: number, data: Datum[]) => boolean;
defined(defined: boolean): this;
defined(defined: (d: Datum, index: number, data: Array<Datum>) => boolean): this;
defined(defined: (d: Datum, index: number, data: Datum[]) => boolean): this;
curve(): CurveFactory;
curve(curve: CurveFactory): this;
context(): CanvasRenderingContext2D | null;
@@ -177,28 +177,28 @@ export function area<Datum>(): Area<Datum>;
export interface RadialArea<Datum> {
(data: Array<Datum>): string | undefined;
angle(): (d: Datum, index: number, data: Array<Datum>) => number;
(data: Datum[]): string | undefined;
angle(): (d: Datum, index: number, data: Datum[]) => number;
angle(angle: number): this;
angle(angle: (d: Datum, index: number, data: Array<Datum>) => number): this;
startAngle(): (d: Datum, index: number, data: Array<Datum>) => number;
angle(angle: (d: Datum, index: number, data: Datum[]) => number): this;
startAngle(): (d: Datum, index: number, data: Datum[]) => number;
startAngle(angle: number): this;
startAngle(angle: (d: Datum, index: number, data: Array<Datum>) => number): this;
endAngle(): ((d: Datum, index: number, data: Array<Datum>) => number) | null;
startAngle(angle: (d: Datum, index: number, data: Datum[]) => number): this;
endAngle(): ((d: Datum, index: number, data: Datum[]) => number) | null;
endAngle(angle: number): this;
endAngle(angle: (d: Datum, index: number, data: Array<Datum>) => number): this;
radius(): (d: Datum, index: number, data: Array<Datum>) => number;
endAngle(angle: (d: Datum, index: number, data: Datum[]) => number): this;
radius(): (d: Datum, index: number, data: Datum[]) => number;
radius(radius: number): this;
radius(radius: (d: Datum, index: number, data: Array<Datum>) => number): this;
innerRadius(): (d: Datum, index: number, data: Array<Datum>) => number;
radius(radius: (d: Datum, index: number, data: Datum[]) => number): this;
innerRadius(): (d: Datum, index: number, data: Datum[]) => number;
innerRadius(radius: number): this;
innerRadius(radius: (d: Datum, index: number, data: Array<Datum>) => number): this;
outerRadius(): (d: Datum, index: number, data: Array<Datum>) => number;
innerRadius(radius: (d: Datum, index: number, data: Datum[]) => number): this;
outerRadius(): (d: Datum, index: number, data: Datum[]) => number;
outerRadius(radius: number): this;
outerRadius(radius: (d: Datum, index: number, data: Array<Datum>) => number): this;
defined(): (d: Datum, index: number, data: Array<Datum>) => boolean;
outerRadius(radius: (d: Datum, index: number, data: Datum[]) => number): this;
defined(): (d: Datum, index: number, data: Datum[]) => boolean;
defined(defined: boolean): this;
defined(defined: (d: Datum, index: number, data: Array<Datum>) => boolean): this;
defined(defined: (d: Datum, index: number, data: Datum[]) => boolean): this;
curve(): CurveFactory;
curve(curve: CurveFactory): this;
context(): CanvasRenderingContext2D | null;
@@ -308,7 +308,7 @@ export function symbol(): Symbol<any, any>;
export function symbol<Datum>(): Symbol<any, Datum>;
export function symbol<This, Datum>(): Symbol<This, Datum>;
export var symbols: Array<SymbolType>;
export var symbols: SymbolType[];
export var symbolCircle: SymbolType;
@@ -329,7 +329,7 @@ export var symbolWye: SymbolType;
// SeriesPoint is a [number, number] two-element Array with added
// data and index properties related to the data element which formed the basis for the
// SeriesPoint
export interface SeriesPoint<Datum> extends number[] {
export interface SeriesPoint<Datum> extends Array<number> {
0: number;
1: number;
index: number;
@@ -341,15 +341,15 @@ export interface Series<Datum, Key> extends Array<SeriesPoint<Datum>> {
}
export interface Stack<This, Datum, Key> {
(data: Array<Datum>, ...args: any[]): Array<Series<Datum, Key>>;
(data: Datum[], ...args: any[]): Series<Datum, Key>[];
keys(): (this: This, data: Array<Datum>, ...args: any[]) => Array<Key>;
keys(keys: Array<Key>): this;
keys(keys: (this: This, data: Array<Datum>, ...args: any[]) => Array<Key>): this;
keys(): (this: This, data: Datum[], ...args: any[]) => Key[];
keys(keys: Key[]): this;
keys(keys: (this: This, data: Datum[], ...args: any[]) => Key[]): this;
value(): (d: Datum, key: Key, j: number, data: Array<Datum>) => number;
value(): (d: Datum, key: Key, j: number, data: Datum[]) => number;
value(value: number): this;
value(value: (d: Datum, key: Key, j: number, data: Array<Datum>) => number): this;
value(value: (d: Datum, key: Key, j: number, data: Datum[]) => number): this;
order(): (series: Series<Datum, Key>) => number[];
order(order: null): this;
+2 -2
View File
@@ -126,7 +126,7 @@ export interface Transition<GElement extends BaseType, Datum, PElement extends B
* the current index (i), and the current group (nodes), with this as the current DOM element. It must return an array of elements
* (or a pseudo-array, such as a NodeList), or the empty array if there are no matching elements.
*/
selectAll<DescElement extends BaseType, OldDatum>(selector: ValueFn<GElement, Datum, Array<DescElement> | ArrayLike<DescElement>>): Transition<DescElement, OldDatum, GElement, Datum>;
selectAll<DescElement extends BaseType, OldDatum>(selector: ValueFn<GElement, Datum, DescElement[] | ArrayLike<DescElement>>): Transition<DescElement, OldDatum, GElement, Datum>;
/**
* Return the selection corresponding to this transition.
@@ -448,7 +448,7 @@ export interface Transition<GElement extends BaseType, Datum, PElement extends B
/**
* Return an array of all (non-null) elements in this transition.
*/
nodes(): Array<GElement>;
nodes(): GElement[];
/**
* Returns the total number of elements in this transition.
+12 -12
View File
@@ -23,7 +23,7 @@ export interface VoronoiPoint extends number[] {
* for each point containing the respective x and y coordinates. However, it is used as a base for interface definitions, and
* [[number, number], [number, number]] cannot be extended.
*/
export interface VoronoiPointPair extends Array<[number, number]> {
export interface VoronoiPointPair extends [number, number][] {
0: [number, number];
1: [number, number];
}
@@ -35,7 +35,7 @@ export interface VoronoiPointPair extends Array<[number, number]> {
*
* The generic refers to the type of the data for the corresponding element.
*/
export interface VoronoiPolygon<T> extends Array<[number, number]> {
export interface VoronoiPolygon<T> extends [number, number][] {
/**
* The input data corresponding to this Voronoi polygon.
*/
@@ -80,7 +80,7 @@ export interface VoronoiCell<T> {
/**
* An array of indexes into diagram.edges representing the cell’s polygon.
*/
halfEdges: Array<number>;
halfEdges: number[];
}
@@ -128,7 +128,7 @@ export interface VoronoiLayout<T> {
* Computes the Voronoi diagram for the specified data points.
* @param data Array of data elements
*/
(data: Array<T>): VoronoiDiagram<T>;
(data: T[]): VoronoiDiagram<T>;
/**
* Return the current x-coordinate accessor,
@@ -206,21 +206,21 @@ export interface VoronoiLayout<T> {
*
* @param data Array of data points.
*/
polygons(data: Array<T>): Array<VoronoiPolygon<T>>;
polygons(data: T[]): VoronoiPolygon<T>[];
/**
* Return the Delaunay triangulation of the specified data array as an array of triangles.
* Each triangle is a three-element array of elements from data.
*
* @param data Array of data points.
*/
triangles(data: Array<T>): Array<VoronoiTriangle<T>>;
triangles(data: T[]): VoronoiTriangle<T>[];
/**
* Return the Delaunay triangulation of the specified data array as an array of links.
* Each link has source and target attributes referring to elements in data.
*
* @param data Array of data points.
*/
links(data: Array<T>): Array<VoronoiLink<T>>;
links(data: T[]): VoronoiLink<T>[];
}
@@ -233,11 +233,11 @@ export interface VoronoiDiagram<T> {
/**
* Array of Voronoi Edges
*/
edges: Array<VoronoiEdge<T>>;
edges: VoronoiEdge<T>[];
/**
* Array of Voronoi Cells, one per input point; a cell may be null for a coincident point.
*/
cells: Array<VoronoiCell<T> | null>;
cells: (VoronoiCell<T> | null)[];
/**
* Return an array of polygons clipped to the extent, one for each cell in the diagram.
* Each polygon is represented as an array of points [x, y] where x and y are the point coordinates,
@@ -248,7 +248,7 @@ export interface VoronoiDiagram<T> {
*
* If the cell’s site is coincident with an earlier site, the associated polygon is null.
*/
polygons(): Array<VoronoiPolygon<T>>;
polygons(): VoronoiPolygon<T>[];
/**
* Returns the Delaunay triangulation of the specified data array as an array of triangles.
@@ -256,7 +256,7 @@ export interface VoronoiDiagram<T> {
* Since the triangulation is computed as the dual of the Voronoi diagram, and the Voronoi diagram is clipped by the extent,
* a subset of the Delaunay triangulation is returned.
*/
triangles(): Array<VoronoiTriangle<T>>;
triangles(): VoronoiTriangle<T>[];
/**
* Returns the Delaunay triangulation of the specified data array as an array of links, one for each edge in the mesh.
@@ -266,7 +266,7 @@ export interface VoronoiDiagram<T> {
*
* Since the triangulation is computed as the dual of the Voronoi diagram, and the Voronoi diagram is clipped by the extent, a subset of the Delaunay links is returned.
*/
links(): Array<VoronoiLink<T>>;
links(): VoronoiLink<T>[];
/**
* Return the nearest Voronoi Site to point [x, y]. If radius is specified, only sites within radius distance are considered.
+31 -31
View File
@@ -366,7 +366,7 @@ declare namespace d3 {
* Creates a subselection by using a function to find descendent elements. Bound data is not inherited.
* @param selector the function to find matching descendents
*/
selectAll(selector: (datum: Datum, index: number, outerIndex: number) => Array<EventTarget> | NodeList): Update<any>;
selectAll(selector: (datum: Datum, index: number, outerIndex: number) => EventTarget[] | NodeList): Update<any>;
/**
* Invoke the given function for each element in the selection. The return value of the function is ignored.
@@ -766,7 +766,7 @@ declare namespace d3 {
* Creates a subselection by using a function to find descendent elements. Bound data is not inherited.
* @param selector the function to find matching descendents
*/
selectAll(selector: (datum: Datum, index: number, outerIndex: number) => Array<EventTarget> | NodeList): Selection<any>;
selectAll(selector: (datum: Datum, index: number, outerIndex: number) => EventTarget[] | NodeList): Selection<any>;
/**
* Creates a subselection by using a function to find descendent elements. Bound data is not inherited.
@@ -774,7 +774,7 @@ declare namespace d3 {
* Use this overload when data-binding a subselection (that is, sel.selectAll('.foo').data(d => ...)). The type will carry over.
* @param selector the function to find matching descendents
*/
selectAll<T>(selector: (datum: Datum, index: number, outerIndex: number) => Array<EventTarget> | NodeList): Selection<T>;
selectAll<T>(selector: (datum: Datum, index: number, outerIndex: number) => EventTarget[] | NodeList): Selection<T>;
/**
* Invoke the given function for each element in the selection. The return value of the function is ignored.
@@ -979,7 +979,7 @@ declare namespace d3 {
* @param container the container element
* @param touches an optional list of touches (defaults to d3.event.touches)
*/
export function touches(container: EventTarget, touches?: TouchList): Array<[number, number]>;
export function touches(container: EventTarget, touches?: TouchList): [number, number][];
// NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances.
/**
@@ -1070,7 +1070,7 @@ declare namespace d3 {
/**
* Return the min and max simultaneously.
*/
export function extent<T extends Numeric>(array: Array<T | Primitive>): [T | Primitive, T | Primitive];
export function extent<T extends Numeric>(array: (T | Primitive)[]): [T | Primitive, T | Primitive];
/**
* Return the min and max simultaneously.
@@ -1340,7 +1340,7 @@ declare namespace d3 {
* For each adjacent pair of elements in the specified array, returns a new array of tuples of elements i and i - 1.
* Returns the empty array if the input array has fewer than two elements.
*/
export function pairs<T>(array: T[]): Array<[T, T]>;
export function pairs<T>(array: T[]): [T, T][];
interface Nest<T> {
key(func: (datum: T) => string): Nest<T>;
@@ -1707,7 +1707,7 @@ declare namespace d3 {
export function interpolate(a: number, b: number): (t: number) => number;
export function interpolate(a: string, b: string): (t: number) => string;
export function interpolate(a: string | Color, b: Color): (t: number) => string;
export function interpolate(a: Array<string | Color>, b: Color[]): (t: number) => string;
export function interpolate(a: (string | Color)[], b: Color[]): (t: number) => string;
export function interpolate<Range, Output>(a: Range[], b: Output[]): (t: number) => Output[];
export function interpolate<Range, Output>(a: Range[], b: Range[]): (t: number) => Output[];
export function interpolate(a: { [key: string]: string | Color }, b: { [key: string]: Color }): (t: number) => { [key: string]: string };
@@ -1728,7 +1728,7 @@ declare namespace d3 {
export function interpolateHcl(a: string | Color, b: string | Color): (t: number) => string;
export function interpolateArray(a: Array<string | Color>, b: Color[]): (t: number) => string[];
export function interpolateArray(a: (string | Color)[], b: Color[]): (t: number) => string[];
export function interpolateArray<Range, Output>(a: Range[], b: Range[]): (t: number) => Output[];
export function interpolateArray<Range, Output>(a: Range[], b: Output[]): (t: number) => Output[];
@@ -1743,7 +1743,7 @@ declare namespace d3 {
duration: number;
};
export var interpolators: Array<(a: any, b: any) => (t: number) => any>;
export var interpolators: ((a: any, b: any) => (t: number) => any)[];
export namespace time {
export var second: Interval;
@@ -1816,10 +1816,10 @@ declare namespace d3 {
export function format(specifier: string): Format;
export namespace format {
export function multi(formats: Array<[string, (d: Date) => boolean|number]>): Format;
export function multi(formats: [string, (d: Date) => boolean|number][]): Format;
export function utc(specifier: string): Format;
namespace utc {
export function multi(formats: Array<[string, (d: Date) => boolean|number]>): Format;
export function multi(formats: [string, (d: Date) => boolean|number][]): Format;
}
export var iso: Format;
@@ -2219,7 +2219,7 @@ declare namespace d3 {
y(x: number): Line<T>;
y(y: (d: T, i: number) => number): Line<T>;
interpolate(): string | ((points: Array<[number, number]>) => string);
interpolate(): string | ((points: [number, number][]) => string);
interpolate(interpolate: "linear"): Line<T>;
interpolate(interpolate: "linear-closed"): Line<T>;
interpolate(interpolate: "step"): Line<T>;
@@ -2233,7 +2233,7 @@ declare namespace d3 {
interpolate(interpolate: "cardinal-open"): Line<T>;
interpolate(interpolate: "cardinal-closed"): Line<T>;
interpolate(interpolate: "monotone"): Line<T>;
interpolate(interpolate: string | ((points: Array<[number, number]>) => string)): Line<T>;
interpolate(interpolate: string | ((points: [number, number][]) => string)): Line<T>;
tension(): number;
tension(tension: number): Line<T>;
@@ -2257,7 +2257,7 @@ declare namespace d3 {
angle(angle: number): Radial<T>;
angle(angle: (d: T, i: number) => number): Radial<T>;
interpolate(): string | ((points: Array<[number, number]>) => string);
interpolate(): string | ((points: [number, number][]) => string);
interpolate(interpolate: "linear"): Radial<T>;
interpolate(interpolate: "linear-closed"): Radial<T>;
interpolate(interpolate: "step"): Radial<T>;
@@ -2271,7 +2271,7 @@ declare namespace d3 {
interpolate(interpolate: "cardinal-open"): Radial<T>;
interpolate(interpolate: "cardinal-closed"): Radial<T>;
interpolate(interpolate: "monotone"): Radial<T>;
interpolate(interpolate: string | ((points: Array<[number, number]>) => string)): Radial<T>;
interpolate(interpolate: string | ((points: [number, number][]) => string)): Radial<T>;
tension(): number;
tension(tension: number): Radial<T>;
@@ -2311,7 +2311,7 @@ declare namespace d3 {
y1(y1: number): Area<T>;
y1(y1: (d: T, i: number) => number): Area<T>;
interpolate(): string | ((points: Array<[number, number]>) => string);
interpolate(): string | ((points: [number, number][]) => string);
interpolate(interpolate: "linear"): Area<T>;
interpolate(interpolate: "step"): Area<T>;
interpolate(interpolate: "step-before"): Area<T>;
@@ -2321,7 +2321,7 @@ declare namespace d3 {
interpolate(interpolate: "cardinal"): Area<T>;
interpolate(interpolate: "cardinal-open"): Area<T>;
interpolate(interpolate: "monotone"): Area<T>;
interpolate(interpolate: string | ((points: Array<[number, number]>) => string)): Area<T>;
interpolate(interpolate: string | ((points: [number, number][]) => string)): Area<T>;
tension(): number;
tension(tension: number): Area<T>;
@@ -2361,7 +2361,7 @@ declare namespace d3 {
endAngle(endAngle: number): Radial<T>;
endAngle(endAngle: (d: T, i: number) => number): Radial<T>;
interpolate(): string | ((points: Array<[number, number]>) => string);
interpolate(): string | ((points: [number, number][]) => string);
interpolate(interpolate: "linear"): Radial<T>;
interpolate(interpolate: "step"): Radial<T>;
interpolate(interpolate: "step-before"): Radial<T>;
@@ -2371,7 +2371,7 @@ declare namespace d3 {
interpolate(interpolate: "cardinal"): Radial<T>;
interpolate(interpolate: "cardinal-open"): Radial<T>;
interpolate(interpolate: "monotone"): Radial<T>;
interpolate(interpolate: string | ((points: Array<[number, number]>) => string)): Radial<T>;
interpolate(interpolate: string | ((points: [number, number][]) => string)): Radial<T>;
tension(): number;
tension(tension: number): Radial<T>;
@@ -2757,7 +2757,7 @@ declare namespace d3 {
timeFormat: {
(specifier: string): time.Format;
utc(specifier: string): time.Format;
multi(formats: Array<[string, (d: Date) => boolean|number]>): time.Format;
multi(formats: [string, (d: Date) => boolean|number][]): time.Format;
};
}
@@ -3145,20 +3145,20 @@ declare namespace d3 {
values(): (layer: Series, index: number) => Value[];
values(accessor: (layer: Series, index: number) => Value[]): Stack<Series, Value>;
offset(): (data: Array<[number, number]>) => number[];
offset(): (data: [number, number][]) => number[];
offset(offset: "silhouette"): Stack<Series, Value>;
offset(offset: "wiggle"): Stack<Series, Value>;
offset(offset: "expand"): Stack<Series, Value>;
offset(offset: "zero"): Stack<Series, Value>;
offset(offset: string): Stack<Series, Value>;
offset(offset: (data: Array<[number, number]>) => number[]): Stack<Series, Value>;
offset(offset: (data: [number, number][]) => number[]): Stack<Series, Value>;
order(): (data: Array<[number, number]>) => number[];
order(): (data: [number, number][]) => number[];
order(order: "inside-out"): Stack<Series, Value>;
order(order: "reverse"): Stack<Series, Value>;
order(order: "default"): Stack<Series, Value>;
order(order: string): Stack<Series, Value>;
order(order: (data: Array<[number, number]>) => number[]): Stack<Series, Value>;
order(order: (data: [number, number][]) => number[]): Stack<Series, Value>;
x(): (value: Value, index: number) => number;
x(accessor: (value: Value, index: number) => number): Stack<Series, Value>;
@@ -3290,7 +3290,7 @@ declare namespace d3 {
}
interface Voronoi<T> {
(data: T[]): Array<[number, number]>;
(data: T[]): [number, number][];
x(): (vertex: T) => number;
x(x: (vertex: T) => number): Voronoi<T>;
@@ -3303,13 +3303,13 @@ declare namespace d3 {
links(data: T[]): voronoi.Link<T>[];
triangles(data: T[]): Array<[T, T, T]>;
triangles(data: T[]): [T, T, T][];
}
/**
* @deprecated use d3.geom.voronoi().triangles() instead
*/
export function delaunay(vertices: Array<[number, number]>): Array<[[number, number], [number, number], [number, number]]>;
export function delaunay(vertices: [number, number][]): [[number, number], [number, number], [number, number]][];
export function quadtree(): Quadtree<[number, number]>;
export function quadtree<T>(nodes: T[], x1?: number, y1?: number, x2?: number, y2?: number): quadtree.Quadtree<T>;
@@ -3345,12 +3345,12 @@ declare namespace d3 {
extent(extent: [[number, number], [number, number]]): Quadtree<T>;
}
export function hull(vertices: Array<[number, number]>): Array<[number, number]>;
export function hull(vertices: [number, number][]): [number, number][];
export function hull(): Hull<[number, number]>;
export function hull<T>(): Hull<T>;
interface Hull<T> {
(vertices: T[]): Array<[number, number]>;
(vertices: T[]): [number, number][];
x(): (datum: T) => number;
x(x: (datum: T) => number): Hull<T>;
@@ -3359,14 +3359,14 @@ declare namespace d3 {
y(y: (datum: T) => number): Hull<T>;
}
export function polygon(vertices: Array<[number, number]>): Polygon;
export function polygon(vertices: [number, number][]): Polygon;
interface Polygon {
area(): number;
centroid(): [number, number];
clip(subject: Array<[number, number]>): Array<[number, number]>;
clip(subject: [number, number][]): [number, number][];
}
}
}
+2 -2
View File
@@ -116,7 +116,7 @@ declare namespace d3kit {
constructor(container: d3.Selection<any>, tag?: string);
create(config: string|string[]|LayerConfig|Array<LayerConfig>|any): d3.Selection<any>|Array<d3.Selection<any>>;
create(config: string|string[]|LayerConfig|LayerConfig[]|any): d3.Selection<any>|d3.Selection<any>[];
get(name: string): d3.Selection<any>;
has(name: string): boolean;
}
@@ -140,7 +140,7 @@ declare namespace d3kit {
export function trim(str: string, characters: string): string;
export function dasherize(str: string): string;
export function $(s: Element|string): Element;
export function $$(s: Array<Node>|NodeList): Array<Element>;
export function $$(s: Node[]|NodeList): Element[];
export function isArray(value: any): boolean;
export function isNumber(value: any): boolean;
export function isObject(value: any): boolean;
+4 -4
View File
@@ -315,8 +315,8 @@ declare namespace DC {
useRightAxisGridLines: IGetSet<boolean, ICompositeChart<T>>;
childOptions: IGetSet<any, ICompositeChart<T>>;
rightYAxisLabel: IGetSet<string, ICompositeChart<T>>;
compose: IGetSet<Array<BaseMixin<any>>, ICompositeChart<T>>;
children(): Array<BaseMixin<any>>;
compose: IGetSet<BaseMixin<any>[], ICompositeChart<T>>;
children(): BaseMixin<any>[];
shareColors: IGetSet<boolean, ICompositeChart<T>>;
shareTitle: IGetSet<boolean, ICompositeChart<T>>;
rightY: IGetSet<(n: any) => any, ICompositeChart<T>>;
@@ -341,7 +341,7 @@ declare namespace DC {
export interface GeoChoroplethChart extends ColorMixin<GeoChoroplethChart>, BaseMixin<GeoChoroplethChart> {
overlayGeoJson(json: any, name: string, keyAccessor: Accessor<any, any>): void;
projection: IGetSet<d3.geo.Projection, GeoChoroplethChart>;
geoJsons(): Array<GeoChoroplethLayer>;
geoJsons(): GeoChoroplethLayer[];
geoPath(): d3.geo.Path;
removeGeoJson(name: string): void;
}
@@ -404,7 +404,7 @@ declare namespace DC {
register(chart: BaseMixin<any>, group?: string): void;
deregister(chart: BaseMixin<any>, group?: string): void;
clear(group?: string): void;
list(group?: string): Array<BaseMixin<any>>;
list(group?: string): BaseMixin<any>[];
}
export interface Base {
+13 -13
View File
@@ -41,7 +41,7 @@ interface IQueryAPI {
callback?: (error: IFeedCallbackError, resources: Object[], options: IFeedCallbackOptions) => void): IQueryResponse;
filter<T>(predicate: (document: Object) => boolean,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
callback?: (error: IFeedCallbackError, resources: T[], options: IFeedCallbackOptions) => void): IQueryResponse;
/**
* Produce a new set of documents by mapping/projecting the properties of the documents in the input document stream through the given mapping predicate.
* When map is called by itself, the input document stream is the set of all documents in the current document collection. When used in a chained call, the input document stream is the set of documents returned from the previous query function.
@@ -54,7 +54,7 @@ interface IQueryAPI {
callback?: (error: IFeedCallbackError, resources: Object[], options: IFeedCallbackOptions) => void): IQueryResponse;
map<T>(predicate: (document: Object) => Object,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
callback?: (error: IFeedCallbackError, resources: T[], options: IFeedCallbackOptions) => void): IQueryResponse;
/**
* Produce a new set of documents by extracting a single property from each document in the input document stream. This is equivalent to a map call that projects only propertyName.
* When pluck is called by itself, the input document stream is the set of all documents in the current document collection. When used in a chained call, the input document stream is the set of documents returned from the previous query function.
@@ -67,7 +67,7 @@ interface IQueryAPI {
callback?: (error: IFeedCallbackError, resources: Object[], options: IFeedCallbackOptions) => void): IQueryResponse;
pluck<T>(propertyName: string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
callback?: (error: IFeedCallbackError, resources: T[], options: IFeedCallbackOptions) => void): IQueryResponse;
/**
* Flatten nested arrays from each document in the input document stream.
* When flatten is called by itself, the input document stream is the set of all documents in the current document collection. When used in a chained call, the input document stream is the set of documents returned from the previous query function.
@@ -80,7 +80,7 @@ interface IQueryAPI {
callback?: (error: IFeedCallbackError, resources: Object[], options: IFeedCallbackOptions) => void): IQueryResponse;
flatten<T>(isShallow?: boolean,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
callback?: (error: IFeedCallbackError, resources: T[], options: IFeedCallbackOptions) => void): IQueryResponse;
/**
* Produce a new set of documents by sorting the documents in the input document stream in ascending order using the given predicate.
* When sortBy is called by itself, the input document stream is the set of all documents in the current document collection. When used in a chained call, the input document stream is the set of documents returned from the previous query function.
@@ -96,10 +96,10 @@ interface IQueryAPI {
callback?: (error: IFeedCallbackError, resources: Object[], options: IFeedCallbackOptions) => void): IQueryResponse;
sortBy<T>(predicate: (document: Object) => string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
callback?: (error: IFeedCallbackError, resources: T[], options: IFeedCallbackOptions) => void): IQueryResponse;
sortBy<T>(predicate: (document: Object) => number,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
callback?: (error: IFeedCallbackError, resources: T[], options: IFeedCallbackOptions) => void): IQueryResponse;
/**
* Produce a new set of documents by sorting the documents in the input document stream in descending order using the given predicate.
* When sortByDescending is called by itself, the input document stream is the set of all documents in the current document collection. When used in a chained call, the input document stream is the set of documents returned from the previous query function.
@@ -115,10 +115,10 @@ interface IQueryAPI {
callback?: (error: IFeedCallbackError, resources: Object[], options: IFeedCallbackOptions) => void): IQueryResponse;
sortByDescending<T>(predicate: (document: Object) => string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
callback?: (error: IFeedCallbackError, resources: T[], options: IFeedCallbackOptions) => void): IQueryResponse;
sortByDescending<T>(predicate: (document: Object) => number,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
callback?: (error: IFeedCallbackError, resources: T[], options: IFeedCallbackOptions) => void): IQueryResponse;
/**
* Terminating call for a chained query. Should be used in conjunction with the opening chain call to perform chained queries.
* When value is called, the query is queued for execution with the given options and callback.
@@ -128,7 +128,7 @@ interface IQueryAPI {
value(options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Object[], options: IFeedCallbackOptions) => void): IQueryResponse;
value<T>(options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): IQueryResponse;
callback?: (error: IFeedCallbackError, resources: T[], options: IFeedCallbackOptions) => void): IQueryResponse;
}
/**
@@ -221,7 +221,7 @@ interface ICollection extends IQueryAPI {
queryDocuments<T>(collectionLink: string,
filterQuery: string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): boolean;
callback?: (error: IFeedCallbackError, resources: T[], options: IFeedCallbackOptions) => void): boolean;
queryDocuments(collectionLink: string,
filterQuery: IParameterizedQuery,
options?: IFeedOptions,
@@ -229,7 +229,7 @@ interface ICollection extends IQueryAPI {
queryDocuments<T>(collectionLink: string,
filterQuery: IParameterizedQuery,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): boolean;
callback?: (error: IFeedCallbackError, resources: T[], options: IFeedCallbackOptions) => void): boolean;
/**
* Read an Attachment.
@@ -275,7 +275,7 @@ interface ICollection extends IQueryAPI {
callback?: (error: IFeedCallbackError, resources: Object[], options: IFeedCallbackOptions) => void): boolean;
readDocuments<T>(collectionLink: string,
options?: IFeedOptions,
callback?: (error: IFeedCallbackError, resources: Array<T>, options: IFeedCallbackOptions) => void): boolean;
callback?: (error: IFeedCallbackError, resources: T[], options: IFeedCallbackOptions) => void): boolean;
/**
* Replace an attachment.
@@ -500,7 +500,7 @@ interface IParameterizedQuery {
/** SQL query string. */
query: string;
/** Parameters */
parameters: Array<IQueryParam>;
parameters: IQueryParam[];
}
/** Parameter interface for parameterized queries */
+6 -6
View File
@@ -28,7 +28,7 @@ declare namespace DotObject {
* @param {Function|Array} mods
* @param {Boolean} merge
*/
copy(source: string, target: string, obj1: any, obj2: any, mods?: ModifierFunctionWrapper | Array<ModifierFunctionWrapper>, merge?: boolean): void;
copy(source: string, target: string, obj1: any, obj2: any, mods?: ModifierFunctionWrapper | ModifierFunctionWrapper[], merge?: boolean): void;
/**
*
* Convert object to dotted-key/value pair
@@ -68,7 +68,7 @@ declare namespace DotObject {
* @param {Function|Array} mods
* @param {Boolean} merge
*/
move(source: string, target: string, obj: any, mods?: ModifierFunctionWrapper | Array<ModifierFunctionWrapper>, merge?: boolean): void;
move(source: string, target: string, obj: any, mods?: ModifierFunctionWrapper | ModifierFunctionWrapper[], merge?: boolean): void;
/**
*
* Converts an object with dotted-key/value pairs to it's expanded version
@@ -91,7 +91,7 @@ declare namespace DotObject {
* @param {Object} obj
* @param {Object} mods
*/
object(obj: any, mods?: ModifierFunctionWrapper | Array<ModifierFunctionWrapper>): void;
object(obj: any, mods?: ModifierFunctionWrapper | ModifierFunctionWrapper[]): void;
/**
*
* Pick a value from an object using dot notation.
@@ -118,7 +118,7 @@ declare namespace DotObject {
* @param {Object} obj object to be modified
* @param {Function|Array} mods optional modifier
*/
str(path: string, v: any, obj: Object, mods?: ModifierFunctionWrapper | Array<ModifierFunctionWrapper>): void;
str(path: string, v: any, obj: Object, mods?: ModifierFunctionWrapper | ModifierFunctionWrapper[]): void;
/**
*
* Transfer a property from one object to another object.
@@ -133,7 +133,7 @@ declare namespace DotObject {
* @param {Function|Array} mods
* @param {Boolean} merge
*/
transfer(source: string, target: string, obj1: any, obj2: any, mods?: ModifierFunctionWrapper | Array<ModifierFunctionWrapper>, merge?: boolean): void;
transfer(source: string, target: string, obj1: any, obj2: any, mods?: ModifierFunctionWrapper | ModifierFunctionWrapper[], merge?: boolean): void;
/**
*
* Transform an object
@@ -158,7 +158,7 @@ declare namespace DotObject {
* @param {Object} obj Object to be transformed
* @param {Array} mods modifiers for the target
*/
transform(recipe: any, obj: any, mods?: ModifierFunctionWrapper | Array<ModifierFunctionWrapper>): void;
transform(recipe: any, obj: any, mods?: ModifierFunctionWrapper | ModifierFunctionWrapper[]): void;
}
}
+6 -6
View File
@@ -47,7 +47,7 @@ declare module "draft-js" {
}
interface BlockMapBuilder {
createFromArray(blocks: Array<ContentBlock>): BlockMap;
createFromArray(blocks: ContentBlock[]): BlockMap;
}
interface CharacterMetadata {
@@ -93,7 +93,7 @@ declare module "draft-js" {
interface ContentState {
createFromText(text: string): ContentState;
createFromBlockArray(blocks: Array<ContentBlock>): ContentState;
createFromBlockArray(blocks: ContentBlock[]): ContentState;
getBlockMap(): BlockMap;
getSelectionBefore(): SelectionState;
@@ -106,7 +106,7 @@ declare module "draft-js" {
getBlockBefore(key: string): ContentBlock;
getBlockAfter(key: string): ContentBlock;
getBlocksAsArray(): Array<ContentBlock>;
getBlocksAsArray(): ContentBlock[];
getPlainText(): string;
hasText(): boolean;
@@ -224,8 +224,8 @@ declare module "draft-js" {
handleReturn?: (e: any) => boolean;
handleKeyCommand?: (command: string) => boolean;
handleBeforeInput?: (chars: string) => boolean;
handlePastedFiles?: (files: Array<Blob>) => boolean;
handleDroppedFiles?: (selection: SelectionState, files: Array<Blob>) => boolean;
handlePastedFiles?: (files: Blob[]) => boolean;
handleDroppedFiles?: (selection: SelectionState, files: Blob[]) => boolean;
handleDrop?: (selection: SelectionState, dataTransfer: any, isInternal: any) => boolean;
onEscape?: (e: any) => void;
@@ -265,7 +265,7 @@ declare module "draft-js" {
var Modifier: Modifier;
var RichUtils: RichUtils;
function convertFromRaw(rawState: any): Array<ContentBlock>;
function convertFromRaw(rawState: any): ContentBlock[];
function convertToRaw(contentState: ContentState): any;
+10 -10
View File
@@ -124,10 +124,10 @@ declare namespace Draft {
handlePastedText?(text: string, html?: string): boolean;
handlePastedFiles?(files: Array<Blob>): boolean;
handlePastedFiles?(files: Blob[]): boolean;
// Handle dropped files
handleDroppedFiles?(selection: SelectionState, files: Array<Blob>): boolean;
handleDroppedFiles?(selection: SelectionState, files: Blob[]): boolean;
// Handle other drops to prevent default text movement/insertion behaviour
handleDrop?(selection: SelectionState, dataTransfer: Object, isInternal: DraftDragType): boolean;
@@ -369,7 +369,7 @@ declare namespace Draft {
* preserved and the new match is discarded.
*/
class CompositeDraftDecorator {
constructor(decorators: Array<DraftDecorator>);
constructor(decorators: DraftDecorator[]);
getDecorations(block: ContentBlock): Immutable.List<string>;
getComponentForKey(key: string): Function;
@@ -426,8 +426,8 @@ declare namespace Draft {
type: DraftBlockType;
text: string;
depth: number;
inlineStyleRanges: Array<InlineStyleRange>;
entityRanges: Array<EntityRange>;
inlineStyleRanges: InlineStyleRange[];
entityRanges: EntityRange[];
data?: Object;
}
@@ -441,11 +441,11 @@ declare namespace Draft {
* immutable objects.
*/
interface RawDraftContentState {
blocks: Array<RawDraftContentBlock>;
blocks: RawDraftContentBlock[];
entityMap: { [key: string]: RawDraftEntity };
}
function convertFromHTMLtoContentBlocks(html: string, DOMBuilder: Function, blockRenderMap?: DraftBlockRenderMap): Array<ContentBlock>;
function convertFromHTMLtoContentBlocks(html: string, DOMBuilder: Function, blockRenderMap?: DraftBlockRenderMap): ContentBlock[];
function convertFromRawToDraftState(rawState: RawDraftContentState): ContentState;
function convertFromDraftStateToRaw(contentState: ContentState): RawDraftContentState;
}
@@ -685,7 +685,7 @@ declare namespace Draft {
}
class ContentState extends Record {
static createFromBlockArray(blocks: Array<ContentBlock>): ContentState;
static createFromBlockArray(blocks: ContentBlock[]): ContentState;
static createFromText(text: string, delimiter?: string): ContentState;
getBlockMap(): BlockMap;
@@ -698,7 +698,7 @@ declare namespace Draft {
getBlockAfter(key: string): ContentBlock;
getBlockBefore(key: string): ContentBlock;
getBlocksAsArray(): Array<ContentBlock>;
getBlocksAsArray(): ContentBlock[];
getFirstBlock(): ContentBlock;
getLastBlock(): ContentBlock;
getPlainText(delimiter?: string): string;
@@ -768,7 +768,7 @@ declare namespace Draft {
"undo";
interface BlockMapBuilder {
createFromArray(blocks: Array<ContentBlock>): BlockMap;
createFromArray(blocks: ContentBlock[]): BlockMap;
}
const DefaultDraftBlockRenderMap: Immutable.Map<any, any>;
+1 -1
View File
@@ -224,7 +224,7 @@ declare namespace dygraphs {
pixels: number,
opts: (name: string) => any,
dygraph: Dygraph,
vals: number[]) => Array<{v: number, label: string}>;
vals: number[]) => {v: number, label: string}[];
/**
+2 -2
View File
@@ -129,7 +129,7 @@ declare namespace JQueryDynatable {
*/
defaultColumnIdStyle?: string;
/** Generated internally by the plugin, will be reset by the DomColumns at init */
columns?: Array<JQueryDynatable.Column>;
columns?: JQueryDynatable.Column[];
/**
* Selector used by dynatable in order to find the table header row
*
@@ -499,7 +499,7 @@ declare namespace JQueryDynatable {
* return '<tr>' + tr + '</tr>';
* };
*/
_rowWriter?: (rowIndex: number, record: any, columns: Array<Column>, cellWriter: Function) => string;
_rowWriter?: (rowIndex: number, record: any, columns: Column[], cellWriter: Function) => string;
/**
* Function that returns the HTML code that will be injected for the cell
*
+17 -17
View File
@@ -2308,7 +2308,7 @@ export interface MultiColumnSettings {
/** Field and Header Text collections can be defined and customized through columns field.
*/
columns?: Array<MultiColumnSettingsColumn>;
columns?: MultiColumnSettingsColumn[];
}
enum Animation{
@@ -11278,7 +11278,7 @@ export interface Model {
/** Specifies the contextual tabs and tab set to the ribbon control with the background color and border color. Refer to the tabs section for adding tabs into the contextual tab and contextual tab set.
* @Default {array}
*/
contextualTabs?: Array<ContextualTab>;
contextualTabs?: ContextualTab[];
/** Specifies the index or indexes to disable the given index tab or indexes tabs in the ribbon control.
* @Default {0}
@@ -11298,7 +11298,7 @@ export interface Model {
/** Specifies the tabs and its groups. Also specifies the control details that has to be placed in the tab area in the ribbon control.
* @Default {array}
*/
tabs?: Array<Tab>;
tabs?: Tab[];
/** Gets or sets a value that indicates whether to customizing the user interface (UI) as locale-specific in order to display regional data i.e. in a language and culture specific to a particular country or region and it will need to use the user's preference.
* @Default {en-US}
@@ -11783,7 +11783,7 @@ export interface ApplicationTabBackstageSettings {
/** Specifies the ribbon backstage page with its tab and button elements.
* @Default {array}
*/
pages?: Array<ApplicationTabBackstageSettingsPage>;
pages?: ApplicationTabBackstageSettingsPage[];
/** Specifies the width of backstage page header that contains tabs and buttons.
* @Default {null}
@@ -12465,7 +12465,7 @@ export interface Model {
/** Gets or sets an object that indicates to render the Kanban with specified columns.
* @Default {array}
*/
columns?: Array<Column>;
columns?: Column[];
/** Gets or sets an object that indicates whether to Customize the card settings.
* @Default {Object}
@@ -13451,7 +13451,7 @@ export interface ContextMenuSettings {
/** Gets or sets a value that indicates whether to add custom contextMenu items.
* @Default {array}
*/
customMenuItems?: Array<ContextMenuSettingsCustomMenuItem>;
customMenuItems?: ContextMenuSettingsCustomMenuItem[];
}
export interface ColumnsConstraints {
@@ -20687,7 +20687,7 @@ export interface Model {
/** Gets or sets an object that indicates to render the grid with specified columns
* @Default {[]}
*/
columns?: Array<Column>;
columns?: Column[];
/** Gets or sets an object that indicates whether to customize the context menu behavior of the grid.
*/
@@ -26077,17 +26077,17 @@ export interface DataSource {
/** Lists out the items to be displayed as segments of PivotChart.
* @Default {[]}
*/
rows?: Array<DataSourceRow>;
rows?: DataSourceRow[];
/** Lists out the items supports calculation in PivotChart.
* @Default {[]}
*/
values?: Array<DataSourceValue>;
values?: DataSourceValue[];
/** Lists out the items which supports filtering of values without displaying the members in UI in PivotChart.
* @Default {[]}
*/
filters?: Array<DataSourceFilter>;
filters?: DataSourceFilter[];
}
export interface ServiceMethodSettings {
@@ -27403,17 +27403,17 @@ export interface DataSource {
/** Lists out the items to bind in rows section.
* @Default {[]}
*/
rows?: Array<DataSourceRow>;
rows?: DataSourceRow[];
/** Lists out the items supports calculation in PivotGauge.
* @Default {[]}
*/
values?: Array<DataSourceValue>;
values?: DataSourceValue[];
/** Lists out the items which supports filtering of values without displaying the members in UI in PivotGauge.
* @Default {[]}
*/
filters?: Array<DataSourceFilter>;
filters?: DataSourceFilter[];
}
export interface LabelFormatSettings {
@@ -27811,17 +27811,17 @@ export interface DataSource {
/** Lists out the items to be displayed as segments of PivotTreeMap.
* @Default {[]}
*/
rows?: Array<DataSourceRow>;
rows?: DataSourceRow[];
/** Lists out the items supports calculation in PivotTreeMap.
* @Default {[]}
*/
values?: Array<DataSourceValue>;
values?: DataSourceValue[];
/** Lists out the items which supports filtering of values without displaying the members in UI in PivotTreeMap.
* @Default {[]}
*/
filters?: Array<DataSourceFilter>;
filters?: DataSourceFilter[];
}
export interface ServiceMethodSettings {
@@ -32149,7 +32149,7 @@ export interface Model {
/** Option for adding columns; each column has the option to bind to a field in the dataSource.
*/
columns?: Array<Column>;
columns?: Column[];
/** To Specify the column fields to be displayed in the dialog while inserting a column using column menu.
* @Default {[]}
+1 -1
View File
@@ -49,7 +49,7 @@ declare module "epub" {
manifest: Object;
spine: Object;
flow: Object[];
toc: Array<TocElement>;
toc: TocElement[];
parse(): void;
+8 -8
View File
@@ -145,7 +145,7 @@ interface ArrayConstructor {
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
/**
* Creates an array from an iterable object.
@@ -153,25 +153,25 @@ interface ArrayConstructor {
* @param mapfn A mapping function to call on every element of the array.
* @param thisArg Value of 'this' used to invoke the mapfn.
*/
from<T, U>(iterable: IterableShim<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
from<T, U>(iterable: IterableShim<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
/**
* Creates an array from an array-like object.
* @param arrayLike An array-like object to convert to an array.
*/
from<T>(arrayLike: ArrayLike<T>): Array<T>;
from<T>(arrayLike: ArrayLike<T>): T[];
/**
* Creates an array from an iterable object.
* @param iterable An iterable object to convert to an array.
*/
from<T>(iterable: IterableShim<T>): Array<T>;
from<T>(iterable: IterableShim<T>): T[];
/**
* Returns a new array from a set of elements.
* @param items A set of elements to include in the new array object.
*/
of<T>(...items: T[]): Array<T>;
of<T>(...items: T[]): T[];
}
interface Array<T> {
@@ -184,7 +184,7 @@ interface Array<T> {
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
find(predicate: (value: T, index: number, obj: T[]) => boolean, thisArg?: any): T;
/**
* Returns the index of the first element in the array where predicate is true, and undefined
@@ -633,7 +633,7 @@ declare namespace Reflect {
function getPrototypeOf(target: any): any;
function has(target: any, propertyKey: PropertyKey): boolean;
function isExtensible(target: any): boolean;
function ownKeys(target: any): Array<PropertyKey>;
function ownKeys(target: any): PropertyKey[];
function preventExtensions(target: any): boolean;
function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
function setPrototypeOf(target: any, proto: any): boolean;
@@ -661,7 +661,7 @@ declare module "es6-shim" {
function getPrototypeOf(target: any): any;
function has(target: any, propertyKey: PropertyKey): boolean;
function isExtensible(target: any): boolean;
function ownKeys(target: any): Array<PropertyKey>;
function ownKeys(target: any): PropertyKey[];
function preventExtensions(target: any): boolean;
function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
function setPrototypeOf(target: any, proto: any): boolean;
+1 -1
View File
@@ -14,7 +14,7 @@ declare namespace esprima {
const version: string;
function parse(code: string, options?: Options): ESTree.Program;
function tokenize(code: string, options?: Options): Array<Token>;
function tokenize(code: string, options?: Options): Token[];
interface Token {
type: string;
+11 -11
View File
@@ -41,7 +41,7 @@ declare namespace ESTree {
id: Identifier;
typeParameters?: TypeParameterDeclaration;
body: ObjectTypeAnnotation;
extends: Array<InterfaceExtends>;
extends: InterfaceExtends[];
}
interface DeclareFunction extends FlowDeclaration {
@@ -58,7 +58,7 @@ declare namespace ESTree {
}
interface FunctionTypeAnnotation extends FlowTypeAnnotation {
params: Array<FunctionTypeParam>;
params: FunctionTypeParam[];
returnType: FlowTypeAnnotation;
rest?: FunctionTypeParam;
typeParameters?: TypeParameterDeclaration;
@@ -83,12 +83,12 @@ declare namespace ESTree {
interface InterfaceDeclaration extends FlowDeclaration {
id: Identifier;
typeParameters?: TypeParameterDeclaration;
extends: Array<InterfaceExtends>;
extends: InterfaceExtends[];
body: ObjectTypeAnnotation;
}
interface IntersectionTypeAnnotation extends FlowTypeAnnotation {
types: Array<FlowTypeAnnotation>;
types: FlowTypeAnnotation[];
}
interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {}
@@ -106,7 +106,7 @@ declare namespace ESTree {
interface StringTypeAnnotation extends FlowBaseTypeAnnotation {}
interface TupleTypeAnnotation extends FlowTypeAnnotation {
types: Array<FlowTypeAnnotation>;
types: FlowTypeAnnotation[];
}
interface TypeofTypeAnnotation extends FlowTypeAnnotation {
@@ -129,17 +129,17 @@ declare namespace ESTree {
}
interface TypeParameterDeclaration extends Node {
params: Array<Identifier>;
params: Identifier[];
}
interface TypeParameterInstantiation extends Node {
params: Array<FlowTypeAnnotation>;
params: FlowTypeAnnotation[];
}
interface ObjectTypeAnnotation extends FlowTypeAnnotation {
properties: Array<ObjectTypeProperty>;
indexers: Array<ObjectTypeIndexer>;
callProperties: Array<ObjectTypeCallProperty>;
properties: ObjectTypeProperty[];
indexers: ObjectTypeIndexer[];
callProperties: ObjectTypeCallProperty[];
}
interface ObjectTypeCallProperty extends Node {
@@ -167,7 +167,7 @@ declare namespace ESTree {
}
interface UnionTypeAnnotation extends FlowTypeAnnotation {
types: Array<FlowTypeAnnotation>;
types: FlowTypeAnnotation[];
}
interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {}
+19 -19
View File
@@ -26,8 +26,8 @@ interface BaseNode {
// The type property should be a string literal. For example, Identifier
// has: `type: "Identifier"`
leadingComments?: Array<Comment>;
trailingComments?: Array<Comment>;
leadingComments?: Comment[];
trailingComments?: Comment[];
loc?: SourceLocation;
range?: [number, number];
}
@@ -57,11 +57,11 @@ export interface Position {
export interface Program extends BaseNode {
type: "Program";
sourceType: "script" | "module";
body: Array<Statement | ModuleDeclaration>;
body: (Statement | ModuleDeclaration)[];
}
interface BaseFunction extends BaseNode {
params: Array<Pattern>;
params: Pattern[];
generator?: boolean;
async?: boolean;
// The body is either BlockStatement or Expression because arrow functions
@@ -88,7 +88,7 @@ export interface EmptyStatement extends BaseStatement {
export interface BlockStatement extends BaseStatement {
type: "BlockStatement";
body: Array<Statement>;
body: Statement[];
}
export interface ExpressionStatement extends BaseStatement {
@@ -128,7 +128,7 @@ export interface WithStatement extends BaseStatement {
export interface SwitchStatement extends BaseStatement {
type: "SwitchStatement";
discriminant: Expression;
cases: Array<SwitchCase>;
cases: SwitchCase[];
}
export interface ReturnStatement extends BaseStatement {
@@ -194,7 +194,7 @@ export interface FunctionDeclaration extends BaseFunction, BaseDeclaration {
export interface VariableDeclaration extends BaseDeclaration {
type: "VariableDeclaration";
declarations: Array<VariableDeclarator>;
declarations: VariableDeclarator[];
kind: "var" | "let" | "const";
}
@@ -220,12 +220,12 @@ export interface ThisExpression extends BaseExpression {
export interface ArrayExpression extends BaseExpression {
type: "ArrayExpression";
elements: Array<Expression | SpreadElement>;
elements: (Expression | SpreadElement)[];
}
export interface ObjectExpression extends BaseExpression {
type: "ObjectExpression";
properties: Array<Property>;
properties: Property[];
}
export interface Property extends BaseNode {
@@ -246,7 +246,7 @@ export interface FunctionExpression extends BaseFunction, BaseExpression {
export interface SequenceExpression extends BaseExpression {
type: "SequenceExpression";
expressions: Array<Expression>;
expressions: Expression[];
}
export interface UnaryExpression extends BaseExpression {
@@ -293,7 +293,7 @@ export interface ConditionalExpression extends BaseExpression {
interface BaseCallExpression extends BaseExpression {
callee: Expression | Super;
arguments: Array<Expression | SpreadElement>;
arguments: (Expression | SpreadElement)[];
}
export type CallExpression = SimpleCallExpression | NewExpression;
@@ -320,7 +320,7 @@ interface BasePattern extends BaseNode { }
export interface SwitchCase extends BaseNode {
type: "SwitchCase";
test?: Expression;
consequent: Array<Statement>;
consequent: Statement[];
}
export interface CatchClause extends BaseNode {
@@ -395,8 +395,8 @@ export interface YieldExpression extends BaseExpression {
export interface TemplateLiteral extends BaseExpression {
type: "TemplateLiteral";
quasis: Array<TemplateElement>;
expressions: Array<Expression>;
quasis: TemplateElement[];
expressions: Expression[];
}
export interface TaggedTemplateExpression extends BaseExpression {
@@ -422,12 +422,12 @@ export interface AssignmentProperty extends Property {
export interface ObjectPattern extends BasePattern {
type: "ObjectPattern";
properties: Array<AssignmentProperty>;
properties: AssignmentProperty[];
}
export interface ArrayPattern extends BasePattern {
type: "ArrayPattern";
elements: Array<Pattern>;
elements: Pattern[];
}
export interface RestElement extends BasePattern {
@@ -449,7 +449,7 @@ interface BaseClass extends BaseNode {
export interface ClassBody extends BaseNode {
type: "ClassBody";
body: Array<MethodDefinition>;
body: MethodDefinition[];
}
export interface MethodDefinition extends BaseNode {
@@ -491,7 +491,7 @@ interface BaseModuleSpecifier extends BaseNode {
export interface ImportDeclaration extends BaseModuleDeclaration {
type: "ImportDeclaration";
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
specifiers: (ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[];
source: Literal;
}
@@ -511,7 +511,7 @@ export interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
export interface ExportNamedDeclaration extends BaseModuleDeclaration {
type: "ExportNamedDeclaration";
declaration?: Declaration;
specifiers: Array<ExportSpecifier>;
specifiers: ExportSpecifier[];
source?: Literal;
}
+1 -1
View File
@@ -48,7 +48,7 @@ export interface Call {
export interface Spy {
__isSpy: Boolean;
calls: Array<Call>;
calls: Call[];
andCall(fn: Function): Spy;
andCallThrough(): Spy;
andThrow(object: Object): Spy;
+5 -5
View File
@@ -34,17 +34,17 @@ declare namespace FalcorJsonGraph {
/**
* A part of a {@link PathSet} that can be either a {@link Key}, {@link Range}, or Array of either.
**/
type KeySet = Key | Range | Array<Key | Range>;
type KeySet = Key | Range | (Key | Range)[];
/**
* An ordered list of {@link Key}s that point to a value in a {@link JSONGraph}.
**/
type Path = Array<Key>;
type Path = Key[];
/**
* An ordered list of {@link KeySet}s that point to location(s) in the {@link JSONGraph}. It enables pointing to multiple locations in a more terse format than a set of {@link Path}s and is generally more efficient to evaluate.
**/
type PathSet = Array<KeySet>;
type PathSet = KeySet[];
/**
* A wrapper around a path and its value.
@@ -71,8 +71,8 @@ declare namespace FalcorJsonGraph {
**/
interface JSONGraphEnvelope {
jsonGraph: JSONGraph;
paths?: Array<PathSet>;
invalidate?: Array<PathSet>;
paths?: PathSet[];
invalidate?: PathSet[];
}
/**
+3 -3
View File
@@ -10,7 +10,7 @@ import DataSource = FalcorModel.DataSource;
declare class FalcorRouter extends DataSource {
constructor(routes: Array<FalcorRouter.RouteDefinition>, options?: FalcorRouter.RouterOptions);
constructor(routes: FalcorRouter.RouteDefinition[], options?: FalcorRouter.RouterOptions);
/**
* When a route misses on a call, get, or set the unhandledDataSource will
@@ -18,7 +18,7 @@ declare class FalcorRouter extends DataSource {
**/
routeUnhandledPathsTo(dataSource: DataSource): void;
static createClass(routes?: Array<FalcorRouter.RouteDefinition>): typeof FalcorRouter.CreatedRouter;
static createClass(routes?: FalcorRouter.RouteDefinition[]): typeof FalcorRouter.CreatedRouter;
}
declare namespace FalcorRouter {
@@ -46,7 +46,7 @@ declare namespace FalcorRouter {
}
type RouteDefinition = GetRoute | SetRoute | CallRoute;
type RouteResult = FalcorJsonGraph.PathValue | Array<FalcorJsonGraph.PathValue> | FalcorJsonGraph.JSONEnvelope<any>;
type RouteResult = FalcorJsonGraph.PathValue | FalcorJsonGraph.PathValue[] | FalcorJsonGraph.JSONEnvelope<any>;
interface RouterOptions {
debug?: boolean;
+13 -13
View File
@@ -41,7 +41,7 @@ declare namespace FalcorModel {
/**
* The get method retrieves values from the DataSource's associated JSONGraph object.
**/
get(pathSets: Array<PathSet>): Observable<JSONGraphEnvelope>;
get(pathSets: PathSet[]): Observable<JSONGraphEnvelope>;
/**
@@ -53,7 +53,7 @@ declare namespace FalcorModel {
/**
* Invokes a function in the DataSource's JSONGraph object.
**/
call(functionPath: Path, args?: any[], refSuffixes?: Array<PathSet>, thisPaths?: Array<PathSet>): Observable<JSONGraphEnvelope>;
call(functionPath: Path, args?: any[], refSuffixes?: PathSet[], thisPaths?: PathSet[]): Observable<JSONGraphEnvelope>;
}
@@ -101,35 +101,35 @@ declare namespace FalcorModel {
/**
* The get method retrieves several {@link Path}s or {@link PathSet}s from a {@link Model}. The get method loads each value into a JSON object and returns in a ModelResponse.
**/
get(...path: Array<string | PathSet>): ModelResponse<JSONEnvelope<any>>;
get<T>(...path: Array<string | PathSet>): ModelResponse<JSONEnvelope<T>>;
get(...path: (string | PathSet)[]): ModelResponse<JSONEnvelope<any>>;
get<T>(...path: (string | PathSet)[]): ModelResponse<JSONEnvelope<T>>;
/**
* Sets the value at one or more places in the JSONGraph model. The set method accepts one or more {@link PathValue}s, each of which is a combination of a location in the document and the value to place there. In addition to accepting {@link PathValue}s, the set method also returns the values after the set operation is complete.
**/
set(...args: Array<PathValue>): ModelResponse<JSONEnvelope<any>>;
set<T>(...args: Array<PathValue>): ModelResponse<JSONEnvelope<T>>;
set(...args: PathValue[]): ModelResponse<JSONEnvelope<any>>;
set<T>(...args: PathValue[]): ModelResponse<JSONEnvelope<T>>;
set(jsonGraph: JSONGraph): ModelResponse<JSONEnvelope<any>>;
set<T>(jsonGraph: JSONGraph): ModelResponse<JSONEnvelope<T>>;
/**
* The preload method retrieves several {@link Path}s or {@link PathSet}s from a {@link Model} and loads them into the Model cache.
**/
preload(...path: Array<PathSet>): void;
preload(...path: PathSet[]): void;
/**
* Invokes a function in the JSON Graph.
**/
// NOTE: In http://netflix.github.io/falcor/doc/Model.html#call, it says that refPaths should be an array<PathSet>.
// However, model implementation returns an error with setting refPaths as Array<PathSet> and it works with refPaths as PathSet.
// NOTE: In http://netflix.github.io/falcor/doc/Model.html#call, it says that refPaths should be a PathSet[].
// However, model implementation returns an error with setting refPaths as PathSet[] and it works with refPaths as PathSet.
// So refPaths is defined as a PathSet in this .d.ts.
call(functionPath: string | Path, args?: any[], refPaths?: PathSet, thisPaths?: Array<PathSet>): ModelResponse<JSONEnvelope<any>>;
call<T>(functionPath: string | Path, args?: any[], refPaths?: PathSet, thisPaths?: Array<PathSet>): ModelResponse<JSONEnvelope<T>>;
call(functionPath: string | Path, args?: any[], refPaths?: PathSet, thisPaths?: PathSet[]): ModelResponse<JSONEnvelope<any>>;
call<T>(functionPath: string | Path, args?: any[], refPaths?: PathSet, thisPaths?: PathSet[]): ModelResponse<JSONEnvelope<T>>;
/**
* The invalidate method synchronously removes several {@link Path}s or {@link PathSet}s from a {@link Model} cache.
**/
invalidate(...path: Array<PathSet>): void;
invalidate(...path: PathSet[]): void;
/**
* Returns a new {@link Model} bound to a location within the {@link JSONGraph}. The bound location is never a {@link Reference}: any {@link Reference}s encountered while resolving the bound {@link Path} are always replaced with the {@link Reference}s target value. For subsequent operations on the {@link Model}, all paths will be evaluated relative to the bound path. Deref allows you to:
@@ -159,7 +159,7 @@ declare namespace FalcorModel {
/**
* Get the local {@link JSONGraph} cache. This method can be a useful to store the state of the cache.
**/
getCache(...path: Array<PathSet>): JSONGraph;
getCache(...path: PathSet[]): JSONGraph;
/**
* Retrieves a number which is incremented every single time a value is changed underneath the Model or the object at an optionally-provided Path beneath the Model.
+3 -3
View File
@@ -109,8 +109,8 @@ interface MockOptions {
type MockCall = [string, MockRequest];
interface MatchedRoutes {
matched: Array<MockCall>;
unmatched: Array<MockCall>;
matched: MockCall[];
unmatched: MockCall[];
}
interface MockOptionsMethodGet extends MockOptions {
@@ -225,7 +225,7 @@ interface FetchMockStatic {
/**
* Returns all calls to fetch matching matcherName.
*/
calls(matcherName?: string): Array<MockCall>;
calls(matcherName?: string): MockCall[];
/**
* Returns a Boolean indicating whether fetch was called and a route
was matched.
+1 -1
View File
@@ -53,7 +53,7 @@ declare namespace AtomFirstMate {
* @param text A string containing one or more lines.
* @return An array of token arrays, one token array per line.
*/
tokenizeLines(text: string): Array<Array<IToken>>;
tokenizeLines(text: string): IToken[][];
/**
* Tokenizes a line of text.
*
+3 -3
View File
@@ -33,9 +33,9 @@ declare namespace FlightplanInterfaces {
exec(command: string, options?: { exec: any }): CommandResult;
sudo(command: string, options?: SudoOptions): CommandResult;
transfer(files: CommandResult, remoteDir: string, options?: CommandOptions): Array<CommandResult>;
transfer(files: CommandResult[], remoteDir: string, options?: CommandOptions): Array<CommandResult>;
transfer(files: string[], remoteDir: string, options?: CommandOptions): Array<CommandResult>;
transfer(files: CommandResult, remoteDir: string, options?: CommandOptions): CommandResult[];
transfer(files: CommandResult[], remoteDir: string, options?: CommandOptions): CommandResult[];
transfer(files: string[], remoteDir: string, options?: CommandOptions): CommandResult[];
prompt(message: string, options?: PromptOptions): string;
waitFor(fn: (done: (result: any) => void) => void): any;
+3 -3
View File
@@ -21,7 +21,7 @@ declare namespace Fluxxor {
class Flux extends EventEmitter3.EventEmitter {
constructor(stores: any, actions: any);
addActions(actions: any): void;
addAction(...args: Array<string|Function>): void;
addAction(...args: (string | Function)[]): void;
addAction(names: string[], action: Function): void;
store(name: string): any;
addStore(name: string, store: Store): void;
@@ -31,8 +31,8 @@ declare namespace Fluxxor {
}
interface Store extends EventEmitter3.EventEmitter {
bindActions(...args: Array<string|Function>): void;
bindActions(args: Array<string|Function>): void;
bindActions(...args: (string | Function)[]): void;
bindActions(args: (string | Function)[]): void;
waitFor(stores: string[], fn: Function): void;
}
+4 -4
View File
@@ -3,7 +3,7 @@
// Definitions by: Glenn Dierckx <https://github.com/glenndierckx>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function from<T>(results: Array<T>): FromJS.IQueryable<T>;
declare function from<T>(results: T[]): FromJS.IQueryable<T>;
declare function from<T>(results: any): FromJS.IQueryable<any>;
declare namespace FromJS {
@@ -17,7 +17,7 @@ declare namespace FromJS {
select<TResult>(item: (item: T) => TResult): IQueryable<TResult>;
orderByDesc<TResult>(item: (item: T) => TResult): IOrderedQueryable<T>;
orderBy<TResult>(item: (item: T) => TResult): IOrderedQueryable<T>;
selectMany<TResult>(item: (item: T) => Array<TResult>): IQueryable<TResult>;
selectMany<TResult>(item: (item: T) => TResult[]): IQueryable<TResult>;
skip<TResult>(count: Number): IQueryable<TResult>;
take<TResult>(count: Number): IQueryable<TResult>;
single(): T;
@@ -34,8 +34,8 @@ declare namespace FromJS {
firstOrDefault(): T;
each<TKey>(action: (value: T, key: TKey) => void): void;
each(action: (item: T) => void, a?: boolean): void;
toArray(): Array<T>;
concat(second: Array<T>): IQueryable<T>;
toArray(): T[];
concat(second: T[]): IQueryable<T>;
sum(): T;
distinct(): IQueryable<T>;
any(): boolean;
+3 -3
View File
@@ -50,7 +50,7 @@ export interface Options extends AgendaOptions, EventDraggingResizingOptions, Dr
weekMode?: string;
weekNumbers?: boolean;
weekNumberCalculation?: any; // String/Function
businessHours?: boolean | BusinessHours | Array<BusinessHours>;
businessHours?: boolean | BusinessHours | BusinessHours[];
height?: number;
contentHeight?: number;
aspectRatio?: number;
@@ -366,12 +366,12 @@ declare global {
/**
* Retrieves events that FullCalendar has in memory.
*/
fullCalendar(method: 'clientEvents', idOrfilter?: any): Array<EventObject>;
fullCalendar(method: 'clientEvents', idOrfilter?: any): EventObject[];
/**
* Retrieves events that FullCalendar has in memory.
*/
fullCalendar(method: 'clientEvents', idOrfilter?: (e: EventObject) => boolean): Array<EventObject>;
fullCalendar(method: 'clientEvents', idOrfilter?: (e: EventObject) => boolean): EventObject[];
/**
* Removes events from the calendar.
+2 -2
View File
@@ -373,12 +373,12 @@ interface JQuery {
/**
* Retrieves events that FullCalendar has in memory.
*/
fullCalendar(method: 'clientEvents', idOrfilter?: any): Array<FullCalendar.EventObject>;
fullCalendar(method: 'clientEvents', idOrfilter?: any): FullCalendar.EventObject[];
/**
* Retrieves events that FullCalendar has in memory.
*/
fullCalendar(method: 'clientEvents', idOrfilter?: (e: FullCalendar.EventObject) => boolean): Array<FullCalendar.EventObject>;
fullCalendar(method: 'clientEvents', idOrfilter?: (e: FullCalendar.EventObject) => boolean): FullCalendar.EventObject[];
/**
* Removes events from the calendar.
+5 -5
View File
@@ -51,7 +51,7 @@ declare namespace Gijgo {
//Configuration options
autoGenerateColumns?: boolean;
autoLoad?: boolean;
columns?: Array<GridColumn>;
columns?: GridColumn[];
dataSource?: any;
defaultColumnSettings?: GridColumn;
defaultParams?: GridDefaultParams;
@@ -80,8 +80,8 @@ declare namespace Gijgo {
cellDataChanged?: (e: any, $cell: JQuery, column: GridColumn, record: Entity, oldValue: any, newValue: any) => any;
columnHide?: (e: any, column: GridColumn) => any;
columnShow?: (e: any, column: GridColumn) => any;
dataBinding?: (e: any, records: Array<Entity>) => any;
dataBound?: (e: any, records: Array<Entity>, totalRecords: number) => any;
dataBinding?: (e: any, records: Entity[]) => any;
dataBound?: (e: any, records: Entity[], totalRecords: number) => any;
destroying?: (e: any) => any;
detailCollapse?: (e: any, detailWrapper: JQuery, record: Entity) => any;
detailExpand?: (e: any, detailWrapper: JQuery, record: Entity) => any;
@@ -101,9 +101,9 @@ declare namespace Gijgo {
count(): number;
destroy(keepTableTag?: boolean, keepWrapperTag?: boolean): void;
//get(position: number): Entity; //TODO: rename to getByPosition to avoid conflicts with jquery.get
getAll(): Array<Entity>;
getAll(): Entity[];
getById(id: string): Entity;
getChanges(): Array<Entity>;
getChanges(): Entity[];
getSelected(): string;
getSelections(): string[];
hideColumn(field: string): Grid<Entity, Params>;
+23 -23
View File
@@ -958,9 +958,9 @@ declare namespace go {
/**
* Highlight all of the Parts supplied in the given collection, and clear all other highlighted Parts.
* @param {Iterable<Part>|Array<Part>} coll an Iterable of Parts
* @param {Iterable<Part>|Part[]} coll an Iterable of Parts
*/
highlightCollection(coll: Iterable<Part> | Array<Part>): void;
highlightCollection(coll: Iterable<Part> | Part[]): void;
/**
* This static function declares that a class (constructor function) derives from another class -- but please note that most classes do not support inheritance.
@@ -1079,10 +1079,10 @@ declare namespace go {
/**
* This method removes from this Diagram all of the Parts in a collection.
* @param {Iterable<Part>|Array<Part>} coll A List or Set or Iterator of Parts.
* @param {Iterable<Part>|Part[]} coll A List or Set or Iterator of Parts.
* @param {boolean} check Whether to check Part.canDelete on each part.
*/
removeParts(coll: Iterable<Part> | Array<Part>, check: boolean): void;
removeParts(coll: Iterable<Part> | Part[], check: boolean): void;
/**
* Requests that in the near-future the diagram makes sure all GraphObjects are arranged,
@@ -1126,9 +1126,9 @@ declare namespace go {
/**
* Select all of the Parts supplied in the given collection.
* @param {Iterable<Part>|Array<Part>} coll a List or Set of Parts to be selected.
* @param {Iterable<Part>|Part[]} coll a List or Set of Parts to be selected.
*/
selectCollection(coll: Iterable<Part> | Array<Part>): void;
selectCollection(coll: Iterable<Part> | Part[]): void;
/**
* This method sets a collection of properties according to the property/value pairs that have been set on the given Object,
@@ -2292,7 +2292,7 @@ declare namespace go {
protected computeCorner(): number; // undocumented
protected computeShortLength(from: boolean): number; // undocumented
findMidLabel(): GraphObject; // undocumented
protected arrangeBundledLinks(links: Array<Link>, reroute: boolean): void; // undocumented
protected arrangeBundledLinks(links: Link[], reroute: boolean): void; // undocumented
protected setPointAt(i: number, x: number, y: number): void; // undocumented
protected insertPointAt(i: number, x: number, y: number): void; // undocumented
protected addPointAt(x: number, y: number): void; // undocumented
@@ -5202,7 +5202,7 @@ declare namespace go {
* This method only works if .linkLabelKeysProperty has been set to something other than an empty string.
* @param {Object} linkdata a JavaScript object representing a link.
*/
getLabelKeysForLinkData(linkdata: Object): Array<Key>;
getLabelKeysForLinkData(linkdata: Object): Key[];
/**
* From a link data retrieve a value uniquely identifying the node data
@@ -5323,7 +5323,7 @@ declare namespace go {
* @param {Object} linkdata a JavaScript object representing a link.
* @param arr an Array of node keys; an empty Array if the property was not present.
*/
setLabelKeysForLinkData(linkdata: Object, arr: Array<Key>): void;
setLabelKeysForLinkData(linkdata: Object, arr: Key[]): void;
/**
* Change the node key that the given link data references as the
@@ -6459,7 +6459,7 @@ declare namespace go {
* @param Array<*> layerRects an Array of Rects with the bounds of each of the "layers"
* @param {Point} offset the position of the top-left corner of the banded area relative to the coordinates given by the layerRects
*/
commitLayers(layerRects: Array<Rect>, offset: Point): void;
commitLayers(layerRects: Rect[], offset: Point): void;
/**
* Updates the physical location of "real" nodes and links to reflect the layout.
@@ -7128,7 +7128,7 @@ declare namespace go {
* @param Array<*> layerRects an Array of Rects with the bounds of each of the "layers"
* @param {Point} offset the position of the top-left corner of the banded area relative to the coordinates given by the layerRects
*/
commitLayers(layerRects: Array<Rect>, offset: Point): void;
commitLayers(layerRects: Rect[], offset: Point): void;
/**
* Set the fromSpot and toSpot for each Vertex, position each Node according to the Vertex position, and then position the Links.
@@ -7279,7 +7279,7 @@ declare namespace go {
childPortSpot: Spot;
/**Gets or sets the logical children for this node.*/
children: Array<TreeVertex>;
children: TreeVertex[];
/**This read-only property returns the number of immediate children this node has.*/
childrenCount: number;
@@ -7288,7 +7288,7 @@ declare namespace go {
commentMargin: number;
/**Gets or sets an array of Nodes that will be positioned near this node.*/
comments: Array<Node>;
comments: Node[];
/**Gets or sets the space to leave between consecutive comments.*/
commentSpacing: number;
@@ -8951,9 +8951,9 @@ declare namespace go {
/**
* Adds all of the values of a collection (either an Iterable or an Array) to the end of this List.
* @param {Iterable<T>|Array<T>} coll
* @param {Iterable<T>|T[]} coll
*/
addAll(coll: Iterable<T> | Array<T>): List<T>;
addAll(coll: Iterable<T> | T[]): List<T>;
/**
* This is true if all invocations of the given predicate on items in the collection are true.
@@ -9114,7 +9114,7 @@ declare namespace go {
/**
* Produces a JavaScript Array from the contents of this List.
*/
toArray(): Array<T>;
toArray(): T[];
/**
* Converts the List to a Set.
@@ -9187,7 +9187,7 @@ declare namespace go {
* Adds all of the key-value pairs of another Map to this Map.
* @param {Iterable.<KeyValuePair.<K, V>>|Array} coll
*/
addAll(coll: Iterable<KeyValuePair<K, V>> | Array<KeyValuePair<K, V>>): Map<K, V>;
addAll(coll: Iterable<KeyValuePair<K, V>> | KeyValuePair<K, V>[]): Map<K, V>;
/**
* This is true if all invocations of the given predicate on key-value pairs in the collection are true.
@@ -9289,7 +9289,7 @@ declare namespace go {
/**
* Produces a JavaScript Array of key/value pair objects from the contents of this Map.
*/
toArray(): Array<KeyValuePair<K, V>>;
toArray(): KeyValuePair<K, V>[];
/**
* Produces a Set that provides a read-only view onto the keys of this Map.
@@ -9330,9 +9330,9 @@ declare namespace go {
/**
* Adds all of the values of a collection (either an Iterable or an Array) to this Set.
* @param {Iterable<T>|Array<T>} coll
* @param {Iterable<T>|T[]} coll
*/
addAll(coll: Iterable<T> | Array<T>): Set<T>;
addAll(coll: Iterable<T> | T[]): Set<T>;
/**
* This is true if all invocations of the given predicate on items in the collection are true.
@@ -9432,9 +9432,9 @@ declare namespace go {
/**
* Removes all of the values of a collection from this Set.
* @param {Array<T>} coll
* @param {T[]} coll
*/
removeAll(coll: Array<T>): Set<T>;
removeAll(coll: T[]): Set<T>;
/**
* Removes from this Set all items that are not in the given collection.
@@ -9445,7 +9445,7 @@ declare namespace go {
/**
* Produces a JavaScript Array from the contents of this Set.
*/
toArray(): Array<T>;
toArray(): T[];
/**
* Converts the Set to a List.
+2 -2
View File
@@ -319,10 +319,10 @@ declare namespace gapi.drive.realtime {
create(ref: string|Function, ...var_args: any[]): any;
// Creates a collaborative list.
createList<T>(opt_initialValue?: Array<T>): CollaborativeList<T>;
createList<T>(opt_initialValue?: T[]): CollaborativeList<T>;
// Creates a collaborative map.
createMap<T>(opt_initialValue?: Array<[string, T]>): CollaborativeMap<T>;
createMap<T>(opt_initialValue?: [string, T][]): CollaborativeMap<T>;
// Creates a collaborative string.
createString(opt_initialValue?: string): CollaborativeString;
+1 -1
View File
@@ -1590,7 +1590,7 @@ declare namespace google.maps {
getVisible(): boolean;
getZoom(): number;
registerPanoProvider(provider: (input: string) => StreetViewPanoramaData): void;
setLinks(links: Array<StreetViewLink>): void;
setLinks(links: StreetViewLink[]): void;
setOptions(options: StreetViewPanoramaOptions): void;
setPano(pano: string): void;
setPosition(latLng: LatLng|LatLngLiteral): void;
+2 -2
View File
@@ -381,7 +381,7 @@ declare class SessionObject extends HandleObject {
declare class SessionObjectCollection extends Collection<SessionObject> {
session: Session;
constructor(items: Array<Handle>, session: Session, lib: pkcs11.PKCS11, classType?: any);
constructor(items: Handle[], session: Session, lib: pkcs11.PKCS11, classType?: any);
items(index: number): SessionObject;
}
@@ -2108,7 +2108,7 @@ declare class Slot extends HandleObject {
declare class SlotCollection extends Collection<Slot> {
module: Module;
items(index: number): Slot;
constructor(items: Array<Buffer>, module: Module, lib: pkcs11.PKCS11, classType?: any);
constructor(items: Buffer[], module: Module, lib: pkcs11.PKCS11, classType?: any);
}
declare enum TokenFlag {
+4 -4
View File
@@ -1140,7 +1140,7 @@ declare module "graphql/type/definition" {
GraphQLEnumType |
GraphQLInputObjectType;
export function getNamedType(type: GraphQLType): GraphQLNamedType;
export function getNamedType(type: GraphQLType): GraphQLNamedType
/**
* Used while defining GraphQL types to allow for circular references in
@@ -2584,7 +2584,7 @@ declare module "graphql/utilities/introspectionQuery" {
interface IntrospectionQuery {
__schema: IntrospectionSchema;
__schema: IntrospectionSchema
}
interface IntrospectionSchema {
@@ -2649,7 +2649,7 @@ declare module "graphql/utilities/introspectionQuery" {
type IntrospectionTypeRef =
IntrospectionNamedTypeRef |
IntrospectionListTypeRef |
IntrospectionNonNullTypeRef;
IntrospectionNonNullTypeRef
interface IntrospectionNamedTypeRef {
kind: string;
@@ -2708,7 +2708,7 @@ declare module "graphql/utilities/isValidJSValue" {
function isValidJSValue(
value: any,
type: GraphQLInputType
): Array<string>;
): Array<string>
}
declare module "graphql/utilities/isValidLiteralValue" {
+2 -2
View File
@@ -456,7 +456,7 @@ declare namespace grunt {
* @see FileModule.expand method documentation for an explanation of how the patterns
* and options arguments may be specified.
*/
expandMapping(patterns: string[], dest: string, options: IExpandedFilesConfig): Array<IFileMap>;
expandMapping(patterns: string[], dest: string, options: IExpandedFilesConfig): IFileMap[];
/**
* Match one or more globbing patterns against one or more file paths.
@@ -837,7 +837,7 @@ declare namespace grunt {
* Normalizes a task target configuration object into an array of src-dest file mappings.
* This method is used internally by the multi task system this.files / grunt.task.current.files property.
*/
normalizeMultiTaskFiles(data: grunt.config.IProjectConfig, targetname?: string): Array<grunt.file.IFileMap>;
normalizeMultiTaskFiles(data: grunt.config.IProjectConfig, targetname?: string): grunt.file.IFileMap[];
/**
* The currently running task or multitask.
+1 -1
View File
@@ -11,7 +11,7 @@ interface Options {
base?: string;
noAssets?: boolean;
noconcat?: boolean;
additionalStreams?: Array<NodeJS.ReadWriteStream>;
additionalStreams?: NodeJS.ReadWriteStream[];
transformPath?: (filePath: string) => void;
}
+6 -6
View File
@@ -120,7 +120,7 @@ export interface IServerOptions {
sharedif true, allows multiple cache users to share the same segment (e.g. multiple methods using the same cache storage container). Default to false.
other options passed to the catbox strategy used.
an array of the above object for configuring multiple cache instances, each with a unique name. When an array of objects is provided, multiple cache connections are established and each array item (except one) must include a name. */
cache?: string | ICatBoxCacheOptions | Array<ICatBoxCacheOptions> | any;
cache?: string | ICatBoxCacheOptions | ICatBoxCacheOptions[] | any;
/** sets the default connections configuration which can be overridden by each connection where: */
connections?: IConnectionConfigurationServerDefaults;
/** determines which logged events are sent to the console (this should only be used for development and does not affect which events are actually logged internally and recorded). Set to false to disable all console logging, or to an object*/
@@ -779,7 +779,7 @@ export interface IRouteHandlerConfig {
plugins: {
[name: string]: any;
};
pre: Array<() => void>;
pre: (() => void)[];
validate: {
headers: any;
params: any;
@@ -1415,7 +1415,7 @@ export declare class Response extends Events.EventEmitter {
/** replacer(method) - sets the JSON.stringify() replacer argument where:
method - the replacer function or array. Defaults to none.*/
replacer(method: Function | Array<Function>): void;
replacer(method: Function | Function[]): void;
/** spaces(count) - sets the JSON.stringify() space argument where:
count - the number of spaces to indent nested object keys. Defaults to no indentation. */
@@ -1462,7 +1462,7 @@ export declare class Server extends Events.EventEmitter {
// server.connections.length === 2
var a = server.select('a');
// a.connections.length === 1*/
connections: Array<ISeverConnectionOptions>;
connections: ISeverConnectionOptions[];
/** When the server contains exactly one connection, info is an object containing information about the sole connection.
* When the server contains more than one connection, each server.connections array member provides its own connection.info.
var server = new Hapi.Server();
@@ -2032,9 +2032,9 @@ export declare class Server extends Events.EventEmitter {
});*/
method(methods: {
name: string; method: IServerMethod; options?: IServerMethodOptions
} | Array<{
} | {
name: string; method: IServerMethod; options?: IServerMethodOptions
}>): void;
}[]): void;
/**server.path(relativeTo)
Sets the path prefix used to locate static resources (files and view templates) when relative paths are used where:
relativeTo - the path prefix added to any relative file path starting with '.'.
+6 -6
View File
@@ -171,7 +171,7 @@ export interface IServerOptions {
sharedif true, allows multiple cache users to share the same segment (e.g. multiple methods using the same cache storage container). Default to false.
other options passed to the catbox strategy used.
an array of the above object for configuring multiple cache instances, each with a unique name. When an array of objects is provided, multiple cache connections are established and each array item (except one) must include a name. */
cache?: string | ICatBoxCacheOptions | Array<ICatBoxCacheOptions> | any;
cache?: string | ICatBoxCacheOptions | ICatBoxCacheOptions[] | any;
/** sets the default connections configuration which can be overridden by each connection where: */
connections?: IConnectionConfigurationServerDefaults;
/** determines which logged events are sent to the console (this should only be used for development and does not affect which events are actually logged internally and recorded). Set to false to disable all console logging, or to an object*/
@@ -871,7 +871,7 @@ export interface IRouteHandlerConfig {
plugins: {
[name: string]: any;
};
pre: Array<() => void>;
pre: (() => void)[];
validate: {
headers: any;
params: any;
@@ -1532,7 +1532,7 @@ export class Response extends Events.EventEmitter {
/** replacer(method) - sets the JSON.stringify() replacer argument where:
method - the replacer function or array. Defaults to none.*/
replacer(method: Function | Array<Function>): Response;
replacer(method: Function | Function[]): Response;
/** spaces(count) - sets the JSON.stringify() space argument where:
count - the number of spaces to indent nested object keys. Defaults to no indentation. */
@@ -1677,7 +1677,7 @@ export class Server extends Events.EventEmitter {
// server.connections.length === 2
var a = server.select('a');
// a.connections.length === 1*/
connections: Array<ServerConnection>;
connections: ServerConnection[];
/** When the server contains exactly one connection, info is an object containing information about the sole connection.
* When the server contains more than one connection, each server.connections array member provides its own connection.info.
var server = new Hapi.Server();
@@ -2279,9 +2279,9 @@ export class Server extends Events.EventEmitter {
});*/
method(methods: {
name: string; method: IServerMethod; options?: IServerMethodOptions
} | Array<{
} | {
name: string; method: IServerMethod; options?: IServerMethodOptions
}>): void;
}[]): void;
/**server.path(relativeTo)
Sets the path prefix used to locate static resources (files and view templates) when relative paths are used where:
+4 -4
View File
@@ -83,10 +83,10 @@ declare namespace HTMLMinifier {
minifyURLs?: boolean | RelateUrl.Options;
// Array of regex'es that allow to ignore certain comments, when matched
ignoreCustomComments?: Array<RegExp>;
ignoreCustomComments?: RegExp[];
// Array of regex'es that allow to ignore certain fragments, when matched (e.g. <?php ... ?>, {{ ... }}, etc.)
ignoreCustomFragments?: Array<RegExp>;
ignoreCustomFragments?: RegExp[];
// Array of strings corresponding to types of script elements to process through minifier (e.g. text/ng-template, text/x-handlebars-template, etc.)
processScripts?: string[];
@@ -95,10 +95,10 @@ declare namespace HTMLMinifier {
maxLineLength?: number;
// Arrays of regex'es that allow to support custom attribute assign expressions (e.g. '<div flex?="{{mode != cover}}"></div>')
customAttrAssign?: Array<RegExp>;
customAttrAssign?: RegExp[];
// Arrays of regex'es that allow to support custom attribute surround expressions (e.g. <input {{#if value}}checked="checked"{{/if}}>)
customAttrSurround?: Array<RegExp>;
customAttrSurround?: RegExp[];
// Regex that specifies custom attribute to strip newlines from (e.g. /ng\-class/)
customAttrCollapse?: RegExp;
+3 -3
View File
@@ -1565,7 +1565,7 @@ declare namespace Immutable {
* )
* // Seq [ 1, 'A', 'X', 2, 'B', 'Y' ]
*/
interleave(...iterables: Array<Iterable<any, T>>): this;
interleave(...iterables: Iterable<any, T>[]): this;
/**
* Splice returns a new indexed Iterable by replacing a region of this
@@ -1582,7 +1582,7 @@ declare namespace Immutable {
splice(
index: number,
removeNum: number,
...values: Array<Iterable.Indexed<T> | T>
...values: (Iterable.Indexed<T> | T)[]
): this;
/**
@@ -2185,7 +2185,7 @@ declare namespace Immutable {
* For Seqs, all entries will be present in
* the resulting iterable, even if they have the same key.
*/
concat(...valuesOrIterables: Array<Iterable<K, V>|V>): this;
concat(...valuesOrIterables: (Iterable<K, V>|V)[]): this;
/**
* Flattens nested Iterables.
+3 -3
View File
@@ -122,7 +122,7 @@ declare namespace jasmine {
}
interface CustomMatcherFactory {
(util: MatchersUtil, customEqualityTesters: Array<CustomEqualityTester>): CustomMatcher;
(util: MatchersUtil, customEqualityTesters: CustomEqualityTester[]): CustomMatcher;
}
interface CustomMatcherFactories {
@@ -135,8 +135,8 @@ declare namespace jasmine {
}
interface MatchersUtil {
equals(a: any, b: any, customTesters?: Array<CustomEqualityTester>): boolean;
contains<T>(haystack: ArrayLike<T> | string, needle: any, customTesters?: Array<CustomEqualityTester>): boolean;
equals(a: any, b: any, customTesters?: CustomEqualityTester[]): boolean;
contains<T>(haystack: ArrayLike<T> | string, needle: any, customTesters?: CustomEqualityTester[]): boolean;
buildFailureMessage(matcherName: string, isNot: boolean, actual: any, ...expected: any[]): string;
}
+2 -2
View File
@@ -327,7 +327,7 @@ interface JQueryPromise<T> extends JQueryGenericPromise<T> {
* @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved.
* @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.
*/
done(doneCallback1?: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...doneCallbackN: Array<JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[]>): JQueryPromise<T>;
done(doneCallback1?: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...doneCallbackN: (JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[])[]): JQueryPromise<T>;
/**
* Add handlers to be called when the Deferred object is rejected.
*
@@ -831,7 +831,7 @@ interface JQueryStatic {
*
* @param deferreds One or more Deferred objects, or plain JavaScript objects.
*/
when<T>(...deferreds: Array<T|JQueryPromise<T>/* as JQueryDeferred<T> */>): JQueryPromise<T>;
when<T>(...deferreds: (T|JQueryPromise<T>/* as JQueryDeferred<T> */)[]): JQueryPromise<T>;
/**
* Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties.
+4 -4
View File
@@ -5,9 +5,9 @@
declare module "jsonschema" {
export interface IJSONSchemaResult {
errors: Array<IJSONSchemaValidationError>;
errors: IJSONSchemaValidationError[];
instance: any;
arguments: Array<{}>;
arguments: {}[];
propertyPath: string;
name: string;
schema: {};
@@ -49,7 +49,7 @@ declare module "jsonschema" {
* }
* };
*
* const validationResults: { errors: Array<IJSONSchemaValidationError> } =
* const validationResults: { errors: IJSONSchemaValidationError[] } =
* v.validate({ key: "Name", value: "A10" }, {"type": "string"});
*
*/
@@ -91,7 +91,7 @@ declare module "jsonschema" {
* Sets all the schemas of the Validator instance.
* @param schemas
*/
setSchemas (schemas: Array<{}>): void;
setSchemas (schemas: {}[]): void;
/**
* Returns the schema of a certain urn
+2 -2
View File
@@ -1496,7 +1496,7 @@ declare namespace jsts {
/**
* @constructor
*/
constructor(points: Array<Coordinate>, factory?: any);
constructor(points: Coordinate[], factory?: any);
/**
* @return {jsts.geom.Coordinate} The n'th coordinate of this
@@ -1574,7 +1574,7 @@ declare namespace jsts {
/**
* @constructor
*/
constructor(shell: LinearRing, holes?: Array<LinearRing>, factory?: any);
constructor(shell: LinearRing, holes?: LinearRing[], factory?: any);
/**
* Gets the exterior ring.
+5 -5
View File
@@ -9,7 +9,7 @@
*/
interface VertexStructure {
level: number;
edge: Array<Vertex>;
edge: Vertex[];
data: VertexData;
parent: Vertex;
}
@@ -101,26 +101,26 @@ interface Vertex {
* @param {string} type - object type.
* @param {Object} query - _.where query object.
*/
find(type: string | void, query: Object): Array<VertexData>;
find(type: string | void, query: Object): VertexData[];
/**
* Get siblings of specified edge.
* @param {number} index - edge index.
*/
getSiblingsOf(index: number): Array<VertexData>;
getSiblingsOf(index: number): VertexData[];
/**
* Getting childs of an specified edge.
* @param egde - target vertex;
*/
getChildsOf(egde: number): Array<VertexData>;
getChildsOf(egde: number): VertexData[];
/**
* Getting parents of an specified level and edge.
* @param {number} level - max level.
* @param {number} edge - edge index.
*/
getParentsFrom(level: number, edge: number): Array<VertexData>;
getParentsFrom(level: number, edge: number): VertexData[];
/**
* Getting the length of childs of an specified edge.
+4 -4
View File
@@ -638,7 +638,7 @@ id(value: number|string): this;
/* options include 'silhouette', 'wiggle', 'expand', 'zero', or a custom function*/
stackOffset(offset: string): this;
/* options include 'silhouette', 'wiggle', 'expand', 'zero', or a custom function*/
stackOffset(offset: (data: Array<[number, number]>) => number[]): this;
stackOffset(offset: (data: [number, number][]) => number[]): this;
/* The width the graph or component created inside the SVG should be made*/
width(): number;
/*The width the graph or component created inside the SVG should be made.*/
@@ -730,7 +730,7 @@ id(value: number|string): this;
/* options include 'silhouette', 'wiggle', 'expand', 'zero', or a custom function*/
stackOffset(offset: string): this;
/* options include 'silhouette', 'wiggle', 'expand', 'zero', or a custom function*/
stackOffset(offset: (data: Array<[number, number]>) => number[]): this;
stackOffset(offset: (data: [number, number][]) => number[]): this;
/*D3 Format object for the label of pie/donut, discrete bar and multibar charts.*/
valueFormat(): string;
/*D3 Format object for the label of pie/donut, discrete bar and multibar charts.*/
@@ -1233,7 +1233,7 @@ id(value: number|string): this;
/* options include 'silhouette', 'wiggle', 'expand', 'zero', or a custom function*/
offset(offset: string): this;
/* options include 'silhouette', 'wiggle', 'expand', 'zero', or a custom function*/
offset(offset: (data: Array<[number, number]>) => number[]): this;
offset(offset: (data: [number, number][]) => number[]): this;
order(): string;
order(value: string): this;
style(offset: 'stack'): this;
@@ -2499,7 +2499,7 @@ id(value: number|string): this;
/* options include 'silhouette', 'wiggle', 'expand', 'zero', or a custom function*/
stackOffset(offset: string): this;
/* options include 'silhouette', 'wiggle', 'expand', 'zero', or a custom function*/
stackOffset(offset: (data: Array<[number, number]>) => number[]): this;
stackOffset(offset: (data: [number, number][]) => number[]): this;
/*Makes the X labels stagger at different distances from the axis so they're less likely to overlap.*/
staggerLabels(): boolean;
/*Makes the X labels stagger at different distances from the axis so they're less likely to overlap.*/