diff --git a/types/ajv-errors/ajv-errors-tests.ts b/types/ajv-errors/ajv-errors-tests.ts new file mode 100644 index 0000000000..d06c80b152 --- /dev/null +++ b/types/ajv-errors/ajv-errors-tests.ts @@ -0,0 +1,5 @@ +import * as Ajv from "ajv"; +import AjvErrors = require("ajv-errors"); + +const ajv = new Ajv({allErrors: true, jsonPointers: true}); +AjvErrors(ajv); diff --git a/types/ajv-errors/index.d.ts b/types/ajv-errors/index.d.ts new file mode 100644 index 0000000000..fed9e4585f --- /dev/null +++ b/types/ajv-errors/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for ajv-errors 1.0 +// Project: https://github.com/epoberezkin/ajv-errors +// Definitions by: Afshawn Lotfi +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { Ajv } from "ajv"; + +/** + * + * @param ajv Ajv Main Class + * https://github.com/epoberezkin/ajv + * @param options Optional options for Ajv Errors + * https://github.com/epoberezkin/ajv-errors#options + * + */ + +export = AjvErrors; +declare function AjvErrors(ajv: Ajv, options?: {}): Ajv; diff --git a/types/ajv-errors/tsconfig.json b/types/ajv-errors/tsconfig.json new file mode 100644 index 0000000000..c78a24c8c9 --- /dev/null +++ b/types/ajv-errors/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "ajv-errors-tests.ts" + ] +} diff --git a/types/ajv-errors/tslint.json b/types/ajv-errors/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/ajv-errors/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/async-retry/async-retry-tests.ts b/types/async-retry/async-retry-tests.ts index 68327b66bd..20dfc62c4b 100644 --- a/types/async-retry/async-retry-tests.ts +++ b/types/async-retry/async-retry-tests.ts @@ -10,12 +10,12 @@ const o: Options = { onRetry: (e: Error) => 42 }; -retry( +const hello: Promise = retry( bail => 'hello', { retries: 3 } ); -retry( +const answer: Promise = retry( bail => Promise.resolve(42), { retries: 3 } ); diff --git a/types/async-retry/index.d.ts b/types/async-retry/index.d.ts index a2f65e00a4..6b50c71b63 100644 --- a/types/async-retry/index.d.ts +++ b/types/async-retry/index.d.ts @@ -19,7 +19,7 @@ declare namespace AsyncRetry { onRetry?: (e: Error) => any; } - type RetryFunction = (bail: (e: Error) => A, attempt: number) => A|Promise; + type RetryFunction = (bail: (e: Error) => void, attempt: number) => A|Promise; } export = AsyncRetry; diff --git a/types/axios-token-interceptor/axios-token-interceptor-tests.ts b/types/axios-token-interceptor/axios-token-interceptor-tests.ts new file mode 100644 index 0000000000..036223b699 --- /dev/null +++ b/types/axios-token-interceptor/axios-token-interceptor-tests.ts @@ -0,0 +1,18 @@ +import tokenProvider = require('axios-token-interceptor'); + +tokenProvider(); // $ExpectError + +const validOptions = { + getToken: () => Promise.resolve('qwerty'), +}; +tokenProvider(validOptions); // $ExpectType TokenProvider + +tokenCache(); // $ExpectError + +const getToken = Promise.resolve('qwerty'); +const validCacheOptions = { + maxAge: 3600, +}; +const cache = tokenProvider.tokenCache(getToken, validCacheOptions); // $Expect TokenCache + +cache.reset(); // $ExpectType void diff --git a/types/axios-token-interceptor/index.d.ts b/types/axios-token-interceptor/index.d.ts new file mode 100644 index 0000000000..85121f8165 --- /dev/null +++ b/types/axios-token-interceptor/index.d.ts @@ -0,0 +1,32 @@ +// Type definitions for axios-token-interceptor 0.1 +// Project: https://github.com/sandrinodimattia/axios-token-interceptor#readme +// Definitions by: Mike Dodge +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import { AxiosRequestConfig } from 'axios'; + +// Module +declare function AxiosTokenProvider(Options: AxiosTokenProvider.InterceptorOptions): AxiosTokenProvider.TokenProvider; +declare namespace AxiosTokenProvider { + function tokenCache(getToken: Promise, options: TokenCacheOptions): TokenCache; + + // Interfaces + interface InterceptorOptions { + token?: string; + getToken?: () => string | Promise; + header?: string; + headerFormatter?: (token: string) => string; + } + + type TokenProvider = (config: AxiosRequestConfig) => Promise; + + interface TokenCacheOptions { + getMaxAge?: () => number; + maxAge?: number; + } + + interface TokenCache { + reset(): void; + } +} +export = AxiosTokenProvider; diff --git a/types/axios-token-interceptor/package.json b/types/axios-token-interceptor/package.json new file mode 100644 index 0000000000..bd5a40b16d --- /dev/null +++ b/types/axios-token-interceptor/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "axios": "^0.16.2" + } +} diff --git a/types/axios-token-interceptor/tsconfig.json b/types/axios-token-interceptor/tsconfig.json new file mode 100644 index 0000000000..509608e7d6 --- /dev/null +++ b/types/axios-token-interceptor/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "axios-token-interceptor-tests.ts" + ] +} diff --git a/types/axios-token-interceptor/tslint.json b/types/axios-token-interceptor/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/axios-token-interceptor/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/backo2/backo2-tests.ts b/types/backo2/backo2-tests.ts new file mode 100644 index 0000000000..71b20378d2 --- /dev/null +++ b/types/backo2/backo2-tests.ts @@ -0,0 +1,13 @@ +import Backoff = require("backo2"); + +const backoff = new Backoff(); +const backoff2 = new Backoff({}); +const backoff3 = new Backoff({ + min: 0, + max: 0, + jitter: 0, + factor: 0 +}); + +const y: number = backoff3.duration(); +backoff3.reset(); diff --git a/types/backo2/index.d.ts b/types/backo2/index.d.ts new file mode 100644 index 0000000000..9dcaba9f2a --- /dev/null +++ b/types/backo2/index.d.ts @@ -0,0 +1,36 @@ +// Type definitions for backo2 1.0 +// Project: https://github.com/mokesmokes/backo +// Definitions by: Retsam +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +type BackoffOptions = Partial<{ + min: number, + max: number, + jitter: number, + factor: number, +}>; + +declare class Backoff { + constructor(opts?: BackoffOptions); + + duration(): number; + /** + * Reset the number of attempts. + */ + reset(): void; + /** + * Set the minimum duration + */ + setMin(min: number): void; + /** + * Set the maximum duration + */ + setMax(max: number): void; + /** + * Set the jitter + */ + setJitter(jitter: number): void; +} + +export = Backoff; diff --git a/types/backo2/tsconfig.json b/types/backo2/tsconfig.json new file mode 100644 index 0000000000..2abe4e6c11 --- /dev/null +++ b/types/backo2/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "backo2-tests.ts" + ] +} diff --git a/types/backo2/tslint.json b/types/backo2/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/backo2/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/bin-pack/bin-pack-tests.ts b/types/bin-pack/bin-pack-tests.ts new file mode 100644 index 0000000000..f913d53520 --- /dev/null +++ b/types/bin-pack/bin-pack-tests.ts @@ -0,0 +1,8 @@ +import * as pack from "bin-pack"; + +// $ExpectType PackResult<{ width: number; height: number; }> +const packResult = pack([ + { width: 50, height: 50 }, + { width: 25, height: 25 }, + { width: 25, height: 20 } +]); diff --git a/types/bin-pack/index.d.ts b/types/bin-pack/index.d.ts new file mode 100644 index 0000000000..0d3df98899 --- /dev/null +++ b/types/bin-pack/index.d.ts @@ -0,0 +1,60 @@ +// Type definitions for bin-pack 1.0 +// Project: https://github.com/bryanburgers/bin-pack +// Definitions by: Oren Trutner +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/** + * Packs objects that have a width and a height into as small of a square as + * possible, using a binary tree bin packing algorithm. After packing, each + * object is given an (x, y) coordinate of where it would be optimally packed. + * @param bins List of rectangular bins to pack + * @param options Packing options. Use inPlace: true to modify the bins + * argument in-place. + */ +declare function pack(bins: T[], options?: pack.Options): pack.PackResult; + +declare namespace pack { + /** Packing options. */ + interface Options { + /** Use inPlace=true to add x,y fields to the bins argument. */ + inPlace?: boolean; + } + + /** Specifies the dimensions of a bin to pack. */ + interface Bin { + width: number; + height: number; + } + + /** Describes the location of a packed bin. */ + interface PackedItem { + /** X coordinate of the packed bin. */ + x: number; + + /** Y coordinate of the packed bin. */ + y: number; + + /** Width of the bin. */ + width: number; + + /** Height of the bin. */ + height: number; + + /** The original bin object. */ + item: T; + } + + /** The return value from the pack function. */ + interface PackResult { + /** Width of the bounding box around all bins. */ + width: number; + + /** Height of the bounding box around all bins. */ + height: number; + + /** List of packed bins. */ + items: Array>; + } +} + +export = pack; diff --git a/types/bin-pack/tsconfig.json b/types/bin-pack/tsconfig.json new file mode 100644 index 0000000000..6c6a41a37a --- /dev/null +++ b/types/bin-pack/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "bin-pack-tests.ts" + ] +} diff --git a/types/bin-pack/tslint.json b/types/bin-pack/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/bin-pack/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/cesium/index.d.ts b/types/cesium/index.d.ts new file mode 100644 index 0000000000..21b80f7d05 --- /dev/null +++ b/types/cesium/index.d.ts @@ -0,0 +1,5118 @@ +// Type definitions for cesium 1.44 +// Project: http://cesiumjs.org +// Definitions by: Aigars Zeiza +// Harry Nicholls +// Jared Szechy +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +// tslint:disable-next-line:export-just-namespace +export = Cesium; +export as namespace Cesium; + +declare namespace Cesium { + type RenderState = any; + + interface Proxy { + getURL(resource: string): string; + } + + class ArcGisImageServerTerrainProvider extends TerrainProvider { + constructor(options: { url: string; token?: string; proxy?: any; tilingScheme?: TilingScheme; ellipsoid?: Ellipsoid; credit?: Credit | string }); + } + + class AssociativeArray { + length: number; + values: any[]; + contains(key: string | number): boolean; + set(key: string | number, value: any): void; + get(key: string | number): any; + remove(key: string | number): boolean; + removeAll(): void; + } + + class AxisAlignedBoundingBox { + minimum: Cartesian3; + maximum: Cartesian3; + center: Cartesian3; + constructor(minimum?: Cartesian3, maximum?: Cartesian3, center?: Cartesian3); + clone(result?: AxisAlignedBoundingBox): AxisAlignedBoundingBox; + intersect(plane: Cartesian4): Intersect; + equals(right?: AxisAlignedBoundingBox): boolean; + static fromPoints(positions: Cartesian3[], result?: AxisAlignedBoundingBox): AxisAlignedBoundingBox; + static clone(box: AxisAlignedBoundingBox, result?: AxisAlignedBoundingBox): AxisAlignedBoundingBox; + static equals(left?: AxisAlignedBoundingBox, right?: AxisAlignedBoundingBox): boolean; + static intersect(box: AxisAlignedBoundingBox, plane: Cartesian4): Intersect; + } + + class BoundingRectangle { + x: number; + y: number; + width: number; + height: number; + constructor(x?: number, y?: number, width?: number, height?: number); + clone(result?: BoundingRectangle): BoundingRectangle; + intersect(right: BoundingRectangle): Intersect; + equals(right?: BoundingRectangle): boolean; + static fromPoints(positions: Cartesian2[], result?: BoundingRectangle): BoundingRectangle; + static fromRectangle(rectangle: Rectangle, projection?: any, result?: BoundingRectangle): BoundingRectangle; + static clone(rectangle: BoundingRectangle, result?: BoundingRectangle): BoundingRectangle; + static union(left: BoundingRectangle, right: BoundingRectangle, result?: BoundingRectangle): BoundingRectangle; + static expand(rectangle: BoundingRectangle, point: Cartesian2, result?: BoundingRectangle): BoundingRectangle; + static intersect(left: BoundingRectangle, right: BoundingRectangle): Intersect; + static equals(left?: BoundingRectangle, right?: BoundingRectangle): boolean; + } + + class BoundingSphere extends Packable { + center: Cartesian3; + radius: number; + constructor(center?: Cartesian3, radius?: number); + intersect(plane: Cartesian4): Intersect; + equals(right?: BoundingSphere): boolean; + clone(result?: BoundingSphere): BoundingSphere; + static fromPoints(positions: Cartesian3[], result?: BoundingSphere): BoundingSphere; + static fromRectangle2D(rectangle: Rectangle, projection?: any, result?: BoundingSphere): BoundingSphere; + static fromRectangleWithHeights2D(rectangle: Rectangle, projection?: any, minimumHeight?: number, maximumHeight?: number, result?: BoundingSphere): BoundingSphere; + static fromRectangle3D(rectangle: Rectangle, ellipsoid?: Ellipsoid, surfaceHeight?: number, result?: BoundingSphere): BoundingSphere; + static fromVertices(positions: Cartesian3[], center?: Cartesian3, stride?: number, result?: BoundingSphere): BoundingSphere; + static fromCornerPoints(corner?: number, oppositeCorner?: number, result?: BoundingSphere): BoundingSphere; + static fromEllipsoid(ellipsoid: Ellipsoid, result?: BoundingSphere): BoundingSphere; + static fromBoundingSpheres(boundingSpheres: BoundingSphere[], result?: BoundingSphere): BoundingSphere; + static clone(sphere: BoundingSphere, result?: BoundingSphere): BoundingSphere; + static pack(value: BoundingSphere, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: BoundingSphere): BoundingSphere; + static union(left: BoundingSphere, right: BoundingSphere, result?: BoundingSphere): BoundingSphere; + static expand(sphere: BoundingSphere, point: Cartesian3, result?: BoundingSphere): BoundingSphere; + static intersect(sphere: BoundingSphere, plane: Cartesian4): Intersect; + static transform(sphere: BoundingSphere, transform: Matrix4, result?: BoundingSphere): BoundingSphere; + static distanceSquaredTo(sphere: BoundingSphere, cartesian: Cartesian3): number; + static transformWithoutScale(sphere: BoundingSphere, transform: Matrix4, result?: BoundingSphere): BoundingSphere; + static computePlaneDistances(sphere: BoundingSphere, position: Cartesian3, direction: Cartesian3, result?: Cartesian2): Interval; + static projectTo2D(sphere: BoundingSphere, projection?: any, result?: BoundingSphere): BoundingSphere; + static equals(left?: BoundingSphere, right?: BoundingSphere): boolean; + } + + class BoxGeometry extends Packable { + constructor(options: { minimumCorner: Cartesian3; maximumCorner: Cartesian3; vertexFormat?: VertexFormat }); + static fromDimensions(): void; + static unpack(array: number[], startingIndex?: number, result?: BoxGeometry): BoxGeometry; + static createGeometry(boxGeometry: BoxGeometry): Geometry; + } + + class BoxOutlineGeometry extends Packable { + constructor(); + static fromDimensions(): void; + static unpack(array: number[], startingIndex?: number, result?: BoxOutlineGeometry): BoxOutlineGeometry; + static createGeometry(boxGeometry: BoxOutlineGeometry): Geometry; + } + + class Cartesian2 extends Packable { + x: number; + y: number; + static ZERO: Cartesian2; + static UNIT_X: Cartesian2; + static UNIT_Y: Cartesian2; + constructor(x?: number, y?: number); + clone(result?: Cartesian2): Cartesian2; + equals(right?: Cartesian2): boolean; + equalsEpsilon(right: Cartesian2, relativeEpsilon: number, absoluteEpsilon?: number): boolean; + toString(): string; + static fromElements(x: number, y: number, result?: Cartesian2): Cartesian2; + static clone(cartesian: Cartesian2, result?: Cartesian2): Cartesian2; + static fromCartesian3(cartesian: Cartesian3, result?: Cartesian2): Cartesian2; + static fromCartesian4(cartesian: Cartesian4, result?: Cartesian2): Cartesian2; + static pack(value: Cartesian2, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Cartesian2): Cartesian2; + static fromArray(array: number[], startingIndex?: number, result?: Cartesian2): Cartesian2; + static maximumComponent(cartesian: Cartesian2): number; + static minimumComponent(cartesian: Cartesian2): number; + static minimumByComponent(first: Cartesian2, second: Cartesian2, result: Cartesian2): Cartesian2; + static maximumByComponent(first: Cartesian2, second: Cartesian2, result: Cartesian2): Cartesian2; + static magnitudeSquared(cartesian: Cartesian2): number; + static magnitude(cartesian: Cartesian2): number; + static distance(left: Cartesian2, right: Cartesian2): number; + static distanceSquared(left: Cartesian2, right: Cartesian2): number; + static normalize(cartesian: Cartesian2, result: Cartesian2): Cartesian2; + static dot(left: Cartesian2, right: Cartesian2): number; + static multiplyComponents(left: Cartesian2, right: Cartesian2, result: Cartesian2): Cartesian2; + static add(left: Cartesian2, right: Cartesian2, result: Cartesian2): Cartesian2; + static subtract(left: Cartesian2, right: Cartesian2, result: Cartesian2): Cartesian2; + static multiplyByScalar(cartesian: Cartesian2, scalar: number, result: Cartesian2): Cartesian2; + static divideByScalar(cartesian: Cartesian2, scalar: number, result: Cartesian2): Cartesian2; + static negate(cartesian: Cartesian2, result: Cartesian2): Cartesian2; + static abs(cartesian: Cartesian2, result: Cartesian2): Cartesian2; + static lerp(start: Cartesian2, end: Cartesian2, t: number, result: Cartesian2): Cartesian2; + static angleBetween(left: Cartesian2, right: Cartesian2): number; + static mostOrthogonalAxis(cartesian: Cartesian2, result: Cartesian2): Cartesian2; + static equals(left?: Cartesian2, right?: Cartesian2): boolean; + static equalsEpsilon(left: Cartesian2, right: Cartesian2, relativeEpsilon: number, absoluteEpsilon?: number): boolean; + } + + class Cartesian3 extends Packable implements PositionProperty { + x: number; + y: number; + z: number; + static ZERO: Cartesian3; + static UNIT_X: Cartesian3; + static UNIT_Y: Cartesian3; + static UNIT_Z: Cartesian3; + constructor(x?: number, y?: number, z?: number); + clone(result?: Cartesian3): Cartesian3; + equals(right?: Cartesian3): boolean; + equalsEpsilon(right: Cartesian3, relativeEpsilon: number, absoluteEpsilon?: number): boolean; + toString(): string; + static fromSpherical(spherical: Spherical, result?: Cartesian3): Cartesian3; + static fromElements(x: number, y: number, z: number, result?: Cartesian3): Cartesian3; + static clone(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + static fromCartesian4(cartesian: Cartesian4, result?: Cartesian3): Cartesian3; + static pack(value: Cartesian3, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Cartesian3): Cartesian3; + static fromArray(array: number[], startingIndex?: number, result?: Cartesian3): Cartesian3; + static maximumComponent(cartesian: Cartesian3): number; + static minimumComponent(cartesian: Cartesian3): number; + static minimumByComponent(first: Cartesian3, second: Cartesian3, result: Cartesian3): Cartesian3; + static maximumByComponent(first: Cartesian3, second: Cartesian3, result: Cartesian3): Cartesian3; + static magnitudeSquared(cartesian: Cartesian3): number; + static magnitude(cartesian: Cartesian3): number; + static distance(left: Cartesian3, right: Cartesian3): number; + static distanceSquared(left: Cartesian3, right: Cartesian3): number; + static normalize(cartesian: Cartesian3, result: Cartesian3): Cartesian3; + static dot(left: Cartesian3, right: Cartesian3): number; + static multiplyComponents(left: Cartesian3, right: Cartesian3, result: Cartesian3): Cartesian3; + static add(left: Cartesian3, right: Cartesian3, result: Cartesian3): Cartesian3; + static subtract(left: Cartesian3, right: Cartesian3, result: Cartesian3): Cartesian3; + static multiplyByScalar(cartesian: Cartesian3, scalar: number, result: Cartesian3): Cartesian3; + static divideByScalar(cartesian: Cartesian3, scalar: number, result: Cartesian3): Cartesian3; + static negate(cartesian: Cartesian3, result: Cartesian3): Cartesian3; + static abs(cartesian: Cartesian3, result: Cartesian3): Cartesian3; + static lerp(start: Cartesian3, end: Cartesian3, t: number, result: Cartesian3): Cartesian3; + static angleBetween(left: Cartesian3, right: Cartesian3): number; + static mostOrthogonalAxis(cartesian: Cartesian3, result: Cartesian3): Cartesian3; + static equals(left?: Cartesian3, right?: Cartesian3): boolean; + static equalsEpsilon(left: Cartesian3, right: Cartesian3, relativeEpsilon: number, absoluteEpsilon?: number): boolean; + static cross(left: Cartesian3, right: Cartesian3, result: Cartesian3): Cartesian3; + static fromDegrees(longitude: number, latitude: number, height?: number, ellipsoid?: Ellipsoid, result?: Cartesian3): Cartesian3; + static fromRadians(longitude: number, latitude: number, height?: number, ellipsoid?: Ellipsoid, result?: Cartesian3): Cartesian3; + static fromDegreesArray(coordinates: number[], ellipsoid?: Ellipsoid, result?: Cartesian3[]): Cartesian3[]; + static fromRadiansArray(coordinates: number[], ellipsoid?: Ellipsoid, result?: Cartesian3[]): Cartesian3[]; + static fromDegreesArrayHeights(coordinates: number[], ellipsoid?: Ellipsoid, result?: Cartesian3[]): Cartesian3[]; + static fromRadiansArrayHeights(coordinates: number[], ellipsoid?: Ellipsoid, result?: Cartesian3[]): Cartesian3[]; + isConstant: boolean; + definitionChanged: Event; + referenceFrame: ReferenceFrame; + getValue(time: JulianDate, result?: Cartesian3): Cartesian3; + getValueInReferenceFrame(time: JulianDate, referenceFrame: ReferenceFrame, result?: Cartesian3): Cartesian3; + } + + class Cartesian4 extends Packable { + x: number; + y: number; + z: number; + w: number; + static ZERO: Cartesian4; + static UNIT_X: Cartesian4; + static UNIT_Y: Cartesian4; + static UNIT_Z: Cartesian4; + static UNIT_W: Cartesian4; + constructor(x?: number, y?: number, z?: number, w?: number); + clone(result?: Cartesian4): Cartesian4; + equals(right?: Cartesian4): boolean; + equalsEpsilon(right: Cartesian4, relativeEpsilon: number, absoluteEpsilon?: number): boolean; + toString(): string; + static fromElements(x: number, y: number, z: number, w: number, result?: Cartesian4): Cartesian4; + static fromColor(color: Color, result?: Cartesian4): Cartesian4; + static clone(cartesian: Cartesian4, result?: Cartesian4): Cartesian4; + static pack(value: Cartesian4, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Cartesian4): Cartesian4; + static fromArray(array: number[], startingIndex?: number, result?: Cartesian4): Cartesian4; + static maximumComponent(cartesian: Cartesian4): number; + static minimumComponent(cartesian: Cartesian4): number; + static minimumByComponent(first: Cartesian4, second: Cartesian4, result: Cartesian4): Cartesian4; + static maximumByComponent(first: Cartesian4, second: Cartesian4, result: Cartesian4): Cartesian4; + static magnitudeSquared(cartesian: Cartesian4): number; + static magnitude(cartesian: Cartesian4): number; + static distance(left: Cartesian4, right: Cartesian4): number; + static distanceSquared(left: Cartesian4, right: Cartesian4): number; + static normalize(cartesian: Cartesian4, result: Cartesian4): Cartesian4; + static dot(left: Cartesian4, right: Cartesian4): number; + static multiplyComponents(left: Cartesian4, right: Cartesian4, result: Cartesian4): Cartesian4; + static add(left: Cartesian4, right: Cartesian4, result: Cartesian4): Cartesian4; + static subtract(left: Cartesian4, right: Cartesian4, result: Cartesian4): Cartesian4; + static multiplyByScalar(cartesian: Cartesian4, scalar: number, result: Cartesian4): Cartesian4; + static divideByScalar(cartesian: Cartesian4, scalar: number, result: Cartesian4): Cartesian4; + static negate(cartesian: Cartesian4, result: Cartesian4): Cartesian4; + static abs(cartesian: Cartesian4, result: Cartesian4): Cartesian4; + static lerp(start: Cartesian4, end: Cartesian4, t: number, result: Cartesian4): Cartesian4; + static mostOrthogonalAxis(cartesian: Cartesian4, result: Cartesian4): Cartesian4; + static equals(left?: Cartesian4, right?: Cartesian4): boolean; + static equalsEpsilon(left: Cartesian4, right: Cartesian4, relativeEpsilon: number, absoluteEpsilon?: number): boolean; + } + + class Cartographic { + longitude: number; + latitude: number; + height: number; + static ZERO: Cartographic; + constructor(longitude?: number, latitude?: number, height?: number); + clone(result?: Cartographic): Cartographic; + equals(right?: Cartographic): boolean; + equalsEpsilon(right: Cartographic, epsilon: number): boolean; + toString(): string; + static fromRadians(longitude: number, latitude: number, height?: number, result?: Cartographic): Cartographic; + static fromDegrees(longitude: number, latitude: number, height?: number, result?: Cartographic): Cartographic; + static clone(cartographic: Cartographic, result?: Cartographic): Cartographic; + static equals(left?: Cartographic, right?: Cartographic): boolean; + static equalsEpsilon(left: Cartographic, right: Cartographic, epsilon: number): boolean; + } + + class CatmullRomSpline { + times: number[]; + points: Cartesian3[]; + firstTangent: Cartesian3; + lastTangent: Cartesian3; + constructor(options: { times: number[]; points: Cartesian3[]; firstTangent?: Cartesian3; lastTangent?: Cartesian3 }); + findTimeInterval(time: number): number; + evaluate(time: number, result?: Cartesian3): Cartesian3; + } + + class CesiumTerrainProvider extends TerrainProvider { + requestVertexNormals: boolean; + requestWaterMask: boolean; + constructor(options: { url: string; proxy?: Proxy; requestVertexNormals?: boolean; requestWaterMask?: boolean; ellipsoid?: Ellipsoid; credit?: Credit | string }); + } + + class CircleGeometry extends Packable { + constructor(options: { + center: Cartesian3; + radius: number; + ellipsoid?: Ellipsoid; + height?: number; + granularity?: number; + vertexFormat?: VertexFormat; + extrudedHeight?: number; + stRotation?: number + }); + static unpack(array: number[], startingIndex?: number, result?: CircleGeometry): number[]; + static createGeometry(circleGeometry: CircleGeometry): Geometry; + } + + class CircleOutlineGeometry extends Packable { + constructor(options: { center: Cartesian3; radius: number; ellipsoid?: Ellipsoid; height?: number; granularity?: number; extrudedHeight?: number; numberOfVerticalLines?: number }); + static unpack(array: number[], startingIndex?: number, result?: CircleOutlineGeometry): number[]; + static createGeometry(circleGeometry: CircleOutlineGeometry): Geometry; + } + + class Clock { + startTime: JulianDate; + stopTime: JulianDate; + currentTime: JulianDate; + multiplier: number; + clockStep: ClockStep; + clockRange: ClockRange; + canAnimate: boolean; + shouldAnimate: boolean; + onTick: Event; + constructor(options: { + startTime?: JulianDate; + stopTime?: JulianDate; + currentTime?: JulianDate; + multiplier?: number; + clockStep?: ClockStep; + clockRange?: ClockRange; + canAnimate?: boolean; + shouldAnimate?: + boolean + }); + tick(): JulianDate; + } + + class Color extends Packable { + red: number; + green: number; + blue: number; + alpha: number; + static ALICEBLUE: Color; + static ANTIQUEWHITE: Color; + static AQUA: Color; + static AQUAMARINE: Color; + static AZURE: Color; + static BEIGE: Color; + static BISQUE: Color; + static BLACK: Color; + static BLANCHEDALMOND: Color; + static BLUE: Color; + static BLUEVIOLET: Color; + static BROWN: Color; + static BURLYWOOD: Color; + static CADETBLUE: Color; + static CHARTREUSE: Color; + static CHOCOLATE: Color; + static CORAL: Color; + static CORNFLOWERBLUE: Color; + static CORNSILK: Color; + static CRIMSON: Color; + static CYAN: Color; + static DARKBLUE: Color; + static DARKCYAN: Color; + static DARKGOLDENROD: Color; + static DARKGRAY: Color; + static DARKGREEN: Color; + static DARKGREY: Color; + static DARKKHAKI: Color; + static DARKMAGENTA: Color; + static DARKOLIVEGREEN: Color; + static DARKORANGE: Color; + static DARKORCHID: Color; + static DARKRED: Color; + static DARKSALMON: Color; + static DARKSEAGREEN: Color; + static DARKSLATEBLUE: Color; + static DARKSLATEGRAY: Color; + static DARKSLATEGREY: Color; + static DARKTURQUOISE: Color; + static DARKVIOLET: Color; + static DEEPPINK: Color; + static DEEPSKYBLUE: Color; + static DIMGRAY: Color; + static DIMGREY: Color; + static DODGERBLUE: Color; + static FIREBRICK: Color; + static FLORALWHITE: Color; + static FORESTGREEN: Color; + static FUSCHIA: Color; + static GAINSBORO: Color; + static GHOSTWHITE: Color; + static GOLD: Color; + static GOLDENROD: Color; + static GRAY: Color; + static GREEN: Color; + static GREENYELLOW: Color; + static GREY: Color; + static HONEYDEW: Color; + static HOTPINK: Color; + static INDIANRED: Color; + static INDIGO: Color; + static IVORY: Color; + static KHAKI: Color; + static LAVENDER: Color; + static LAVENDAR_BLUSH: Color; + static LAWNGREEN: Color; + static LEMONCHIFFON: Color; + static LIGHTBLUE: Color; + static LIGHTCORAL: Color; + static LIGHTCYAN: Color; + static LIGHTGOLDENRODYELLOW: Color; + static LIGHTGRAY: Color; + static LIGHTGREEN: Color; + static LIGHTGREY: Color; + static LIGHTPINK: Color; + static LIGHTSEAGREEN: Color; + static LIGHTSKYBLUE: Color; + static LIGHTSLATEGRAY: Color; + static LIGHTSLATEGREY: Color; + static LIGHTSTEELBLUE: Color; + static LIGHTYELLOW: Color; + static LIME: Color; + static LIMEGREEN: Color; + static LINEN: Color; + static MAGENTA: Color; + static MAROON: Color; + static MEDIUMAQUAMARINE: Color; + static MEDIUMBLUE: Color; + static MEDIUMORCHID: Color; + static MEDIUMPURPLE: Color; + static MEDIUMSEAGREEN: Color; + static MEDIUMSLATEBLUE: Color; + static MEDIUMSPRINGGREEN: Color; + static MEDIUMTURQUOISE: Color; + static MEDIUMVIOLETRED: Color; + static MIDNIGHTBLUE: Color; + static MINTCREAM: Color; + static MISTYROSE: Color; + static MOCCASIN: Color; + static NAVAJOWHITE: Color; + static NAVY: Color; + static OLDLACE: Color; + static OLIVE: Color; + static OLIVEDRAB: Color; + static ORANGE: Color; + static ORANGERED: Color; + static ORCHID: Color; + static PALEGOLDENROD: Color; + static PALEGREEN: Color; + static PALETURQUOISE: Color; + static PALEVIOLETRED: Color; + static PAPAYAWHIP: Color; + static PEACHPUFF: Color; + static PERU: Color; + static PINK: Color; + static PLUM: Color; + static POWDERBLUE: Color; + static PURPLE: Color; + static RED: Color; + static ROSYBROWN: Color; + static ROYALBLUE: Color; + static SADDLEBROWN: Color; + static SALMON: Color; + static SANDYBROWN: Color; + static SEAGREEN: Color; + static SEASHELL: Color; + static SIENNA: Color; + static SILVER: Color; + static SKYBLUE: Color; + static SLATEBLUE: Color; + static SLATEGRAY: Color; + static SLATEGREY: Color; + static SNOW: Color; + static SPRINGGREEN: Color; + static STEELBLUE: Color; + static TAN: Color; + static TEAL: Color; + static THISTLE: Color; + static TOMATO: Color; + static TURQUOISE: Color; + static VIOLET: Color; + static WHEAT: Color; + static WHITE: Color; + static WHITESMOKE: Color; + static YELLOW: Color; + static YELLOWGREEN: Color; + static TRANSPARENT: Color; + static add(left: Color, right: Color, result?: Color): Color; + static byteToFloat(number: number): number; + static clone(color: Color, result?: Color): Color; + static divide(left: Color, right: Color, result?: Color): Color; + static divideByScalar(color: Color, scalar: number, result?: Color): Color; + static equals(left: Color, right: Color): boolean; + static floatToByte(number: number): number; + static fromAlpha(color: Color, alpha: number, result?: Color): Color; + static fromBytes(red?: number, green?: number, blue?: number, alpha?: number, result?: Color): Color; + static fromCartesian4(cartesian: Cartesian4, result?: Color): Color; + static fromCssColorString(color: string): Color; + static fromHsl(hue?: number, saturation?: number, lightness?: number, alpha?: number): Color; + static fromRandom(options?: { + red?: number; + minimumRed?: number; + maximumRed?: number; + green?: number; + minimumGreen?: number; + maximumGreen?: number; + blue?: number; + minimumBlue?: number; + maximumBlue?: number; + alpha?: number; + minimumAlpha?: number; + maximumAlpha?: number + }, result?: Color): Color; + static fromRgba(rgba: number): Color; + static mod(left: Color, right: Color, result?: Color): Color; + static multiply(left: Color, right: Color, result?: Color): Color; + static multiplyByScalar(color: Color, scalar: number, result?: Color): Color; + static pack(value: Color, array: number[], startingIndex?: number): number[]; + static subtract(left: Color, right: Color, result?: Color): Color; + static unpack(array: number[], startingIndex?: number, result?: Color): Color; + constructor(red?: number, green?: number, blue?: number, alpha?: number); + brighten(magnitude: number, result: Color): Color; + clone(result?: Color): Color; + darken(magnitude: number, result: Color): Color; + equals(other: Color): boolean; + equalsEpsilon(other: Color, epsilon?: number): boolean; + toBytes(result?: number[]): number[]; + toCssColorString(): string; + toRgba(): number; + toString(): string; + withAlpha(alpha: number, result?: Color): Color; + } + + class ColorGeometryInstanceAttribute { + value: Uint8Array; + componentDatatype: ComponentDatatype; + componentsPerAttribute: number; + normalize: boolean; + constructor(red?: number, green?: number, blue?: number, alpha?: number); + static fromColor(color: Color): ColorGeometryInstanceAttribute; + static toValue(color: Color, result?: Uint8Array): Uint8Array; + } + + class CorridorGeometry extends Packable { + constructor(options: { + positions: Cartesian3[]; + width: number; + ellipsoid?: Ellipsoid; + granularity?: number; + height?: number; + extrudedHeight?: number; + vertexFormat?: VertexFormat; + cornerType?: CornerType + }); + static unpack(array: number[], startingIndex?: number, result?: CorridorGeometry): CorridorGeometry; + static createGeometry(corridorGeometry: CorridorGeometry): Geometry; + } + + class CorridorOutlineGeometry extends Packable { + constructor(options: { + positions: Cartesian3[]; + width: number; + ellipsoid?: Ellipsoid; + granularity?: number; + height?: number; + extrudedHeight?: number; + cornerType?: CornerType + }); + static unpack(array: number[], startingIndex?: number, result?: CorridorOutlineGeometry): CorridorOutlineGeometry; + static createGeometry(corridorOutlineGeometry: CorridorOutlineGeometry): Geometry; + } + + class Credit { + readonly element: HTMLElement; + readonly html: string; + readonly imageUrl: string; + readonly link: string; + readonly showOnScreen: boolean; + readonly text: string; + constructor(html: string, showOnScreen?: boolean); + static equals(left: Credit, right: Credit): boolean; + equals(credits: Credit): boolean; + hasImage(): boolean; + hasLink(): boolean; + } + + class CylinderGeometry extends Packable { + constructor(options: { length: number; topRadius: number; bottomRadius: number; slices?: number; vertexFormat?: VertexFormat }); + static unpack(array: number[], startingIndex?: number, result?: CylinderGeometry): CylinderGeometry; + static createGeometry(cylinderGeometry: CylinderGeometry): Geometry; + } + + class CylinderOutlineGeometry extends Packable { + constructor(options: { length: number; topRadius: number; bottomRadius: number; slices?: number; numberOfVerticalLines?: number }); + static unpack(array: number[], startingIndex?: number, result?: CylinderOutlineGeometry): CylinderOutlineGeometry; + static createGeometry(cylinderGeometry: CylinderOutlineGeometry): Geometry; + } + + class DefaultProxy { + constructor(proxy: string); + getURL(resource: string): string; + } + + class DeveloperError { + name: string; + message: string; + stack: string; + constructor(message?: string); + } + + class EllipseGeometry extends Packable { + constructor(options: { + center: Cartesian3; + semiMajorAxis: number; + semiMinorAxis: number; + ellipsoid?: Ellipsoid; + height?: number; + extrudedHeight?: number; + rotation?: number; + stRotation?: number; + granularity?: number; + vertexFormat?: VertexFormat + }); + static unpack(array: number[], startingIndex?: number, result?: EllipseGeometry): EllipseGeometry; + static createGeometry(ellipseGeometry: EllipseGeometry): Geometry; + } + + class EllipseOutlineGeometry extends Packable { + constructor(options: { + center: Cartesian3; + semiMajorAxis: number; + semiMinorAxis: number; + ellipsoid?: Ellipsoid; + height?: number; + extrudedHeight?: number; + rotation?: number; + granularity?: number; + numberOfVerticalLines?: number + }); + static unpack(array: number[], startingIndex?: number, result?: EllipseOutlineGeometry): EllipseOutlineGeometry; + static createGeometry(ellipseGeometry: EllipseOutlineGeometry): Geometry; + } + + class Ellipsoid extends Packable { + radii: Cartesian3; + radiiSquared: Cartesian3; + radiiToTheFourth: Cartesian3; + oneOverRadii: Cartesian3; + oneOverRadiiSquared: Cartesian3; + minimumRadius: number; + maximumRadius: number; + static WGS84: Ellipsoid; + static UNIT_SPHERE: Ellipsoid; + static MOON: Ellipsoid; + constructor(x?: number, y?: number, z?: number); + clone(result?: Ellipsoid): Ellipsoid; + geocentricSurfaceNormal(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + geodeticSurfaceNormalCartographic(cartographic: Cartographic, result?: Cartesian3): Cartesian3; + geodeticSurfaceNormal(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + cartographicToCartesian(cartographic: Cartographic, result?: Cartesian3): Cartesian3; + cartographicArrayToCartesianArray(cartographics: Cartographic[], result?: Cartesian3[]): Cartesian3[]; + cartesianToCartographic(cartesian: Cartesian3, result?: Cartographic): Cartographic; + cartesianArrayToCartographicArray(cartesians: Cartesian3[], result?: Cartographic[]): Cartographic[]; + scaleToGeodeticSurface(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + scaleToGeocentricSurface(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + transformPositionToScaledSpace(position: Cartesian3, result?: Cartesian3): Cartesian3; + transformPositionFromScaledSpace(position: Cartesian3, result?: Cartesian3): Cartesian3; + equals(right?: Ellipsoid): boolean; + toString(): string; + static clone(ellipsoid: Ellipsoid, result?: Ellipsoid): Ellipsoid; + static fromCartesian3(radii?: Cartesian3): Ellipsoid; + static unpack(array: number[], startingIndex?: number, result?: Ellipsoid): Ellipsoid; + } + + class EllipsoidGeodesic { + surfaceDistance: number; + start: Cartographic; + end: Cartographic; + startHeading: number; + endHeading: number; + constructor(start?: Cartographic, end?: Cartographic, ellipsoid?: Ellipsoid); + setEndPoints(start: Cartographic, end: Cartographic): void; + interpolateUsingFraction(fraction: number): Cartographic; + interpolateUsingSurfaceDistance(distance: number): Cartographic; + } + + class EllipsoidGeometry extends Packable { + constructor(options?: { radii?: Cartesian3; stackPartitions?: number; slicePartitions?: number; vertexFormat?: VertexFormat }); + static unpack(array: number[], startingIndex?: number, result?: EllipsoidGeometry): EllipsoidGeometry; + static createGeometry(ellipsoidGeometry: EllipsoidGeometry): Geometry; + } + + class EllipsoidOutlineGeometry extends Packable { + constructor(options?: { radii?: Cartesian3; stackPartitions?: number; slicePartitions?: number; subdivisions?: number }); + static unpack(array: number[], startingIndex?: number, result?: EllipsoidOutlineGeometry): EllipsoidOutlineGeometry; + static createGeometry(ellipsoidGeometry: EllipsoidOutlineGeometry): Geometry; + } + + class EllipsoidTangentPlane { + ellipsoid: Ellipsoid; + origin: Cartesian3; + constructor(ellipsoid: Ellipsoid, origin: Cartesian3); + projectPointOntoPlane(cartesian: Cartesian3, result?: Cartesian2): Cartesian2; + projectPointsOntoPlane(cartesians: Cartesian3[], result?: Cartesian2[]): Cartesian2[]; + projectPointsOntoEllipsoid(cartesians: Cartesian2[], result?: Cartesian3[]): Cartesian3[]; + static fromPoints(ellipsoid: Ellipsoid, cartesians: Cartesian3): EllipsoidTangentPlane; + } + + class EllipsoidTerrainProvider extends TerrainProvider { + constructor(options?: { tilingScheme?: TilingScheme; ellipsoid?: Ellipsoid }); + } + + class Event { + numberOfListeners: number; + addEventListener(listener: () => void, scope?: any): Event.RemoveCallback; + removeEventListener(listener: () => void, scope?: any): boolean; + raiseEvent(...args: any[]): void; + } + + namespace Event { + type RemoveCallback = () => void; + } + + class EventHelper { + add(event: Event, listener: () => void, scope?: any): EventHelper.RemoveCallback; + removeAll(): void; + } + + namespace EventHelper { + type RemoveCallback = () => void; + } + + class GeographicProjection { + ellipsoid: Ellipsoid; + constructor(ellipsoid?: Ellipsoid); + project(cartographic: Cartographic, result?: Cartesian3): Cartesian3; + unproject(cartesian: Cartesian3, result?: Cartographic): Cartographic; + } + + class GeographicTilingScheme { + ellipsoid: Ellipsoid; + rectangle: Rectangle; + projection: MapProjection; + constructor(options?: { ellipsoid?: Ellipsoid; rectangle?: Rectangle; numberOfLevelZeroTilesX?: number; numberOfLevelZeroTilesY?: number }); + getNumberOfXTilesAtLevel(level: number): number; + getNumberOfYTilesAtLevel(level: number): number; + rectangleToNativeRectangle(rectangle: Rectangle, result?: Rectangle): Rectangle; + tileXYToNativeRectangle(x: number, y: number, level: number, result?: any): Rectangle; + tileXYToRectangle(x: number, y: number, level: number, result?: any): Rectangle; + positionToTileXY(position: Cartographic, level: number, result?: Cartesian2): Cartesian2; + } + + class Geometry { + attributes: GeometryAttributes; + indices: any[]; + primitiveType: PrimitiveType; + boundingSphere: BoundingSphere; + constructor(options: { attributes: GeometryAttributes; primitiveType?: PrimitiveType; indices?: Uint16Array | Uint32Array; boundingSphere?: BoundingSphere }); + static computeNumberOfVertices(geometry: Cartesian3): number; + } + + class GeometryAttribute { + componentDatatype: ComponentDatatype; + componentsPerAttribute: number; + normalize: boolean; + values: any[]; + constructor(options?: { componentDatatype?: ComponentDatatype; componentsPerAttribute?: number; normalize?: boolean; values?: number[] }); + } + + class GeometryAttributes { + position: GeometryAttribute; + normal: GeometryAttribute; + st: GeometryAttribute; + binormal: GeometryAttribute; + tangent: GeometryAttribute; + color: GeometryAttribute; + } + + class GeometryInstance { + geometry: Geometry; + modelMatrix: Matrix4; + id: any; + attributes: any; + constructor(options: { geometry: Geometry; modelMatrix?: Matrix4; id?: any; attributes?: any }); + } + + class GeometryInstanceAttribute { + componentDatatype: ComponentDatatype; + componentsPerAttribute: number; + normalize: boolean; + value: number[]; + constructor(options: { componentDatatype?: ComponentDatatype; componentsPerAttribute?: number; normalize?: boolean; value?: number[] }); + } + + class GregorianDate { + year: number; + month: number; + day: number; + hour: number; + minute: number; + second: number; + millisecond: number; + isLeapSecond: boolean; + } + + class HeightmapTerrainData { + waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement; + constructor(options: { + buffer: Int8Array | Uint8Array | Int16Array | Uint16Array | Float32Array | Float64Array; + width: number; + height: number; + childTileMask?: number; + structure?: any; + structureheightScale?: number; + structureheightOffset?: number; + structureelementsPerHeight?: number; + structurestride?: number; + structureelementMultiplier?: number; + structureisBigEndian?: boolean; + createdByUpsampling?: boolean + }); + createMesh(tilingScheme: TilingScheme, x: number, y: number, level: number): Promise; + interpolateHeight(rectangle: Rectangle, longitude: number, latitude: number): number; + upsample(tilingScheme: TilingScheme, thisX: number, thisY: number, thisLevel: number, descendantX: number, descendantY: number, descendantLevel: number): Promise; + isChildAvailable(thisX: number, thisY: number, childX: number, childY: number): boolean; + wasCreatedByUpsampling(): boolean; + } + + class HermiteSpline { + times: number[]; + points: Cartesian3[]; + inTangents: Cartesian3[]; + outTangents: Cartesian3[]; + constructor(options: { times: number[]; points: Cartesian3[]; inTangents: Cartesian3[]; outTangents: Cartesian3[] }); + findTimeInterval(time: number): number; + evaluate(time: number, result?: Cartesian3): Cartesian3; + static createC1(): HermiteSpline; + static createNaturalCubic(): HermiteSpline | LinearSpline; + static createClampedCubic(): HermiteSpline | LinearSpline; + } + + class IonImageryProvider extends ImageryProvider { + constructor(options: {assetId: number, accessToken?: string, server?: string}) + } + + class Interval { + start: number; + stop: number; + constructor(start?: number, stop?: number); + } + + class JulianDate { + dayNumber: number; + secondsOfDay: number; + static leapSeconds: LeapSecond[]; + constructor(julianDayNumber?: number, secondsOfDay?: number, timeStandard?: TimeStandard); + clone(result?: JulianDate): JulianDate; + equals(right?: JulianDate): boolean; + equalsEpsilon(right: JulianDate, epsilon: number): boolean; + toString(): string; + static fromDate(date: Date, result?: JulianDate): JulianDate; + static fromIso8601(iso8601String: string, result?: JulianDate): JulianDate; + static now(result?: JulianDate): JulianDate; + static toGregorianDate(julianDate: JulianDate, result?: GregorianDate): GregorianDate; + static toDate(julianDate: JulianDate): Date; + static toIso8601(julianDate: JulianDate, precision?: number): string; + static clone(julianDate: JulianDate, result?: JulianDate): JulianDate; + static compare(left: JulianDate, right: JulianDate): number; + static equals(left?: JulianDate, right?: JulianDate): boolean; + static equalsEpsilon(left: JulianDate, right: JulianDate, epsilon: number): boolean; + static totalDays(julianDate: JulianDate): number; + static secondsDifference(left: JulianDate, right: JulianDate): number; + static daysDifference(left: JulianDate, right: JulianDate): number; + static computeTaiMinusUtc(julianDate: JulianDate): number; + static addSeconds(julianDate: JulianDate, seconds: number, result: JulianDate): JulianDate; + static addMinutes(julianDate: JulianDate, minutes: number, result: JulianDate): JulianDate; + static addHours(julianDate: JulianDate, hours: number, result: JulianDate): JulianDate; + static addDays(julianDate: JulianDate, days: number, result: JulianDate): JulianDate; + static lessThan(left: JulianDate, right: JulianDate): boolean; + static lessThanOrEquals(left: JulianDate, right: JulianDate): boolean; + static greaterThan(left: JulianDate, right: JulianDate): boolean; + static greaterThanOrEquals(left: JulianDate, right: JulianDate): boolean; + } + + class LeapSecond { + julianDate: JulianDate; + offset: number; + constructor(date?: JulianDate, offset?: number); + } + + class LinearSpline { + times: number[]; + points: Cartesian3[]; + constructor(); + findTimeInterval(time: number): number; + evaluate(time: number, result?: Cartesian3): Cartesian3; + } + + class MapProjection { + ellipsoid: Ellipsoid; + project(cartographic: Cartographic, result?: Cartesian3): Cartesian3; + unproject(cartesian: Cartesian3, result?: Cartographic): Cartographic; + } + + class Matrix2 extends Packable { + static IDENTITY: Matrix2; + static COLUMN0ROW0: number; + static COLUMN0ROW1: number; + static COLUMN1ROW0: number; + static COLUMN1ROW1: number; + constructor(column0Row0?: number, column1Row0?: number, column0Row1?: number, column1Row1?: number); + clone(result?: Matrix2): Matrix2; + equals(right?: Matrix2): boolean; + equalsEpsilon(right: Matrix2, epsilon: number): boolean; + toString(): string; + static pack(value: Matrix2, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Matrix2): Matrix2; + static clone(matrix: Matrix2, result?: Matrix2): Matrix2; + static fromArray(array: number[], startingIndex?: number, result?: Matrix2): Matrix2; + static fromColumnMajorArray(values: number[], result?: Matrix2): Matrix2; + static fromRowMajorArray(values: number[], result?: Matrix2): Matrix2; + static fromScale(scale: Cartesian2, result?: Matrix2): Matrix2; + static fromUniformScale(scale: number, result?: Matrix2): Matrix2; + static fromRotation(angle: number, result?: Matrix2): Matrix2; + static toArray(matrix: Matrix2, result?: number[]): number[]; + static getElementIndex(row: number, column: number): number; + static getColumn(matrix: Matrix2, index: number, result: Cartesian2): Cartesian2; + static setColumn(matrix: Matrix2, index: number, cartesian: Cartesian2, result: Cartesian2): Matrix2; + static getRow(matrix: Matrix2, index: number, result: Cartesian2): Cartesian2; + static setRow(matrix: Matrix2, index: number, cartesian: Cartesian2, result: Matrix2): Matrix2; + static getScale(matrix: Matrix2, result: Cartesian2): Cartesian2; + static getMaximumScale(matrix: Matrix2): number; + static multiply(left: Matrix2, right: Matrix2, result: Matrix2): Matrix2; + static add(left: Matrix2, right: Matrix2, result: Matrix2): Matrix2; + static subtract(left: Matrix2, right: Matrix2, result: Matrix2): Matrix2; + static multiplyByVector(matrix: Matrix2, cartesian: Cartesian2, result: Cartesian2): Cartesian2; + static multiplyByScalar(matrix: Matrix2, scalar: number, result: Matrix2): Matrix2; + static negate(matrix: Matrix2, result: Matrix2): Matrix2; + static transpose(matrix: Matrix2, result: Matrix2): Matrix2; + static abs(matrix: Matrix2, result: Matrix2): Matrix2; + static equals(left?: Matrix2, right?: Matrix2): boolean; + static equalsEpsilon(left: Matrix2, right: Matrix2, epsilon: number): boolean; + } + + class Matrix3 extends Packable { + static IDENTITY: Matrix3; + static COLUMN0ROW0: number; + static COLUMN0ROW1: number; + static COLUMN0ROW2: number; + static COLUMN1ROW0: number; + static COLUMN1ROW1: number; + static COLUMN1ROW2: number; + static COLUMN2ROW0: number; + static COLUMN2ROW1: number; + static COLUMN2ROW2: number; + constructor(column0Row0?: number, column1Row0?: number, column2Row0?: number, column0Row1?: number, column1Row1?: number, + column2Row1?: number, column0Row2?: number, column1Row2?: number, column2Row2?: number); + clone(result?: Matrix3): Matrix3; + equals(right?: Matrix3): boolean; + equalsEpsilon(right: Matrix3, epsilon: number): boolean; + toString(): string; + static pack(value: Matrix3, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Matrix3): Matrix3; + static clone(matrix: Matrix3, result?: Matrix3): Matrix3; + static fromArray(array: number[], startingIndex?: number, result?: Matrix3): Matrix3; + static fromColumnMajorArray(values: number[], result?: Matrix3): Matrix3; + static fromRowMajorArray(values: number[], result?: Matrix3): Matrix3; + static fromQuaternion(quaternion: Quaternion): Matrix3; + static fromScale(scale: Cartesian3, result?: Matrix3): Matrix3; + static fromUniformScale(scale: number, result?: Matrix3): Matrix3; + static fromCrossProduct(the: Cartesian3, result?: Matrix3): Matrix3; + static fromRotationX(angle: number, result?: Matrix3): Matrix3; + static fromRotationY(angle: number, result?: Matrix3): Matrix3; + static fromRotationZ(angle: number, result?: Matrix3): Matrix3; + static toArray(matrix: Matrix3, result?: number[]): number[]; + static getElementIndex(row: number, column: number): number; + static getColumn(matrix: Matrix3, index: number, result: Cartesian3): Cartesian3; + static setColumn(matrix: Matrix3, index: number, cartesian: Cartesian3, result: Cartesian3): Matrix3; + static getRow(matrix: Matrix3, index: number, result: Cartesian3): Cartesian3; + static setRow(matrix: Matrix3, index: number, cartesian: Cartesian3, result: Cartesian3): Matrix3; + static getScale(matrix: Matrix3, result: Cartesian3): Cartesian3; + static getMaximumScale(matrix: Matrix3): number; + static multiply(left: Matrix3, right: Matrix3, result: Matrix3): Matrix3; + static add(left: Matrix3, right: Matrix3, result: Matrix3): Matrix3; + static subtract(left: Matrix3, right: Matrix3, result: Matrix3): Matrix3; + static multiplyByVector(matrix: Matrix3, cartesian: Cartesian3, result: Cartesian3): Cartesian3; + static multiplyByScalar(matrix: Matrix3, scalar: number, result: Matrix3): Matrix3; + static negate(matrix: Matrix3, result: Matrix3): Matrix3; + static transpose(matrix: Matrix3, result: Matrix3): Matrix3; + static computeEigenDecomposition(matrix: Matrix3, result?: any): any; + static abs(matrix: Matrix3, result: Matrix3): Matrix3; + static determinant(matrix: Matrix3): number; + static inverse(matrix: Matrix3, result: Matrix3): Matrix3; + static equals(left?: Matrix3, right?: Matrix3): boolean; + static equalsEpsilon(left: Matrix3, right: Matrix3, epsilon: number): boolean; + } + + class Matrix4 extends Packable { + static IDENTITY: Matrix4; + static COLUMN0ROW0: number; + static COLUMN0ROW1: number; + static COLUMN0ROW2: number; + static COLUMN0ROW3: number; + static COLUMN1ROW0: number; + static COLUMN1ROW1: number; + static COLUMN1ROW2: number; + static COLUMN1ROW3: number; + static COLUMN2ROW0: number; + static COLUMN2ROW1: number; + static COLUMN2ROW2: number; + static COLUMN2ROW3: number; + static COLUMN3ROW0: number; + static COLUMN3ROW1: number; + static COLUMN3ROW2: number; + static COLUMN3ROW3: number; + constructor(column0Row0?: number, column1Row0?: number, column2Row0?: number, column3Row0?: number, column0Row1?: number, + column1Row1?: number, column2Row1?: number, column3Row1?: number, column0Row2?: number, column1Row2?: number, + column2Row2?: number, column3Row2?: number, column0Row3?: number, column1Row3?: number, column2Row3?: number, + column3Row3?: number); + clone(result?: Matrix4): Matrix4; + equals(right?: Matrix4): boolean; + equalsEpsilon(right: Matrix4, epsilon: number): boolean; + toString(): string; + static pack(value: Matrix4, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Matrix4): Matrix4; + static clone(matrix: Matrix4, result?: Matrix4): Matrix4; + static fromArray(array: number[], startingIndex?: number, result?: Matrix4): Matrix4; + static fromColumnMajorArray(values: number[], result?: Matrix4): Matrix4; + static fromRowMajorArray(values: number[], result?: Matrix4): Matrix4; + static fromRotationTranslation(rotation: Matrix3, translation?: Cartesian3, result?: Matrix4): Matrix4; + static fromTranslationQuaternionRotationScale(translation: Cartesian3, rotation: Quaternion, scale: Cartesian3, result?: Matrix4): Matrix4; + static fromTranslation(translation: Cartesian3, result?: Matrix4): Matrix4; + static fromScale(scale: Cartesian3, result?: Matrix4): Matrix4; + static fromUniformScale(scale: number, result?: Matrix4): Matrix4; + static fromCamera(camera: Camera, result?: Matrix4): Matrix4; + static computePerspectiveFieldOfView(fovY: number, aspectRatio: number, near: number, far: number, result: Matrix4): Matrix4; + static computeOrthographicOffCenter(left: number, right: number, bottom: number, top: number, near: number, far: number, result: Matrix4): Matrix4; + static computePerspectiveOffCenter(left: number, right: number, bottom: number, top: number, near: number, far: number, result: Matrix4): Matrix4; + static computeInfinitePerspectiveOffCenter(left: number, right: number, bottom: number, top: number, near: number, far: number, result: Matrix4): Matrix4; + static computeViewportTransformation(viewport: any, nearDepthRange: number, farDepthRange: number, result: Matrix4): Matrix4; + static toArray(matrix: Matrix4, result?: number[]): number[]; + static getElementIndex(row: number, column: number): number; + static getColumn(matrix: Matrix4, index: number, result: Cartesian4): Cartesian4; + static setColumn(matrix: Matrix4, index: number, cartesian: Cartesian4, result: Cartesian4): Matrix4; + static getRow(matrix: Matrix4, index: number, result: Cartesian4): Cartesian4; + static setRow(matrix: Matrix4, index: number, cartesian: Cartesian4, result: Cartesian4): Matrix4; + static getScale(matrix: Matrix4, result: Cartesian3): Cartesian3; + static getMaximumScale(matrix: Matrix4): number; + static multiply(left: Matrix4, right: Matrix4, result: Matrix4): Matrix4; + static add(left: Matrix4, right: Matrix4, result: Matrix4): Matrix4; + static subtract(left: Matrix4, right: Matrix4, result: Matrix4): Matrix4; + static multiplyTransformation(left: Matrix4, right: Matrix4, result: Matrix4): Matrix4; + static multiplyByMatrix3(matrix: Matrix4, rotation: Matrix3, result: Matrix4): Matrix4; + static multiplyByTranslation(matrix: Matrix4, translation: Cartesian3, result: Matrix4): Matrix4; + static multiplyByUniformScale(matrix: Matrix4, scale: number, result: Matrix4): Matrix4; + static multiplyByScale(matrix: Matrix4, scale: Cartesian3, result: Matrix4): Matrix4; + static multiplyByVector(matrix: Matrix4, cartesian: Cartesian4, result: Cartesian4): Cartesian4; + static multiplyByPointAsVector(matrix: Matrix4, cartesian: Cartesian3, result: Cartesian3): Cartesian3; + static multiplyByPoint(matrix: Matrix4, cartesian: Cartesian3, result: Cartesian3): Cartesian3; + static multiplyByScalar(matrix: Matrix4, scalar: number, result: Matrix4): Matrix4; + static negate(matrix: Matrix4, result: Matrix4): Matrix4; + static transpose(matrix: Matrix4, result: Matrix4): Matrix4; + static abs(matrix: Matrix4, result: Matrix4): Matrix4; + static equals(left?: Matrix4, right?: Matrix4): boolean; + static equalsEpsilon(left: Matrix4, right: Matrix4, epsilon: number): boolean; + static getTranslation(matrix: Matrix4, result: Cartesian3): Cartesian3; + static getRotation(matrix: Matrix4, result: Matrix3): Matrix3; + static inverse(matrix: Matrix4, result: Matrix4): Matrix4; + static inverseTransformation(matrix: Matrix4, result: Matrix4): Matrix4; + } + + class NearFarScalar extends Packable { + near: number; + nearValue: number; + far: number; + farValue: number; + constructor(near?: number, nearValue?: number, far?: number, farValue?: number); + clone(result?: NearFarScalar): NearFarScalar; + equals(right?: NearFarScalar): boolean; + static clone(nearFarScalar: NearFarScalar, result?: NearFarScalar): NearFarScalar; + static pack(value: NearFarScalar, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: NearFarScalar): NearFarScalar; + static equals(left?: NearFarScalar, right?: NearFarScalar): boolean; + } + + class ObjectOrientedBoundingBox { + rotation: Matrix3; + translation: Cartesian3; + scale: Cartesian3; + constructor(rotation?: Matrix3, translation?: Cartesian3, scale?: Cartesian3); + clone(result?: ObjectOrientedBoundingBox): ObjectOrientedBoundingBox; + equals(right?: ObjectOrientedBoundingBox): boolean; + static fromPoints(positions: Cartesian3[], result?: ObjectOrientedBoundingBox): ObjectOrientedBoundingBox; + static fromBoundingRectangle(boundingRectangle: BoundingRectangle, rotation?: number): ObjectOrientedBoundingBox; + static clone(box: ObjectOrientedBoundingBox, result?: ObjectOrientedBoundingBox): ObjectOrientedBoundingBox; + static intersect(left: ObjectOrientedBoundingBox, right: ObjectOrientedBoundingBox): boolean; + static equals(left: ObjectOrientedBoundingBox, right: ObjectOrientedBoundingBox): boolean; + } + + class Occluder { + position: Cartesian3; + radius: number; + cameraPosition: Cartesian3; + constructor(occluderBoundingSphere: BoundingSphere, cameraPosition: Cartesian3); + isPointVisible(occludee: Cartesian3): boolean; + isBoundingSphereVisible(occludee: BoundingSphere): boolean; + computeVisibility(occludeeBS: BoundingSphere): number; + static fromBoundingSphere(occluderBoundingSphere: BoundingSphere, cameraPosition: Cartesian3, result?: Occluder): Occluder; + static computeOccludeePoint(occluderBoundingSphere: BoundingSphere, occludeePosition: Cartesian3, positions: Cartesian3[]): any; + static computeOccludeePointFromRectangle(rectangle: Rectangle, ellipsoid?: Ellipsoid): any; + } + + class PinBuilder { + fromColor(color: Color, size: number): HTMLCanvasElement; + fromUrl(url: string, color: Color, size: number): HTMLCanvasElement | Promise; + fromMakiIconId(id: string, color: Color, size: number): HTMLCanvasElement | Promise; + fromText(text: string, color: Color, size: number): HTMLCanvasElement; + } + + class Plane { + normal: Cartesian3; + distance: number; + constructor(normal: Cartesian3, distance: number); + static fromPointNormal(point: Cartesian3, normal: Cartesian3, result?: Plane): Plane; + static getPointDistance(plane: Plane, point: Cartesian3): number; + } + + class PolygonGeometry extends Packable { + constructor(options: { + polygonHierarchy: PolygonHierarchy; + height?: number; + extrudedHeight?: number; + vertexFormat?: VertexFormat; + stRotation?: number; + ellipsoid?: Ellipsoid; + granularity?: number; + perPositionHeight?: boolean + }); + static fromPositions(options?: { + positions: Cartesian3[]; + height?: number; + extrudedHeight?: number; + vertexFormat?: VertexFormat; + stRotation?: number; + ellipsoid?: Ellipsoid; + granularity?: number; + perPositionHeight?: boolean; + closeTop?: boolean; + closeBottom?: boolean; + }): PolygonGeometry; + static unpack(array: number[], startingIndex?: number, result?: PolygonGeometry): PolygonGeometry; + static createGeometry(polygonGeometry: PolygonGeometry): Geometry; + } + + class PolygonHierarchy extends Property { + positions: Cartesian3[]; + holes: PolygonHierarchy[]; + constructor(positions?: Cartesian3[], holes?: PolygonHierarchy[]); + } + + class PolygonOutlineGeometry extends Packable { + constructor(options: { + polygonHierarchy: any; + height?: number; + extrudedHeight?: number; + vertexFormat?: VertexFormat; + ellipsoid?: Ellipsoid; + granularity?: number; + perPositionHeight?: boolean + }); + static unpack(array: number[], startingIndex?: number, result?: PolygonOutlineGeometry): PolygonOutlineGeometry; + static fromPositions(options?: { + positions: Cartesian3[]; + height?: number; + extrudedHeight?: number; + ellipsoid?: Ellipsoid; + granularity?: number; + perPositionHeight?: boolean; + }): PolygonOutlineGeometry; + static createGeometry(polygonGeometry: PolygonOutlineGeometry): Geometry; + } + + class PolylineGeometry extends Packable { + constructor(options: { positions: Cartesian3[]; width?: number; colors?: Color[]; colorsPerVertex?: boolean; followSurface?: boolean; granularity?: number; ellipsoid?: Ellipsoid }); + static unpack(array: number[], startingIndex?: number, result?: PolylineGeometry): PolylineGeometry; + static createGeometry(polylineGeometry: PolylineGeometry): Geometry; + } + + class PolylineVolumeGeometry extends Packable { + constructor(options: { polylinePositions: Cartesian3[]; shapePositions: Cartesian2[]; ellipsoid?: Ellipsoid; granularity?: number; vertexFormat?: VertexFormat; cornerType?: CornerType }); + static unpack(array: number[], startingIndex?: number, result?: PolylineVolumeGeometry): PolylineVolumeGeometry; + static createGeometry(polylineVolumeGeometry: PolylineVolumeGeometry): Geometry; + } + + class PolylineVolumeOutlineGeometry extends Packable { + constructor(options: { polylinePositions: Cartesian3[]; shapePositions: number; ellipsoid?: Ellipsoid; granularity?: number; cornerType?: CornerType }); + static unpack(array: number[], startingIndex?: number, result?: PolylineVolumeOutlineGeometry): PolylineVolumeOutlineGeometry; + static createGeometry(polylineVolumeOutlineGeometry: PolylineVolumeOutlineGeometry): Geometry; + } + + class QuantizedMeshTerrainData { + waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement; + constructor(options: { + quantizedVertices: Uint16Array; + indices: Uint16Array | Uint32Array; + minimumHeight: number; + maximumHeight: number; + boundingSphere: BoundingSphere; + horizonOcclusionPoint: Cartesian3; + westIndices: number[]; + southIndices: number[]; + eastIndices: number[]; + northIndices: number[]; + westSkirtHeight: number; + southSkirtHeight: number; + eastSkirtHeight: number; + northSkirtHeight: number; + childTileMask?: number; + createdByUpsampling?: boolean; + encodedNormals?: Uint8Array; + waterMask?: Uint8Array + }); + createMesh(tilingScheme: TilingScheme, x: number, y: number, level: number): Promise; + upsample(tilingScheme: TilingScheme, thisX: number, thisY: number, thisLevel: number, descendantX: number, descendantY: number, descendantLevel: number): Promise; + interpolateHeight(rectangle: Rectangle, longitude: number, latitude: number): number; + isChildAvailable(thisX: number, thisY: number, childX: number, childY: number): boolean; + wasCreatedByUpsampling(): boolean; + } + + class Quaternion extends Packable { + x: number; + y: number; + z: number; + w: number; + static packedInterpolationLength: number; + static ZERO: Quaternion; + static IDENTITY: Quaternion; + constructor(x?: number, y?: number, z?: number, w?: number); + clone(result?: Quaternion): Quaternion; + equals(right?: Quaternion): boolean; + equalsEpsilon(right: Quaternion, epsilon: number): boolean; + toString(): string; + static fromAxisAngle(axis: Cartesian3, angle: number, result?: Quaternion): Quaternion; + static fromRotationMatrix(matrix: Matrix3, result?: Quaternion): Quaternion; + static fromHeadingPitchRoll(heading: number, pitch: number, roll: number, result: Quaternion): Quaternion; + static pack(value: Quaternion, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Quaternion): Quaternion; + static convertPackedArrayForInterpolation(packedArray: number[], startingIndex?: number, lastIndex?: number, result?: number[]): void; + static unpackInterpolationResult(array: number[], sourceArray: number[], startingIndex?: number, lastIndex?: number, result?: Quaternion): Quaternion; + static clone(quaternion: Quaternion, result?: Quaternion): Quaternion; + static conjugate(quaternion: Quaternion, result: Quaternion): Quaternion; + static magnitudeSquared(quaternion: Quaternion): number; + static magnitude(quaternion: Quaternion): number; + static normalize(quaternion: Quaternion, result: Quaternion): Quaternion; + static inverse(quaternion: Quaternion, result: Quaternion): Quaternion; + static add(left: Quaternion, right: Quaternion, result: Quaternion): Quaternion; + static subtract(left: Quaternion, right: Quaternion, result: Quaternion): Quaternion; + static negate(quaternion: Quaternion, result: Quaternion): Quaternion; + static dot(left: Quaternion, right: Quaternion): number; + static multiply(left: Quaternion, right: Quaternion, result: Quaternion): Quaternion; + static multiplyByScalar(quaternion: Quaternion, scalar: number, result: Quaternion): Quaternion; + static divideByScalar(quaternion: Quaternion, scalar: number, result: Quaternion): Quaternion; + static computeAxis(quaternion: Quaternion, result: Cartesian3): Cartesian3; + static computeAngle(quaternion: Quaternion): number; + static lerp(start: Quaternion, end: Quaternion, t: number, result: Quaternion): Quaternion; + static slerp(start: Quaternion, end: Quaternion, t: number, result: Quaternion): Quaternion; + static log(quaternion: Quaternion, result: Cartesian3): Cartesian3; + static exp(cartesian: Cartesian3, result: Quaternion): Quaternion; + static computeInnerQuadrangle(q0: Quaternion, q1: Quaternion, q2: Quaternion, result: Quaternion): Quaternion; + static squad(q0: Quaternion, q1: Quaternion, s0: Quaternion, s1: Quaternion, t: number, result: Quaternion): Quaternion; + static fastSlerp(start: Quaternion, end: Quaternion, t: number, result: Quaternion): Quaternion; + static fastSquad(q0: Quaternion, q1: Quaternion, s0: Quaternion, s1: Quaternion, t: number, result?: Quaternion): Quaternion; + static equals(left?: Quaternion, right?: Quaternion): boolean; + static equalsEpsilon(left: Quaternion, right: Quaternion, epsilon: number): boolean; + } + + class QuaternionSpline { + times: number[]; + points: Quaternion[]; + innerQuadrangles: Quaternion[]; + constructor(options: { times: number[]; points: Quaternion[]; firstInnerQuadrangle?: Quaternion; lastInnerQuadrangle?: Quaternion }); + findTimeInterval(time: number): number; + evaluate(time: number, result?: Quaternion): Quaternion; + } + + class Queue { + readonly length: number; + enqueue(item: any): void; + dequeue(): any; + contains(item: any): boolean; + clear(): void; + peek(): any; + sort(compareFunction: Queue.Comparator): void; + } + + namespace Queue { + type Comparator = (a: any, b: any) => number; + } + + class Ray { + origin: Cartesian3; + direction: Cartesian3; + constructor(origin?: Cartesian3, direction?: Cartesian3); + static getPoint(t: number, result?: Cartesian3): Cartesian3; + } + + class Rectangle extends Packable { + west: number; + south: number; + east: number; + north: number; + width: number; + height: number; + static MAX_VALUE: Rectangle; + constructor(west?: number, south?: number, east?: number, north?: number); + clone(result?: Rectangle): Rectangle; + equals(other?: Rectangle): boolean; + equalsEpsilon(other: Rectangle, epsilon: number): boolean; + static pack(value: Rectangle, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: Rectangle): Rectangle; + static computeWidth(rectangle: Rectangle): number; + static computeHeight(rectangle: Rectangle): number; + static fromDegrees(west?: number, south?: number, east?: number, north?: number, result?: Rectangle): Rectangle; + static fromCartographicArray(cartographics: Cartographic[], result?: Rectangle): Rectangle; + static clone(rectangle: Rectangle, result?: Rectangle): Rectangle; + static equals(left?: Rectangle, right?: Rectangle): boolean; + static validate(rectangle: Rectangle): void; + static southwest(rectangle: Rectangle, result?: Cartographic): Cartographic; + static northwest(rectangle: Rectangle, result?: Cartographic): Cartographic; + static northeast(rectangle: Rectangle, result?: Cartographic): Cartographic; + static southeast(rectangle: Rectangle, result?: Cartographic): Cartographic; + static center(rectangle: Rectangle, result?: Cartographic): Cartographic; + static intersection(rectangle: Rectangle, otherRectangle: Rectangle, result?: Rectangle): Rectangle; + static contains(rectangle: Rectangle, cartographic: Cartographic): boolean; + static subsample(rectangle: Rectangle, ellipsoid?: Ellipsoid, surfaceHeight?: number, result?: Cartesian3[]): Cartesian3[]; + } + + class RectangleGeometry extends Packable { + constructor(options: { + rectangle: Rectangle; + vertexFormat?: VertexFormat; + ellipsoid?: Ellipsoid; + granularity?: number; + height?: number; + rotation?: number; + stRotation?: number; + extrudedHeight?: number + }); + static pack(value: BoundingSphere, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: RectangleGeometry): RectangleGeometry; + static createGeometry(rectangleGeometry: RectangleGeometry): Geometry; + } + + class RectangleOutlineGeometry extends Packable { + constructor(options: { + rectangle: Rectangle; + ellipsoid?: Ellipsoid; + granularity?: number; + height?: number; + rotation?: number; + extrudedHeight?: number + }); + static pack(value: BoundingSphere, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: RectangleGeometry): RectangleOutlineGeometry; + static createGeometry(rectangleGeometry: RectangleOutlineGeometry): Geometry; + } + + class RequestErrorEvent { + statusCode: number; + response: any; + responseHeaders: any; + constructor(statusCode?: number, response?: any, responseHeaders?: string | object); + toString(): string; + } + + class RuntimeError { + name: string; + message: string; + stack: string; + constructor(message?: string); + } + + class ScreenSpaceEventHandler { + constructor(element?: HTMLCanvasElement); + setInputAction(action: () => void, type: number, modifier?: number): void; + getInputAction(type: number, modifier?: number): () => void; + removeInputAction(type: number, modifier?: number): void; + isDestroyed(): boolean; + destroy(): void; + } + + class ShowGeometryInstanceAttribute { + value: Uint8Array; + componentDatatype: ComponentDatatype; + componentsPerAttribute: number; + normalize: boolean; + constructor(show?: boolean); + static toValue(show: boolean, result?: Uint8Array): Uint8Array; + } + + class SimplePolylineGeometry extends Packable { + constructor(options: { positions: Cartesian3[]; colors?: Color[]; colorsPerVertex?: boolean; followSurface?: boolean; granularity?: number; ellipsoid?: Ellipsoid }); + static unpack(array: number[], startingIndex?: number, result?: SimplePolylineGeometry): SimplePolylineGeometry; + static createGeometry(simplePolylineGeometry: SimplePolylineGeometry): Geometry; + } + + class SphereGeometry extends Packable { + constructor(options?: { radius?: number; stackPartitions?: number; slicePartitions?: number; vertexFormat?: VertexFormat }); + static unpack(array: number[], startingIndex?: number, result?: SphereGeometry): SphereGeometry; + static createGeometry(sphereGeometry: SphereGeometry): Geometry; + } + + class SphereOutlineGeometry extends Packable { + constructor(options?: { radius?: number; stackPartitions?: number; slicePartitions?: number; subdivisions?: number }); + static unpack(array: number[], startingIndex?: number, result?: SphereOutlineGeometry): SphereOutlineGeometry; + static createGeometry(sphereGeometry: SphereOutlineGeometry): Geometry; + } + + class Spherical { + constructor(clock?: number, cone?: number, magnitude?: number); + equals(other: Spherical): boolean; + clone(result?: Spherical): Spherical; + equalsEpsilon(other: Spherical, epsilon: number): boolean; + toString(): string; + static fromCartesian3(cartesian3: Cartesian3, spherical?: Spherical): Spherical; + static clone(spherical: Spherical, result?: Spherical): Spherical; + static normalize(spherical: Spherical, result?: Spherical): Spherical; + static equals(left: Spherical, right: Spherical): boolean; + static equalsEpsilon(left: Spherical, right: Spherical, epsilon?: number): boolean; + } + + class Spline { + times: number[]; + points: Cartesian3[] | Quaternion[]; + evaluate(time: number, result?: Cartesian3 | Quaternion): Cartesian3 | Quaternion; + findTimeInterval(time: number, startIndex: number): number; + } + + class TaskProcessor { + constructor(workerName: string, maximumActiveTasks?: number); + scheduleTask(parameters: any, transferableObjects?: any[]): Promise; + isDestroyed(): boolean; + destroy(): void; + } + + class TerrainData { + waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement; + interpolateHeight(rectangle: Rectangle, longitude: number, latitude: number): number; + isChildAvailable(thisX: number, thisY: number, childX: number, childY: number): boolean; + createMesh(tilingScheme: TilingScheme, x: number, y: number, level: number): Promise; + upsample(tilingScheme: TilingScheme, thisX: number, thisY: number, thisLevel: number, descendantX: number, descendantY: number, descendantLevel: number): Promise; + wasCreatedByUpsampling(): boolean; + } + + class TerrainMesh { + center: Cartesian3; + vertices: Float32Array; + stride: number; + indices: Uint16Array | Uint32Array; + minimumHeight: number; + maximumHeight: number; + boundingSphere3D: BoundingSphere; + occludeePointInScaledSpace: Cartesian3; + constructor(center: Cartesian3, vertices: Float32Array, indices: Uint16Array | Uint32Array, minimumHeight: number, + maximumHeight: number, boundingSphere3D: BoundingSphere, occludeePointInScaledSpace: Cartesian3, vertexStride?: number); + } + + abstract class TerrainProvider { + availability: any; // TileAvailability + credit: Credit; + errorEvent: Event; + hasVertexNormals: boolean; + hasWaterMask: boolean; + ready: boolean; + readonly readyPromise: Promise; + tilingScheme: TilingScheme; + static heightmapTerrainQuality: number; + static getEstimatedLevelZeroGeometricErrorForAHeightmap(ellipsoid: Ellipsoid, tileImageWidth: number, numberOfTilesAtLevelZero: number): number; + static getRegularGridIndices(width: number, height: number): Uint16Array; + getLevelMaximumGeometricError(level: number): number; + getTileDataAvailable(x: number, y: number, level: number): boolean; + requestTileGeometry(x: number, y: number, level: number, throttleRequests?: boolean): Promise; + } + + class TileProviderError { + provider: ImageryProvider | TerrainProvider; + message: string; + x: number; + y: number; + level: number; + timesRetried: number; + retry: boolean; + error: Error; + constructor(provider: ImageryProvider | TerrainProvider, message: string, x?: number, y?: number, level?: number, timesRetried?: number, error?: Error); + static handleError(previousError: TileProviderError, provider: ImageryProvider | TerrainProvider, event: Event, + message: string, x: number, y: number, level: number, retryFunction: TileProviderError.RetryFunction, + errorDetails?: Error): TileProviderError; + static handleSuccess(previousError: TileProviderError): void; + } + + namespace TileProviderError { + type RetryFunction = () => void; + } + + class TilingScheme { + ellipsoid: Ellipsoid; + rectangle: Rectangle; + projection: MapProjection; + getNumberOfXTilesAtLevel(level: number): number; + getNumberOfYTilesAtLevel(level: number): number; + rectangleToNativeRectangle(rectangle: Rectangle, result?: Rectangle): Rectangle; + tileXYToNativeRectangle(x: number, y: number, level: number, result?: any): Rectangle; + tileXYToRectangle(x: number, y: number, level: number, result?: any): Rectangle; + positionToTileXY(position: Cartographic, level: number, result?: Cartesian2): Cartesian2; + } + + class TimeInterval { + start: JulianDate; + stop: JulianDate; + data: any; + isStartIncluded: boolean; + isStopIncluded: boolean; + isEmpty: boolean; + static EMPTY: TimeInterval; + constructor(options?: { start?: JulianDate; stop?: JulianDate; isStartIncluded?: boolean; isStopIncluded?: boolean; data?: any }); + clone(result?: TimeInterval): TimeInterval; + equals(right?: TimeInterval, dataComparer?: TimeInterval.DataComparer): boolean; + equalsEpsilon(right: TimeInterval, epsilon: number, dataComparer?: TimeInterval.DataComparer): boolean; + toString(): string; + static fromIso8601(options: { iso8601: string; isStartIncluded?: boolean; isStopIncluded?: boolean; data?: any }, result?: TimeInterval): TimeInterval; + static toIso8601(timeInterval: TimeInterval, precision?: number): string; + static clone(timeInterval?: TimeInterval, result?: TimeInterval): TimeInterval; + static equals(left?: TimeInterval, right?: TimeInterval, dataComparer?: TimeInterval.DataComparer): boolean; + static equalsEpsilon(left: TimeInterval, right: TimeInterval, epsilon: number, dataComparer?: TimeInterval.DataComparer): boolean; + static intersect(left: TimeInterval, right: TimeInterval, result: TimeInterval, mergeCallback?: TimeInterval.MergeCallback): TimeInterval; + static contains(timeInterval: TimeInterval, julianDate: JulianDate): boolean; + } + + namespace TimeInterval { + type MergeCallback = (leftData: any, rightData: any) => any; + type DataComparer = (leftData: any, rightData: any) => boolean; + } + + class TimeIntervalCollection { + readonly changedEvent: Event; + readonly start: JulianDate; + readonly isStartIncluded: boolean; + readonly stop: JulianDate; + readonly isStopIncluded: boolean; + readonly length: number; + readonly isEmpty: boolean; + constructor(intervals?: TimeInterval[]); + equals(right?: TimeIntervalCollection, dataComparer?: TimeInterval.DataComparer): boolean; + get(index: number): TimeInterval; + removeAll(): void; + findIntervalContainingDate(date: JulianDate): TimeInterval | undefined; + findDataForIntervalContainingDate(date: JulianDate): any; + contains(julianDate: JulianDate): boolean; + indexOf(date: JulianDate): number; + findInterval(options?: { start?: JulianDate; stop?: JulianDate; isStartIncluded?: boolean; isStopIncluded?: boolean }): TimeInterval; + addInterval(interval: TimeInterval, dataComparer?: TimeInterval.DataComparer): void; + removeInterval(interval: TimeInterval): void; + intersect(other: TimeIntervalCollection, dataComparer?: TimeInterval.DataComparer, mergeCallback?: TimeInterval.MergeCallback): TimeIntervalCollection; + } + + class VRTheWorldTerrainProvider extends TerrainProvider { + constructor(options: { url: string; proxy?: any; ellipsoid?: Ellipsoid; credit?: Credit | string }); + } + + class VertexFormat extends Packable { + position: boolean; + normal: boolean; + st: boolean; + binormal: boolean; + tangent: boolean; + color: boolean; + static POSITION_ONLY: VertexFormat; + static POSITION_AND_NORMAL: VertexFormat; + static POSITION_NORMAL_AND_ST: VertexFormat; + static POSITION_AND_ST: VertexFormat; + static POSITION_AND_COLOR: VertexFormat; + static ALL: VertexFormat; + static DEFAULT: VertexFormat; + constructor(options?: any); + static unpack(array: number[], startingIndex?: number, result?: VertexFormat): VertexFormat; + static clone(cartesian: VertexFormat, result?: VertexFormat): VertexFormat; + } + + class WallGeometry extends Packable { + constructor(options: { positions: Cartesian3[]; granularity?: number; maximumHeights?: number[]; minimumHeights?: number[]; ellipsoid?: Ellipsoid; vertexFormat?: VertexFormat }); + static unpack(array: number[], startingIndex?: number, result?: WallGeometry): WallGeometry; + static fromConstantHeights(positions: Cartesian3[], maximumHeight?: number, minimumHeight?: number, ellipsoid?: Ellipsoid): WallGeometry; + static createGeometry(wallGeometry: WallGeometry): Geometry; + } + + class WallOutlineGeometry extends Packable { + constructor(options: { positions: Cartesian3[]; granularity?: number; maximumHeights?: number[]; minimumHeights?: number[]; ellipsoid?: Ellipsoid }); + static unpack(array: number[], startingIndex?: number, result?: WallOutlineGeometry): WallOutlineGeometry; + static fromConstantHeights(positions: Cartesian3[], maximumHeight?: number, minimumHeight?: number, ellipsoid?: Ellipsoid): WallOutlineGeometry; + static createGeometry(wallGeometry: WallOutlineGeometry): Geometry; + } + + class WebMercatorProjection { + ellipsoid: Ellipsoid; + static MaximumLatitude: number; + constructor(ellipsoid?: Ellipsoid); + project(cartographic: Cartographic, result?: Cartesian3): Cartesian3; + unproject(cartesian: Cartesian3, result?: Cartographic): Cartographic; + static mercatorAngleToGeodeticLatitude(mercatorAngle: number): number; + static geodeticLatitudeToMercatorAngle(latitude: number): number; + } + + class WebMercatorTilingScheme { + ellipsoid: Ellipsoid; + rectangle: Rectangle; + projection: MapProjection; + constructor(options?: { ellipsoid?: Ellipsoid; + numberOfLevelZeroTilesX?: number; + numberOfLevelZeroTilesY?: number; + rectangleSouthwestInMeters?: Cartesian2; + rectangleNortheastInMeters?: Cartesian2 + }); + getNumberOfXTilesAtLevel(level: number): number; + getNumberOfYTilesAtLevel(level: number): number; + rectangleToNativeRectangle(rectangle: Rectangle, result?: Rectangle): Rectangle; + tileXYToNativeRectangle(x: number, y: number, level: number, result?: any): Rectangle; + tileXYToRectangle(x: number, y: number, level: number, result?: any): Rectangle; + positionToTileXY(position: Cartographic, level: number, result?: Cartesian2): Cartesian2; + } + + class BillboardGraphics { + definitionChanged: Event; + image: Property; + imageSubRegion: Property; + scale: Property; + rotation: Property; + alignedAxis: Property; + horizontalOrigin: Property; + verticalOrigin: Property; + color: Property; + eyeOffset: Property; + pixelOffset: Property; + show: Property; + width: Property; + height: Property; + scaleByDistance: Property; + translucencyByDistance: Property; + pixelOffsetScaleByDistance: Property; + constructor(options?: { image?: Property; + show?: Property; + scale?: Property; + horizontalOrigin?: Property; + verticalOrigin?: Property; + eyeOffset?: Property; + pixelOffset?: Property; + rotation?: Property; + alignedAxis?: Property; + width?: Property; + height?: Property; + color?: Property; + scaleByDistance?: Property; + translucencyByDistance?: Property; + pixelOffsetScaleByDistance?: Property; + imageSubRegion?: Property + }); + clone(result?: BillboardGraphics): BillboardGraphics; + merge(source: BillboardGraphics): BillboardGraphics; + } + + class BillboardVisualizer extends Visualizer { + constructor(entityCluster: EntityCluster, entityCollection: EntityCollection); + } + + class BoxGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + } + + class BoxGraphics { + definitionChanged: Event; + show: Property; + dimensions: Property; + material: MaterialProperty; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + constructor(options?: { + dimensions?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property + }); + clone(result?: BoxGraphics): BoxGraphics; + merge(source: BoxGraphics): BoxGraphics; + } + + class CallbackProperty extends Property { + constructor(callback: CallbackProperty.Callback, isConstant: boolean); + setCallback(callback: CallbackProperty.Callback, isConstant: boolean): void; + } + + namespace CallbackProperty { + type Callback = (time?: JulianDate, result?: any) => any; + } + + class CheckerboardMaterialProperty extends MaterialProperty { + evenColor: Color; + oddColor: Color; + repeat: Property; + constructor(options?: { evenColor?: Color; oddColor?: Color; repeat?: Property }); + } + + class ColorMaterialProperty extends MaterialProperty { + color: Color; + constructor(color?: Color); + } + + class CompositeEntityCollection { + collectionChanged: Event; + id: string; + values: Entity[]; + constructor(collections?: EntityCollection[]); + addCollection(collection: EntityCollection, index?: number): void; + removeCollection(collection: EntityCollection): boolean; + removeAllCollections(): void; + containsCollection(collection: EntityCollection): boolean; + contains(entity: Entity): boolean; + indexOfCollection(collection: EntityCollection): number; + getCollection(index: number): EntityCollection; + getCollectionsLength(): number; + raiseCollection(collection: EntityCollection): void; + lowerCollection(collection: EntityCollection): void; + raiseCollectionToTop(collection: EntityCollection): void; + lowerCollectionToBottom(collection: EntityCollection): void; + suspendEvents(): void; + resumeEvents(): void; + computeAvailability(): TimeInterval; + getById(id: any): Entity; + } + + class CompositeMaterialProperty extends MaterialProperty { + intervals: TimeIntervalCollection; + } + + class CompositePositionProperty { + isConstant: boolean; + definitionChanged: Event; + intervals: TimeIntervalCollection; + referenceFrame: ReferenceFrame; + getValue(time: JulianDate, result?: any): any; + getValueInReferenceFrame(time: JulianDate, referenceFrame: ReferenceFrame, result?: Cartesian3): Cartesian3; + equals(other?: Property): boolean; + } + + class CompositeProperty extends Property { + intervals: TimeIntervalCollection; + } + + class ConstantPositionProperty { + isConstant: boolean; + definitionChanged: Event; + referenceFrame: ReferenceFrame; + constructor(value?: Cartesian3, referenceFrame?: ReferenceFrame); + getValue(time: JulianDate, result?: any): any; + setValue(value: Cartesian3, referenceFrame?: ReferenceFrame): void; + getValueInReferenceFrame(time: JulianDate, referenceFrame: ReferenceFrame, result?: Cartesian3): Cartesian3; + equals(other?: Property): boolean; + } + + class ConstantProperty extends Property { + constructor(value?: any); + setValue(value: any): void; + } + + class CorridorGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + } + + class CorridorGraphics { + definitionChanged: Event; + show: Property; + material: MaterialProperty; + positions: Property; + height: Property; + extrudedHeight: Property; + granularity: Property; + width: Property; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + cornerType: Property; + constructor(options?: { + positions?: Property; + width?: Property; + cornerType?: Property; + height?: Property; + extrudedHeight?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property; + granularity?: Property + }); + clone(result?: CorridorGraphics): CorridorGraphics; + merge(source: CorridorGraphics): CorridorGraphics; + } + + class CustomDataSource extends DataSource { + constructor(name?: string); + } + + class CylinderGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + } + + class CylinderGraphics { + definitionChanged: Event; + length: Property; + topRadius: Property; + bottomRadius: Property; + numberOfVerticalLines: Property; + slices: Property; + show: Property; + material: MaterialProperty; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + constructor(options?: { length?: Property; + topRadius?: Property; + bottomRadius?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property; + numberOfVerticalLines?: Property; + slices?: Property + }); + clone(result?: CylinderGraphics): CylinderGraphics; + merge(source: CylinderGraphics): CylinderGraphics; + } + + class CzmlDataSource extends DataSource { + static updaters: any[]; + static load(czml: Resource | string | object, options?: { sourceUri?: string }): Promise; + static processMaterialPacketData(object: object, propertyName: string, packetData: object, interval: TimeInterval, sourceUri: string, entityCollection: EntityCollection): void; + static processPacketData(type: () => any, object: object, propertyName: string, packetData: object, interval: TimeInterval, sourceUri: string, entityCollection: EntityCollection): void; + static processPositionPacketData(object: object, propertyName: string, packetData: object, interval: TimeInterval, sourceUri: string, entityCollection: EntityCollection): void; + constructor(name?: string); + load(czml: Resource | string | object, options?: { sourceUri?: string }): Promise; + process(czml: Resource | string | object, options?: { sourceUri?: string }): Promise; + } + + abstract class DataSource { + changedEvent: Event; + clock: DataSourceClock; + clustering: EntityCluster; + entities: EntityCollection; + errorEvent: Event; + isLoading: boolean; + loadingEvent: Event; + name: string; + show: boolean; + update(time: JulianDate): boolean; + } + + class DataSourceClock { + definitionChanged: Event; + startTime: JulianDate; + stopTime: JulianDate; + currentTime: JulianDate; + clockRange: ClockRange; + clockStep: ClockStep; + multiplier: number; + clone(result?: DataSourceClock): DataSourceClock; + equals(other: DataSourceClock): boolean; + merge(source: DataSourceClock): DataSourceClock; + getValue(): Clock; + } + + class DataSourceCollection { + length: number; + dataSourceAdded: Event; + dataSourceRemoved: Event; + add(dataSource: DataSource | Promise): Promise; + remove(dataSource: DataSource, destroy?: boolean): boolean; + removeAll(destroy?: boolean): void; + contains(dataSource: DataSource): boolean; + indexOf(dataSource: DataSource): number; + get(index: number): DataSource; + isDestroyed(): boolean; + destroy(): void; + } + + class DataSourceDisplay { + scene: Scene; + dataSources: DataSourceCollection; + defaultDataSource: CustomDataSource; + static defaultVisualizersCallback: DataSourceDisplay.VisualizersCallback; + constructor(options: { scene: Scene; dataSourceCollection: DataSourceCollection; visualizersCallback?: DataSourceDisplay.VisualizersCallback }); + isDestroyed(): boolean; + destroy(): void; + update(time: JulianDate): boolean; + } + + namespace DataSourceDisplay { + type VisualizersCallback = (scene: Scene, dataSource: DataSource) => Visualizer[]; + } + + class DynamicGeometryUpdater { + update(time: JulianDate): void; + isDestroyed(): boolean; + destroy(): void; + } + + class EllipseGeometryUpdater extends GeometryUpdater { + readonly onTerrain: boolean; + constructor(entity: Entity, scene: Scene); + } + + class EllipseGraphics { + definitionChanged: Event; + semiMajorAxis: Property; + semiMinorAxis: Property; + rotation: Property; + show: Property; + material: MaterialProperty; + height: Property; + extrudedHeight: Property; + granularity: Property; + stRotation: Property; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + numberOfVerticalLines: Property; + constructor(options?: { + semiMajorAxis?: number; + semiMinorAxis?: number; + height?: Property; + extrudedHeight?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property; + numberOfVerticalLines?: Property; + rotation?: Property; + stRotation?: Property; + granularity?: Property + }); + clone(result?: EllipseGraphics): EllipseGraphics; + merge(source: EllipseGraphics): EllipseGraphics; + } + + class EllipsoidGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + createFillGeometryInstance(time: JulianDate, skipModelMatrix?: boolean, modelMatrixResult?: Matrix4): GeometryInstance; + createOutlineGeometryInstance(time: JulianDate, skipModelMatrix?: boolean, modelMatrixResult?: Matrix4): GeometryInstance; + } + + class EllipsoidGraphics { + definitionChanged: Event; + show: Property; + radii: Property; + material: MaterialProperty; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + stackPartitions: Property; + slicePartitions: Property; + subdivisions: Property; + constructor(options?: { + radii?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property; + subdivisions?: Property; + stackPartitions?: Property; + slicePartitions?: Property + }); + clone(result?: EllipsoidGraphics): EllipsoidGraphics; + merge(source: EllipsoidGraphics): EllipsoidGraphics; + } + + class Entity { + availability: TimeIntervalCollection; + billboard: BillboardGraphics; + box: BoxGraphics; + corridor: CorridorGraphics; + cylinder: CylinderGraphics; + readonly definitionChanged: Event; + description: Property; + ellipse: EllipseGraphics; + ellipsoid: EllipsoidGraphics; + entityCollection: EntityCollection; + id: string; + isShowing: boolean; + label: LabelGraphics; + model: ModelGraphics; + name: string; + orientation: Property; + parent: Entity; + path: PathGraphics; + plane: any; + point: PointGraphics; + polygon: PolygonGraphics; + polyline: PolylineGraphics; + polylineVolume: PolylineVolumeGraphics; + position: PositionProperty; + properties: any; + propertyNames: any[]; + rectangle: RectangleGraphics; + show: boolean; + viewFrom: Property; + wall: WallGraphics; + constructor(options?: { + id?: string; + name?: string; + availability?: TimeIntervalCollection; + show?: boolean; + description?: Property; + position?: PositionProperty; + orientation?: Property; + viewFrom?: Property; + parent?: Entity; + billboard?: BillboardGraphics; + box?: BoxGraphics; + corridor?: CorridorGraphics; + cylinder?: CylinderGraphics; + ellipse?: EllipseGraphics; + ellipsoid?: EllipsoidGraphics; + label?: LabelGraphics; + model?: ModelGraphics; + path?: PathGraphics; + plane?: any; + point?: PointGraphics; + polygon?: PolygonGraphics; + polyline?: PolylineGraphics; + polylineVolume?: PolylineVolumeGraphics; + rectangle?: RectangleGraphics; + wall?: WallGraphics + }); + addProperty(propertyName: string): void; + computeModelMatrix(time: JulianDate, result?: Matrix4): Matrix4; + isAvailable(time: JulianDate): boolean; + merge(source: Entity): Entity; + removeProperty(propertyName: string): void; + } + + class EntityCluster { + clusterBillboards: boolean; + clusterEvent: Event; + clusterLabels: boolean; + clusterPoints: boolean; + enabled: boolean; + minimumClusterSize: number; + pixelRange: number; + constructor(options?: { enabled?: boolean; pixelRange?: number; minimumClusterSize?: number; clusterBillboards?: boolean; clusterLabels?: boolean; clusterPoints?: boolean }); + destroy(): void; + // newClusterCallback(clusteredEntities, cluster) + } + + class EntityCollection { + readonly collectionChanged: Event; + readonly id: string; + readonly owner: DataSource | CompositeEntityCollection; + show: boolean; + readonly values: Entity[]; + static collectionChangedEventCallback(collection: EntityCollection, added: Entity[], removed: Entity[], changed: Entity[]): void; + constructor(owner: DataSource | CompositeEntityCollection); + add(entity: Entity): Entity; + computeAvailability(): TimeInterval; + contains(entity: Entity): boolean; + getById(id: string): Entity; + getOrCreateEntity(id: string): Entity; + remove(entity: Entity): boolean; + removeAll(): void; + removeById(id: string): boolean; + resumeEvents(): void; + suspendEvents(): void; + } + + class EntityView { + entity: Entity; + scene: Scene; + ellipsoid: Ellipsoid; + boundingSphere: Entity; + static defaultOffset3D: Cartesian3; + constructor(entity: Entity, scene: Scene, ellipsoid?: Ellipsoid, boundingSphere?: BoundingSphere); + update(time: JulianDate): void; + } + + class GeoJsonDataSource extends DataSource { + static clampToGround: boolean; + static crsLinkHrefs: any; + static crsLinkTypes: any; + static crsNames: any; + static fill: Color; + static markerColor: Color; + static markerSize: number; + static markerSymbol: string; + static stroke: Color; + static strokeWidth: number; + static load(data: Resource | string | object, options?: { + sourceUri?: string; + markerSize?: number; + markerSymbol?: string; + markerColor?: Color; + stroke?: Color; + strokeWidth?: number; + fill?: Color; + clampToGround?: boolean + }): Promise; + constructor(name?: string); + load(data: Resource | string | object, options?: { + sourceUri?: string; + markerSize?: number; + markerSymbol?: string; + markerColor?: Color; + stroke?: Color; + strokeWidth?: number; + fill?: Color; + clampToGround?: boolean + }): Promise; + } + + class GeometryUpdater { + readonly classificationTypeProperty: Property; + readonly readonlydistanceDisplayConditionProperty: Property; + readonly entity: Entity; + readonly fillEnabled: boolean; + readonly fillMaterialProperty: MaterialProperty; + readonly geometryChanged: boolean; + readonly hasConstantFill: boolean; + readonly hasConstantOutline: boolean; + readonly id: string; + readonly isClosed: boolean; + readonly isDynamic: boolean; + readonly outlineColorProperty: Property; + readonly outlineEnabled: boolean; + readonly outlineWidth: number; + readonly shadowsProperty: Property; + constructor(options: { entity: Entity; scene: Scene; geometryOptions: any; geometryPropertyName: string; observedPropertyNames: string[] }); + createDynamicUpdater(primitives: PrimitiveCollection, groundPrimitives: PrimitiveCollection): DynamicGeometryUpdater; + destroy(): void; + isDestroyed(): boolean; + isFilled(time: JulianDate): boolean; + isOutlineVisible(time: JulianDate): boolean; + createFillGeometryInstance(time: JulianDate): GeometryInstance; + createOutlineGeometryInstance(time: JulianDate): GeometryInstance; + } + + class GeometryVisualizer extends Visualizer { + constructor(scene: Scene, entityCollection: EntityCollection, primitives?: PrimitiveCollection, groundPrimitives?: PrimitiveCollection); + } + + class GridMaterialProperty extends MaterialProperty { + color: Color; + cellAlpha: Property; + lineCount: Property; + lineThickness: Property; + lineOffset: Property; + constructor(options?: { color?: Property; cellAlpha?: Property; lineCount?: Property; lineThickness?: Property; lineOffset?: Property }); + } + + class ImageMaterialProperty extends MaterialProperty { + image: Property; + repeat: Property; + constructor(options?: { image?: Property; repeat?: Property }); + } + + class KmlDataSource extends DataSource { + refreshEvent: Event; + unsupportedNodeEvent: Event; + constructor(options?: {camera?: Camera, canvas?: HTMLCanvasElement; ellipsoid?: Ellipsoid}); + static load(data: Resource | string | Document | Blob, + options?: { camera: Camera, canvas: HTMLCanvasElement; sourceUri?: string, clampToGround?: boolean; ellipsoid?: Ellipsoid }): Promise; + load(data: Resource | string | Document | Blob, options?: { sourceUri?: string, clampToGround?: boolean, ellipsoid?: Ellipsoid }): Promise; + } + + class KmlFeatureData { + author: { name: string; uri: string; email: string }; + link: { href: string; hreflang: string; rel: string; type: string; title: string; length: string }; + address: string; + phoneNumber: string; + snippet: string; + extendedData: string; + } + + class LabelGraphics { + definitionChanged: Event; + text: Property; + font: Property; + style: Property; + fillColor: Property; + outlineColor: Property; + outlineWidth: Property; + horizontalOrigin: Property; + verticalOrigin: Property; + eyeOffset: Property; + pixelOffset: Property; + scale: Property; + show: Property; + translucencyByDistance: Property; + pixelOffsetScaleByDistance: Property; + constructor(options?: { + text?: Property; + font?: Property; + style?: Property; + fillColor?: Property; + outlineColor?: Property; + outlineWidth?: Property; + show?: Property; + scale?: Property; + horizontalOrigin?: Property; + verticalOrigin?: Property; + eyeOffset?: Property; + pixelOffset?: Property; + translucencyByDistance?: Property; + pixelOffsetScaleByDistance?: Property + }); + clone(result?: LabelGraphics): LabelGraphics; + merge(source: LabelGraphics): LabelGraphics; + } + + class LabelVisualizer extends Visualizer { + constructor(entityCluster: EntityCluster, entityCollection: EntityCollection); + } + + class MaterialProperty extends Property { + getType(time: JulianDate): string; + } + + class ModelGraphics { + clampAnimations: Property | boolean; + clippingPlanes: Property; + color: Property; + colorBlendAmount: Property | number; + colorBlendMode: Property; + readonly definitionChanged: Event; + distanceDisplayCondition: Property; + heightReference: Property; + incrementallyLoadTextures: Property | boolean; + maximumScale: Property | number; + minimumScale: Property | number; + minimumPixelSize: Property | number; + nodeTransformations: any; // PropertyBag + runAnimations: Property | boolean; + scale: Property | number; + shadows: Property; + show: Property | boolean; + silhouetteColor: Property; + silhouetteSize: Property | number; + uri: Property | string; + constructor(options?: { + uri?: Property | string; + show?: Property | boolean; + scale?: Property | number; + minimumPixelSize?: Property | number; + maximumScale?: Property | number; + incrementallyLoadTextures?: Property | boolean; + runAnimations?: Property | boolean; + clampAnimations?: Property | boolean; + nodeTransformations?: Property; + shadows?: Property; + heightReference?: Property; + distanceDisplayCondition?: Property; + silhouetteColor?: Property; + silhouetteSize?: Property | number; + color?: Property; + colorBlendMode?: Property; + colorBlendAmount?: Property | number; + clippingPlanes?: Property; + }); + clone(result?: ModelGraphics): ModelGraphics; + merge(source: ModelGraphics): ModelGraphics; + } + + class ModelVisualizer extends Visualizer { + constructor(scene: Scene, entityCollection: EntityCollection); + } + + class PathGraphics { + readonly definitionChanged: Event; + distanceDisplayCondition: Property; + leadTime: Property | number; + material: MaterialProperty; + resolution: Property | number; + trailTime: Property | number; + show: Property | boolean; + width: Property | number; + constructor(options?: { + leadTime?: Property | number; + trailTime?: Property | number; + show?: Property | boolean; + width?: Property | number; + material?: MaterialProperty; + resolution?: Property | number; + distanceDisplayCondition?: Property; + }); + clone(result?: PathGraphics): PathGraphics; + merge(source: PathGraphics): PathGraphics; + } + + class PathVisualizer extends Visualizer { + constructor(scene: Scene, entityCollection: EntityCollection); + } + + class PointGraphics { + color: Property; + readonly definitionChanged: Event; + disableDepthTestDistance: Property; + distanceDisplayCondition: Property; + heightReference: Property; + outlineColor: Property; + outlineWidth: Property; + pixelSize: Property; + scaleByDistance: Property; + show: Property; + translucencyByDistance: Property; + constructor(options?: { + color?: Color; + pixelSize?: number; + outlineColor?: Color; + outlineWidth?: number; + show?: boolean; + scaleByDistance?: Property; + translucencyByDistance?: Property; + heightReference?: HeightReference; + distanceDisplayCondition?: Property; + disableDepthTestDistance?: Property + }); + clone(result?: PointGraphics): PointGraphics; + merge(source: PointGraphics): PointGraphics; + } + + class PointVisualizer extends Visualizer { + constructor(entityCluster: EntityCluster, entityCollection: EntityCollection); + } + + class PolygonGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + } + + class PolygonGraphics { + definitionChanged: Event; + show: Property; + material: MaterialProperty; + positions: Property; + hierarchy: Property; + height: Property; + extrudedHeight: Property; + granularity: Property; + stRotation: Property; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + perPositionHeight: Property; + constructor(options?: { + hierarchy?: Property; + height?: number; + extrudedHeight?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: boolean; + outlineColor?: Property; + outlineWidth?: number; + stRotation?: Property; + granularity?: Property; + perPositionHeight?: Property + }); + clone(result?: PolygonGraphics): PolygonGraphics; + merge(source: PolygonGraphics): PolygonGraphics; + } + + class PolylineArrowMaterialProperty extends MaterialProperty { + color: Property; + constructor(color?: Property); + } + + class PolylineGeometryUpdater extends GeometryUpdater { + readonly depthFailMaterialProperty: MaterialProperty; + readonly distanceDisplayConditionProperty: Property; + constructor(entity: Entity, scene: Scene); + } + + class PolylineGlowMaterialProperty extends MaterialProperty { + color: Color; + glowPower: Property; + constructor(options?: { color?: Property; glowPower?: Property }); + } + + class PolylineGraphics { + definitionChanged: Event; + show: Property; + material: MaterialProperty; + positions: Property; + width: number; + followSurface: Property; + granularity: Property; + constructor(options?: { positions?: Cartesian3[]; followSurface?: Property; width?: number; show?: Property; material?: MaterialProperty; granularity?: Property }); + clone(result?: PolylineGraphics): PolylineGraphics; + merge(source: PolylineGraphics): PolylineGraphics; + } + + class PolylineOutlineMaterialProperty extends MaterialProperty { + color: Color; + outlineColor: Color; + outlineWidth: Property; + constructor(options?: { color?: Property; outlineColor?: Property; outlineWidth?: Property }); + } + + class PolylineVolumeGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + } + + class PolylineVolumeGraphics { + definitionChanged: Event; + show: Property; + material: MaterialProperty; + positions: Property; + shape: Property; + granularity: Property; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + cornerType: Property; + constructor(options?: { + positions?: Property; + shape?: Property; + cornerType?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property; + granularity?: Property + }); + clone(result?: PolylineVolumeGraphics): PolylineVolumeGraphics; + merge(source: PolylineVolumeGraphics): PolylineVolumeGraphics; + } + + abstract class PositionProperty extends Property { + referenceFrame: ReferenceFrame; + getValueInReferenceFrame(time: JulianDate, referenceFrame: ReferenceFrame, result?: Cartesian3): Cartesian3; + } + + class PositionPropertyArray extends PositionProperty { + constructor(value?: Property[]); + getValue(time?: JulianDate, result?: Cartesian3[]): Cartesian3[]; + setValue(value: Property[]): void; + } + + abstract class Property { + readonly isConstant: boolean; + readonly definitionChanged: Event; + getValue(time: JulianDate, result?: any): any; + equals(other?: Property): boolean; + } + + class PropertyArray extends Property { + constructor(value?: Property[]); + getValue(time?: JulianDate, result?: any[]): any[]; + setValue(value: Property[]): void; + } + + class RectangleGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + } + + class RectangleGraphics { + definitionChanged: Event; + show: Property; + coordinates: Property; + material: MaterialProperty; + height: Property; + extrudedHeight: Property; + granularity: Property; + stRotation: Property; + rotation: Property; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + closeTop: Property; + closeBottom: Property; + constructor(options?: { + coordinates?: Property; + height?: Property; + extrudedHeight?: Property; + closeTop?: Property; + closeBottom?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property; + rotation?: Property; + stRotation?: Property; + granularity?: Property + }); + clone(result?: RectangleGraphics): RectangleGraphics; + merge(source: RectangleGraphics): RectangleGraphics; + } + + class ReferenceProperty extends Property { + readonly referenceFrame: ReferenceFrame; + readonly targetId: string; + readonly targetCollection: EntityCollection; + readonly targetPropertyNames: string[]; + readonly resolvedProperty: Property; + constructor(targetCollection: EntityCollection, targetId: string, targetPropertyNames: string); + getValueInReferenceFrame(time: JulianDate, referenceFrame: ReferenceFrame, result?: Cartesian3): Cartesian3; + getType(time: JulianDate): string; + static fromString(targetCollection: Entity, referenceString: string): ReferenceProperty; + } + + class SampledPositionProperty extends SampledProperty { + numberOfDerivatives: boolean; + constructor(referenceFrame?: ReferenceFrame, numberOfDerivatives?: number); + addSample(time: JulianDate, position: Cartesian3, derivatives?: Cartesian3[]): void; + addSamples(times: JulianDate[], positions: Cartesian3[], derivatives?: any[][]): void; + addSamplesPackedArray(packedSamples: number[], epoch?: JulianDate): void; + } + + class SampledProperty extends PositionProperty { + type: any; + derivativeTypes: Packable[]; + interpolationDegree: number; + interpolationAlgorithm: InterpolationAlgorithm; + forwardExtrapolationType: ExtrapolationType; + forwardExtrapolationDuration: number; + backwardExtrapolationType: ExtrapolationType; + backwardExtrapolationDuration: number; + constructor(type: number | Packable, derivativeTypes?: Packable[]); + setInterpolationOptions(options?: { interpolationAlgorithm?: InterpolationAlgorithm; interpolationDegree?: number }): void; + addSample(time: JulianDate, value: Packable, derivatives?: Packable[]): void; + addSamples(times: JulianDate[], values: Packable[], derivativeValues?: any[][]): void; + addSamplesPackedArray(packedSamples: number[], epoch?: JulianDate): void; + } + + class StripeMaterialProperty extends MaterialProperty { + orientation: Property; + evenColor: Color; + oddColor: Color; + offset: Property; + repeat: number; + constructor(options?: { evenColor?: Property; oddColor?: Property; repeat?: Property; offset?: Property; orientation?: Property }); + } + + class TimeIntervalCollectionPositionProperty extends PositionProperty { + intervals: TimeIntervalCollection; + constructor(referenceFrame?: ReferenceFrame); + } + + class TimeIntervalCollectionProperty extends Property { + intervals: TimeIntervalCollection; + } + + class VelocityOrientationProperty extends Property { + position: Property; + ellipsoid: Property; + constructor(position?: Property, ellipsoid?: Ellipsoid); + getValue(time?: JulianDate, result?: Quaternion): Quaternion; + } + + abstract class Visualizer { + update(time: JulianDate): boolean; + isDestroyed(): boolean; + destroy(): void; + } + + class WallGeometryUpdater extends GeometryUpdater { + constructor(entity: Entity, scene: Scene); + } + + class WallGraphics { + readonly definitionChanged: Event; + show: Property; + material: MaterialProperty; + positions: Property; + minimumHeights: Property; + maximumHeights: Property; + granularity: Property; + fill: Property; + outline: Property; + outlineColor: Property; + outlineWidth: Property; + constructor(options?: { + positions?: Property; + maximumHeights?: Property; + minimumHeights?: Property; + show?: Property; + fill?: Property; + material?: MaterialProperty; + outline?: Property; + outlineColor?: Property; + outlineWidth?: Property; + granularity?: Property + }); + clone(result?: WallGraphics): WallGraphics; + merge(source: WallGraphics): WallGraphics; + } + + class Appearance { + readonly closed: boolean; + readonly fragmentShaderSource: string; + material: Material; + readonly renderState: any; + translucent: boolean; + readonly vertexShaderSource: string; + constructor(options?: { translucent?: boolean; closed?: boolean; material?: Material; vertexShaderSource?: string; fragmentShaderSource?: string; renderState?: RenderState }); + getFragmentShaderSource(): string; + isTranslucent(): boolean; + getRenderState(): any; + } + + class ArcGisMapServerImageryProvider extends ImageryProvider { + url: string; + usingPrecachedTiles: boolean; + constructor(options: { + url: string; + tileDiscardPolicy?: TileDiscardPolicy; + proxy?: Proxy; + usePreCachedTilesIfAvailable?: boolean; + enablePickFeatures?: boolean; + rectangle?: Rectangle; + tilingScheme?: TilingScheme; + ellipsoid?: Ellipsoid; + tileWidth?: number; + tileHeight?: number; + maximumLevel?: number + }, layers?: string); + } + + class DistanceDisplayCondition extends Packable { + far: number; + near: number; + constructor(near: number, far: number); + static clone(value?: DistanceDisplayCondition, result?: DistanceDisplayCondition): DistanceDisplayCondition; + static equals(left: DistanceDisplayCondition, right: DistanceDisplayCondition): boolean; + static pack(value: DistanceDisplayCondition, array: number[], startingIndex: number): number[]; + static unpack(array: number[], startingIndex: number, result: DistanceDisplayCondition): DistanceDisplayCondition; + clone(result: DistanceDisplayCondition): DistanceDisplayCondition; + equals(other: DistanceDisplayCondition): boolean; + } + + class Billboard { + alignedAxis: Cartesian3; + color: Color; + disableDepthTestDistance: number; + distanceDisplayCondition: DistanceDisplayCondition; + eyeOffset: Cartesian3; + height: number; + heightReference: HeightReference; + horizontalOrigin: HorizontalOrigin; + id: any; + image: string; + pixelOffset: Cartesian2; + pixelOffsetScaleByDistance: NearFarScalar; + position: Cartesian3; + readonly ready: boolean; + rotation: number; + scale: number; + scaleByDistance: NearFarScalar; + show: boolean; + sizeInMeters: boolean; + translucencyByDistance: NearFarScalar; + verticalOrigin: VerticalOrigin; + width: number; + computeScreenSpacePosition(scene: Scene, result?: Cartesian2): Cartesian2; + equals(other: Billboard): boolean; + setImage(id: string, image: HTMLImageElement | HTMLCanvasElement | string | Billboard.CreateImageCallback): void; + setImageSubRegion(id: string, subRegion: BoundingRectangle): void; + } + + namespace Billboard { + type CreateImageCallback = (id: string) => HTMLImageElement | HTMLCanvasElement | Promise; + } + + class BillboardCollection { + blendOption: BlendOption; + debugShowBoundingVolume: boolean; + length: number; + modelMatrix: Matrix4; + constructor(options?: { modelMatrix?: Matrix4; debugShowBoundingVolume?: boolean; scene?: Scene; blendOption?: BlendOption }); + add(billboard?: any): Billboard; + contains(billboard?: Billboard): boolean; + destroy(): void; + get(index: number): Billboard; + isDestroyed(): boolean; + remove(billboard: Billboard): boolean; + removeAll(): void; + update(): void; + } + + class BingMapsImageryProvider extends ImageryProvider { + readonly url: string; + readonly key: string; + readonly mapStyle: BingMapsStyle; + readonly culture: string; + constructor(options: { url: string; key?: string; tileProtocol?: string; mapStyle?: string; culture?: string; ellipsoid?: Ellipsoid; tileDiscardPolicy?: TileDiscardPolicy; proxy?: Proxy }); + static tileXYToQuadKey(x: number, y: number, level: number): string; + static quadKeyToTileXY(quadkey: string): {x: number, y: number, level: number}; + } + + // tslint:disable-next-line no-unnecessary-class + class EasingFunction { + static BACK_IN: EasingFunction.Callback; + static BACK_IN_OUT: EasingFunction.Callback; + static BACK_OUT: EasingFunction.Callback; + static BOUNCE_IN: EasingFunction.Callback; + static BOUNCE_IN_OUT: EasingFunction.Callback; + static BOUNCE_OUT: EasingFunction.Callback; + static CIRCULAR_IN: EasingFunction.Callback; + static CIRCULAR_IN_OUT: EasingFunction.Callback; + static CIRCULAR_OUT: EasingFunction.Callback; + static CUBIC_IN: EasingFunction.Callback; + static CUBIC_IN_OUT: EasingFunction.Callback; + static CUBIR_OUT: EasingFunction.Callback; + static ELASTIC_IN: EasingFunction.Callback; + static ELASTIC_IN_OUT: EasingFunction.Callback; + static ELASTIC_OUT: EasingFunction.Callback; + static EXPONENTIAL_IN: EasingFunction.Callback; + static EXPONENTIAL_IN_OUT: EasingFunction.Callback; + static EXPONENTIAL_OUT: EasingFunction.Callback; + static LINEAR_NONE: EasingFunction.Callback; + static QUADRATIC_IN: EasingFunction.Callback; + static QUADRATIC_IN_OUT: EasingFunction.Callback; + static QUADRATIC_OUT: EasingFunction.Callback; + static QUARTIC_IN: EasingFunction.Callback; + static QUARTIC_IN_OUT: EasingFunction.Callback; + static QUARTIC_OUT: EasingFunction.Callback; + static QUINTIC_IN: EasingFunction.Callback; + static QUINTIC_IN_OUT: EasingFunction.Callback; + static QUINTIC_OUT: EasingFunction.Callback; + static SINUSOIDAL_IN: EasingFunction.Callback; + static SINUSOIDAL_IN_OUT: EasingFunction.Callback; + static SINUSOIDAL_OUT: EasingFunction.Callback; + } + + namespace EasingFunction { + type Callback = (time: number) => number; + } + + class Camera { + position: Cartesian3; + direction: Cartesian3; + up: Cartesian3; + right: Cartesian3; + frustum: Frustum; + defaultMoveAmount: number; + defaultLookAmount: number; + defaultRotateAmount: number; + defaultZoomAmount: number; + constrainedAxis: Cartesian3; + maximumTranslateFactor: number; + maximumZoomFactor: number; + readonly transform: Matrix4; + readonly inverseTransform: Matrix4; + readonly viewMatrix: Matrix4; + readonly inverseViewMatrix: Matrix4; + readonly positionCartographic: Cartographic; + readonly positionWC: Cartesian3; + percentageChanged: number; + readonly directionWC: Cartesian3; + readonly upWC: Cartesian3; + readonly rightWC: Cartesian3; + readonly heading: number; + readonly pitch: number; + readonly roll: number; + readonly moveStart: Event; + readonly moveEnd: Event; + static DEFAULT_OFFSET: HeadingPitchRange; + static DEFAULT_VIEW_RECTANGLE: Rectangle; + static DEFAULT_VIEW_FACTOR: number; + readonly changed: Event; + constructor(scene: Scene); + cameraToWorldCoordinates(cartesian: Cartesian4, result?: Cartesian4): Cartesian4; + cameraToWorldCoordinatesPoint(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + cameraToWorldCoordinatesVector(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + cancelFlight(): void; + computeViewRectangle(ellipsoid?: Ellipsoid, result?: Rectangle): Rectangle | undefined; + distanceToBoundingSphere(boundingSphere: BoundingSphere): number; + flyHome(duration: number): void; + flyTo(options: { + destination: Cartesian3 | Rectangle; + orientation?: any; + duration?: number; + complete?: Camera.FlightCompleteCallback; + cancel?: Camera.FlightCancelledCallback; + endTransform?: Matrix4; + maximumHeight?: number; + pitchAdjustHeight?: number; + flyOverLongitude?: number; + flyOverLongitudeWeight?: number; + easingFunction?: EasingFunction + }): void; + flyToBoundingSphere(boundingSphere: BoundingSphere, options?: { + duration?: number; + offset?: HeadingPitchRange; + complete?: Camera.FlightCompleteCallback; + cancel?: Camera.FlightCancelledCallback; + endTransform?: Matrix4; + maximumHeight?: number; + pitchAdjustHeight?: number; + flyOverLongitude?: number; + flyOverLongitudeWeight?: number; + easingFunction?: EasingFunction + }): void; + getMagnitude(): number; + getPickRay(windowPosition: Cartesian2, result?: Ray): Ray; + getPixelSize(boundingSphere: BoundingSphere, drawingBufferWidth: number, drawingBufferHeight: number): number; + getRectangleCameraCoordinates(rectangle: Rectangle, result?: Cartesian3): Cartesian3; + look(axis: Cartesian3, angle?: number): void; + lookAt(target: Cartesian3, offset: Cartesian3 | HeadingPitchRange): void; + lookAtTransform(transform: Matrix4, offset: Cartesian3 | HeadingPitchRange): void; + lookDown(amount?: number): void; + lookLeft(amount?: number): void; + lookRight(amount?: number): void; + lookUp(amount?: number): void; + move(direction: Cartesian3, amount?: number): void; + moveBackward(amount?: number): void; + moveDown(amount?: number): void; + moveForward(amount?: number): void; + moveLeft(amount?: number): void; + moveRight(amount?: number): void; + moveUp(amount?: number): void; + pickEllipsoid(windowPosition: Cartesian2, ellipsoid?: Ellipsoid, result?: Cartesian3): Cartesian3; + rotate(axis: Cartesian3, angle?: number): void; + rotateDown(angle?: number): void; + rotateLeft(angle?: number): void; + rotateRight(angle?: number): void; + rotateUp(angle?: number): void; + setView(options: {destination?: Cartesian3 | Rectangle; orientation?: any; endTransform?: Matrix4}): void; + switchToOrthographicFrustum(): void; + switchToPerspectiveFrustum(): void; + twistLeft(amount?: number): void; + twistRight(amount?: number): void; + viewBoundingSphere(boundingSphere: BoundingSphere, offset?: HeadingPitchRange): void; + worldToCameraCoordinates(cartesian: Cartesian4, result?: Cartesian4): Cartesian4; + worldToCameraCoordinatesPoint(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + worldToCameraCoordinatesVector(cartesian: Cartesian3, result?: Cartesian3): Cartesian3; + zoomIn(amount?: number): void; + zoomOut(amount?: number): void; + } + + namespace Camera { + type FlightCancelledCallback = () => void; + type FlightCompleteCallback = () => void; + } + + class CameraEventAggregator { + currentMousePosition: Cartesian2; + anyButtonDown: boolean; + constructor(element?: HTMLCanvasElement); + isMoving(type: CameraEventType, modifier?: KeyboardEventModifier): boolean; + getMovement(type: CameraEventType, modifier?: KeyboardEventModifier): any; + getLastMovement(type: CameraEventType, modifier?: KeyboardEventModifier): any; + isButtonDown(type: CameraEventType, modifier?: KeyboardEventModifier): boolean; + getStartMousePosition(type: CameraEventType, modifier?: KeyboardEventModifier): Cartesian2; + getButtonPressTime(type: CameraEventType, modifier?: KeyboardEventModifier): Date; + getButtonReleaseTime(type: CameraEventType, modifier?: KeyboardEventModifier): Date; + reset(): void; + isDestroyed(): boolean; + destroy(): void; + } + + class CreditDisplay { + static cesiumCredit: Credit; + container: HTMLElement; + constructor(container: HTMLElement, delimiter?: string, viewport?: HTMLElement); + addCredit(credit: Credit): void; + addDefaultCredit(credit: Credit): void; + beginFrame(credit: Credit): void; + destroy(): void; + endFrame(credit: Credit): void; + isDestroyed(): boolean; + removeDefaultCredit(credit: Credit): void; + update(): void; + } + + class CullingVolume { + planes: Cartesian4[]; + constructor(planes: Cartesian4[]); + computeVisibility(boundingVolume: any): Intersect; + } + + class DebugAppearance extends Appearance { + readonly attributeName: string; + readonly glslDatatype: string; + constructor(options: { attributeName: string; glslDatatype?: string; vertexShaderSource?: string; fragmentShaderSource?: string; renderState?: RenderState }); + } + + class DebugModelMatrixPrimitive { + length: number; + width: number; + show: boolean; + modelMatrix: Matrix4; + id: any; + constructor(options?: { length?: number; width?: number; modelMatrix?: Matrix4; show?: boolean; id?: any }); + isDestroyed(): boolean; + destroy(): void; + } + + class DiscardMissingTileImagePolicy { + constructor(options: { missingImageUrl: Resource | string; pixelsToCheck: Cartesian2[]; disableCheckIfAllPixelsAreTransparent?: boolean }); + isReady(): boolean; + shouldDiscardImage(image: HTMLImageElement): boolean; + } + + class EllipsoidPrimitive { + center: Cartesian3; + radii: Cartesian3; + modelMatrix: Matrix4; + show: boolean; + material: Material; + id: any; + debugShowBoundingVolume: boolean; + constructor(options?: { center?: Cartesian3; radii?: Cartesian3; modelMatrix?: Matrix4; show?: boolean; material?: Material; id?: any; debugShowBoundingVolume?: boolean }); + update(): void; + isDestroyed(): boolean; + destroy(): void; + } + + class EllipsoidSurfaceAppearance extends Appearance { + readonly vertexFormat: VertexFormat; + readonly flat: boolean; + readonly faceForward: boolean; + readonly aboveGround: boolean; + static VERTEX_FORMAT: VertexFormat; + constructor(options?: { + flat?: boolean; + faceForward?: boolean; + translucent?: boolean; + aboveGround?: boolean; + material?: Material; + vertexShaderSource?: string; + fragmentShaderSource?: string; + renderState?: RenderState + }); + } + + class FrameRateMonitor { + samplingWindow: number; + quietPeriod: number; + warmupPeriod: number; + minimumFrameRateDuringWarmup: number; + minimumFrameRateAfterWarmup: number; + scene: Scene; + lowFrameRate: Event; + nominalFrameRate: Event; + lastFramesPerSecond: number; + static defaultSettings: any; + constructor(options?: { + scene: Scene; + samplingWindow?: number; + quietPeriod?: number; + warmupPeriod?: number; + minimumFrameRateDuringWarmup?: number; + minimumFrameRateAfterWarmup?: number + }); + pause(): void; + unpause(): void; + isDestroyed(): boolean; + destroy(): void; + static fromScene(scene: Scene): FrameRateMonitor; + } + + // tslint:disable-next-line no-unnecessary-class + class GetFeatureInfoFormat { + constructor(type: string, format?: string, callback?: (res: any) => any); + } + + class Globe { + terrainProvider: TerrainProvider; + northPoleColor: Cartesian3; + southPoleColor: Cartesian3; + show: boolean; + oceanNormalMapUrl: string; + depthTestAgainstTerrain: boolean; + maximumScreenSpaceError: number; + tileCacheSize: number; + enableLighting: boolean; + lightingFadeOutDistance: number; + lightingFadeInDistance: number; + showWaterEffect: boolean; + ellipsoid: Ellipsoid; + imageryLayers: ImageryLayerCollection; + baseColor: Color; + constructor(ellipsoid?: Ellipsoid); + pick(ray: Ray, scene: Scene, result?: Cartesian3): Cartesian3; + getHeight(cartographic: Cartographic): number; + isDestroyed(): boolean; + destroy(): void; + } + + class GoogleEarthEnterpriseImageryProvider extends ImageryProvider { + url: string; + path: string; + channel: number; + version: number; + requestType: string; + constructor(options: { + url: string; + channel: number; + path?: string; + maximumLevel?: number; + tileDiscardPolicy?: TileDiscardPolicy; + ellipsoid?: Ellipsoid; + proxy?: Proxy + }); + } + + class GridImageryProvider extends ImageryProvider { + constructor(options?: { + tilingScheme?: TilingScheme; + ellipsoid?: Ellipsoid; + cells?: number; + color?: Color; + glowColor?: Color; + glowWidth?: number; + tileWidth?: number; + tileHeight?: number; + canvasSize?: number + }, backgroundColor?: Color); + } + + class HeadingPitchRange { + heading: number; + pitch: number; + range: number; + constructor(heading?: number, pitch?: number, range?: number); + static clone(hpr: HeadingPitchRange, result?: HeadingPitchRange): HeadingPitchRange; + } + + class ImageryLayer { + alpha: number; + brightness: number; + contrast: number; + hue: number; + saturation: number; + gamma: number; + show: boolean; + imageryProvider: ImageryProvider; + rectangle: Rectangle; + static DEFAULT_BRIGHTNESS: number; + static DEFAULT_CONTRAST: number; + static DEFAULT_HUE: number; + static DEFAULT_SATURATION: number; + static DEFAULT_GAMMA: number; + constructor(imageryProvider: ImageryProvider, options?: { + rectangle?: Rectangle; + alpha?: number | ImageryLayer.ValueFunc; + brightness?: number | ImageryLayer.ValueFunc; + contrast?: number | ImageryLayer.ValueFunc; + hue?: number | ImageryLayer.ValueFunc; + saturation?: number | ImageryLayer.ValueFunc; + gamma?: number | ImageryLayer.ValueFunc; + show?: boolean; + maximumAnisotropy?: number; + minimumTerrainLevel?: number; + maximumTerrainLevel?: number + }); + isBaseLayer(): boolean; + isDestroyed(): boolean; + destroy(): void; + } + + namespace ImageryLayer { + type ValueFunc = (frameState: any, layer: ImageryLayer, x: number, y: number, level: number) => number; + } + + class ImageryLayerCollection { + layerAdded: Event; + layerRemoved: Event; + layerMoved: Event; + layerShownOrHidden: Event; + length: number; + add(layer: ImageryLayer, index?: number): void; + addImageryProvider(imageryProvider: ImageryProvider, index?: number): ImageryLayer; + remove(layer: ImageryLayer, destroy?: boolean): boolean; + removeAll(destroy?: boolean): void; + contains(layer: ImageryLayer): boolean; + indexOf(layer: ImageryLayer): number; + get(index: number): ImageryLayer; + raise(layer: ImageryLayer): void; + lower(layer: ImageryLayer): void; + raiseToTop(layer: ImageryLayer): void; + lowerToBottom(layer: ImageryLayer): void; + pickImageryLayerFeatures(ray: Ray, scene: Scene): Promise | undefined; + isDestroyed(): boolean; + destroy(): void; + } + + class ImageryLayerFeatureInfo { + name: string; + description: string; + position: Cartographic; + data: any; + configureNameFromProperties(properties: any): void; + configureDescriptionFromProperties(properties: any): void; + } + + abstract class ImageryProvider { + credit: Credit; + defaultAlpha: number; + defaultBrightness: number; + defaultContrast: number; + defaultGamma: number; + defaultHue: number; + defaultSaturation: number; + defaultMagnificationFilter: any; + defaultMinificationFilter: any; + readonly errorEvent: Event; + readonly hasAlphaChannel: boolean; + readonly maximumLevel: number; + readonly minimumLevel: number; + readonly proxy: Proxy; + readonly ready: boolean; + readonly readyPromise: Promise; + readonly rectangle: Rectangle; + readonly tileDiscardPolicy: TileDiscardPolicy; + readonly tileWidth: number; + readonly tileHeight: number; + readonly tilingScheme: TilingScheme; + getTileCredits(x: number, y: number, level: number): Credit[]; + requestImage(x: number, y: number, level: number): Promise; + pickFeatures(x: number, y: number, level: number, longitude: number, latitude: number): Promise; + static loadImage(url: string): Promise; + } + + class Label { + show: boolean; + position: Cartesian3; + text: string; + font: string; + fillColor: Color; + outlineColor: Color; + outlineWidth: number; + style: LabelStyle; + pixelOffset: Cartesian2; + translucencyByDistance: NearFarScalar; + pixelOffsetScaleByDistance: NearFarScalar; + eyeOffset: Cartesian3; + horizontalOrigin: HorizontalOrigin; + verticalOrigin: VerticalOrigin; + scale: number; + id: any; + computeScreenSpacePosition(scene: Scene, result?: Cartesian2): Cartesian2; + equals(other: Label): boolean; + isDestroyed(): boolean; + } + + class LabelCollection { + modelMatrix: Matrix4; + debugShowBoundingVolume: boolean; + length: number; + constructor(options?: { modelMatrix?: Matrix4; debugShowBoundingVolume?: boolean }); + add(options?: any): Label; + remove(label: Label): boolean; + removeAll(): void; + contains(label: Label): boolean; + get(index: number): Label; + isDestroyed(): boolean; + destroy(): void; + } + + class Material { + type: string; + shaderSource: string; + materials: any; + uniforms: any; + translucent: boolean; + static DefaultImageId: string; + static DefaultCubeMapId: string; + static ColorType: string; + static ImageType: string; + static DiffuseMapType: string; + static AlphaMapType: string; + static SpecularMapType: string; + static EmissionMapType: string; + static BumpMapType: string; + static NormalMapType: string; + static GridType: string; + static StripeType: string; + static CheckerboardType: string; + static DotType: string; + static WaterType: string; + static RimLightingType: string; + static FadeType: string; + static PolylineArrowType: string; + static PolylineGlowType: string; + static PolylineOutlineType: string; + constructor(options?: { strict?: boolean; translucent?: boolean; fabric: any }); + isTranslucent(): boolean; + isDestroyed(): boolean; + destroy(): void; + static fromType(type: string, uniforms?: any): Material; + } + + class MaterialAppearance extends Appearance { + readonly materialSupport: MaterialAppearance.MaterialSupport; + readonly vertexFormat: VertexFormat; + readonly flat: boolean; + readonly faceForward: boolean; + constructor(options?: { + flat?: boolean; + faceForward?: boolean; + translucent?: boolean; + closed?: boolean; + materialSupport?: MaterialAppearance.MaterialSupport; + material?: Material; + vertexShaderSource?: string; + fragmentShaderSource?: string; + renderState?: RenderState + }); + } + + namespace MaterialAppearance { + enum MaterialSupport { + BASIC, + TEXTURED, + ALL + } + } + + class Model { + show: boolean; + modelMatrix: Matrix4; + scale: number; + minimumPixelSize: number; + id: any; + activeAnimations: ModelAnimationCollection; + debugShowBoundingVolume: boolean; + debugWireframe: boolean; + gltf: any; + basePath: string; + boundingSphere: BoundingSphere; + ready: boolean; + readyPromise: Promise; + asynchronous: boolean; + allowPicking: boolean; + constructor(options?: { + gltf?: any; + basePath?: string; + show?: boolean; + modelMatrix?: Matrix4; + scale?: number; + minimumPixelSize?: number; + id?: any; + allowPicking?: boolean; + asynchronous?: boolean; + debugShowBoundingVolume?: boolean; + debugWireframe?: boolean + }); + getNode(name: string): ModelNode; + getMesh(name: string): ModelMesh; + getMaterial(name: string): ModelMaterial; + update(): void; + isDestroyed(): boolean; + destroy(): void; + static fromGltf(options: { + url: string; + headers?: any; + show?: boolean; + modelMatrix?: Matrix4; + scale?: number; + minimumPixelSize?: number; + allowPicking?: boolean; + asynchronous?: boolean; + debugShowBoundingVolume?: boolean; + debugWireframe?: boolean + }): Model; + } + + class ModelAnimation { + removeOnStop: boolean; + start: Event; + update: Event; + stop: Event; + name: string; + startTime: JulianDate; + delay: number; + stopTime: JulianDate; + speedup: number; + reverse: boolean; + loop: ModelAnimationLoop; + } + + class ModelAnimationCollection { + animationAdded: Event; + animationRemoved: Event; + length: number; + add(options: { + name: string; + startTime?: JulianDate; + delay?: number; + stopTime?: JulianDate; + removeOnStop?: boolean; + speedup?: number; + reverse?: boolean; + loop?: ModelAnimationLoop + }): ModelAnimation; + addAll(options?: { + startTime?: JulianDate; + delay?: number; + stopTime?: JulianDate; + removeOnStop?: boolean; + speedup?: number; + reverse?: boolean; + loop?: ModelAnimationLoop + }): ModelAnimation[]; + remove(animation: ModelAnimation): boolean; + removeAll(): void; + contains(animation: ModelAnimation): boolean; + get(index: number): ModelAnimation; + } + + class ModelMaterial { + readonly name: string; + readonly id: string; + setValue(name: string, value?: any): void; + getValue(name: string): any; + } + + class ModelMesh { + name: string; + id: string; + materials: ModelMaterial[]; + } + + class ModelNode { + name: string; + id: string; + show: boolean; + matrix: Matrix4; + } + + class Moon { + show: boolean; + textureUrl: string; + onlySunLighting: boolean; + ellipsoid: Ellipsoid; + constructor(options?: { show?: boolean; textureUrl?: string; ellipsoid?: Ellipsoid; onlySunLighting?: boolean }); + isDestroyed(): boolean; + destroy(): void; + } + + class NeverTileDiscardPolicy { + isReady(): boolean; + shouldDiscardImage(image: HTMLImageElement | Promise): Promise; + } + + class PerInstanceColorAppearance extends Appearance { + readonly vertexFormat: VertexFormat; + readonly flat: boolean; + readonly faceForward: boolean; + static VERTEX_FORMAT: VertexFormat; + static FLAT_VERTEX_FORMAT: VertexFormat; + constructor(options?: { flat?: boolean; + faceForward?: boolean; + translucent?: boolean; + closed?: boolean; + vertexShaderSource?: string; + fragmentShaderSource?: string; + renderState?: RenderState + }); + } + + abstract class Frustum { + near: number; + far: number; + readonly projectionMatrix: Matrix4; + computeCullingVolume(position: Cartesian3, direction: Cartesian3, up: Cartesian3): CullingVolume; + getPixelDimensions(drawingBufferWidth: number, drawingBufferHeight: number, distance: number, result: Cartesian2): Cartesian2; + } + + class OrthographicFrustum extends Frustum { + aspectRatio: number; + width: number; + static packedLength: number; + constructor(options?: {width: number; aspectRatio: number; near: number; far: number}); + pack(value: OrthographicFrustum, array: number[], startingIndex: number): number[]; + unpack(array: number[], startingIndex: number, result: OrthographicFrustum): OrthographicFrustum; + clone(result?: OrthographicFrustum): OrthographicFrustum; + equals(other?: OrthographicFrustum): boolean; + } + + class PerspectiveFrustum extends Frustum { + fov: number; + aspectRatio: number; + xOffset: number; + yOffset: number; + readonly infiniteProjectionMatrix: Matrix4; + readonly fovy: number; + static packedLength: number; + constructor(options?: {fov: number; aspectRatio: number; near: number; far: number; xOffset: number; yOffset: number}); + pack(value: PerspectiveFrustum, array: number[], startingIndex: number): number[]; + unpack(array: number[], startingIndex: number, result: PerspectiveFrustum): PerspectiveFrustum; + clone(result?: PerspectiveFrustum): PerspectiveFrustum; + equals(other?: PerspectiveFrustum): boolean; + } + + class PerspectiveOffCenterFrustum extends Frustum { + left: number; + right: number; + top: number; + bottom: number; + readonly infiniteProjectionMatrix: Matrix4; + constructor(options?: {left: number; right: number; top: number; bottom: number; near: number; far: number}); + clone(result?: PerspectiveOffCenterFrustum): PerspectiveOffCenterFrustum; + equals(other?: PerspectiveOffCenterFrustum): boolean; + } + + class PointPrimitive { + color: Color; + disableDepthTestDistance: number; + distanceDisplayCondition: DistanceDisplayCondition; + id: any; + outlineColor: Color; + outlineWidth: number; + pixelSize: number; + position: Cartesian3; + scaleByDistance: NearFarScalar; + show: boolean; + translucencyByDistance: NearFarScalar; + computeScreenSpacePosition(scene: Scene, result?: Cartesian2): Cartesian2; + equals(other: PointPrimitive): boolean; + } + + class PointPrimitiveCollection { + blendOption: BlendOption; + debugShowBoundingVolume: boolean; + length: number; + modelMatrix: Matrix4; + constructor(options?: { modelMatrix?: Matrix4; debugShowBoundingVolume?: boolean, blendOption?: BlendOption }); + add(pointPrimitive?: any): PointPrimitive; + contains(pointPrimitive?: PointPrimitive): boolean; + destroy(): void; + get(index: number): PointPrimitive; + isDestroyed(): boolean; + remove(pointPrimitive: PointPrimitive): boolean; + removeAll(): void; + } + + class Polyline { + show: boolean; + positions: Cartesian3[]; + material: Material; + width: number; + loop: boolean; + id: any; + constructor(options?: { show?: boolean; width?: number; loop?: boolean; material?: Material; positions?: Cartesian3[]; id?: any }); + } + + class PolylineCollection { + modelMatrix: Matrix4; + debugShowBoundingVolume: boolean; + length: number; + constructor(options?: { modelMatrix?: Matrix4; debugShowBoundingVolume?: boolean }); + add(polyline?: any): Polyline; + remove(polyline: Polyline): boolean; + removeAll(): void; + contains(polyline: Polyline): boolean; + get(index: number): Polyline; + isDestroyed(): boolean; + destroy(): void; + } + + class PolylineColorAppearance extends Appearance { + readonly vertexFormat: VertexFormat; + static VERTEX_FORMAT: VertexFormat; + constructor(options?: { translucent?: boolean; vertexShaderSource?: string; fragmentShaderSource?: string; renderState?: RenderState }); + } + + class PolylineMaterialAppearance extends Appearance { + readonly vertexFormat: VertexFormat; + static VERTEX_FORMAT: VertexFormat; + constructor(options?: { translucent?: boolean; material?: Material; vertexShaderSource?: string; fragmentShaderSource?: string; renderState?: RenderState }); + } + + class Primitive { + readonly allowPicking: boolean; + appearance: Appearance; + readonly asynchronous: boolean; + readonly compressVertices: boolean; + cull: boolean; + debugShowBoundingVolume: boolean; + depthFailAppearance: Appearance; + readonly geometryInstances: GeometryInstance[] | GeometryInstance; + readonly interleave: boolean; + modelMatrix: Matrix4; + readonly ready: boolean; + readonly readyPromise: Promise; + readonly releaseGeometryInstances: boolean; + shadows: ShadowMode; + show: boolean; + readonly vertexCacheOptimize: boolean; + constructor(options?: { + geometryInstances?: any[] | GeometryInstance; + appearance?: Appearance; + show?: boolean; + modelMatrix?: Matrix4; + vertexCacheOptimize?: boolean; + interleave?: boolean; + compressVertices?: boolean; + releaseGeometryInstances?: boolean; + allowPicking?: boolean; + cull?: boolean; + asynchronous?: boolean; + debugShowBoundingVolume?: boolean; + shadows: ShadowMode + }); + destroy(): void; + getGeometryInstanceAttributes(id: any): any; + isDestroyed(): boolean; + update(): void; + } + + class PrimitiveCollection { + show: boolean; + destroyPrimitives: boolean; + readonly length: number; + constructor(options?: { show?: boolean; destroyPrimitives?: boolean }); + add(primitive: any): any; + remove(primitive?: any): boolean; + removeAll(): void; + contains(primitive?: any): boolean; + raise(primitive?: any): void; + raiseToTop(primitive?: any): void; + lower(primitive?: any): void; + lowerToBottom(primitive?: any): void; + get(index: number): any; + isDestroyed(): boolean; + destroy(): void; + } + + class RectanglePrimitive { + ellipsoid: Ellipsoid; + rectangle: Rectangle; + granularity: number; + height: number; + rotation: number; + textureRotationAngle: number; + show: boolean; + material: Material; + id: any; + asynchronous: boolean; + debugShowBoundingVolume: boolean; + constructor(options?: { + ellipsoid?: Ellipsoid; + rectangle?: Rectangle; + granularity?: number; + height?: number; + rotation?: number; + textureRotationAngle?: number; + show?: boolean; + material?: Material; + id?: any; + asynchronous?: boolean; + debugShowBoundingVolume?: boolean + }); + update(): void; + isDestroyed(): boolean; + destroy(): void; + } + + class Scene { + backgroundColor: Color; + readonly camera: Camera; + readonly canvas: Element; + completeMorphOnUserInput: boolean; + debugCommandFilter: (command: any) => boolean; + readonly debugFrustumStatistics: any; + debugShowCommands: boolean; + debugShowDepthFrustum: number; + debugShowFramesPerSecond: boolean; + debugShowFrustumPlanes: boolean; + debugShowFrustums: boolean; + readonly drawingBufferHeight: number; + readonly drawingBufferWidth: number; + eyeSeparation: number; + farToNearRatio: number; + focalLength: number; + fog: Fog; + fxaa: boolean; + globe: Globe; + readonly groundPrimitives: PrimitiveCollection; + readonly id: string; + readonly imageryLayers: ImageryLayerCollection; + imagerySplitPosition: number; + invertClassification: boolean; + invertClassificationColor: Color; + readonly lastRenderTime: JulianDate; + logarithmicDepthFarToNearRatio: number; + mapMode2D: boolean; + readonly mapProjection: MapProjection; + readonly maximumAliasedLineWidth: number; + readonly maximumCubeMapSize: number; + maximumRenderTimeChange: number; + minimumDisableDepthTestDistance: number; + mode: SceneMode; + moon: Moon; + morphComplete: Event; + morphStart: Event; + morphTime: number; + nearToFarDistance2D: number; + readonly orderIndependentTranslucency: boolean; + readonly pickPositionSupported: boolean; + pickTranslucentDepth: boolean; + readonly postRender: Event; + readonly preRender: Event; + readonly preUpdate: Event; + readonly primitives: PrimitiveCollection; + readonly renderError: Event; + requestRenderMode: boolean; + rethrowRenderErrors: boolean; + readonly scene3DOnly: boolean; + readonly screenSpaceCameraController: ScreenSpaceCameraController; + shadowMap: ShadowMap; + skyAtmosphere: SkyAtmosphere; + skyBox: SkyBox; + sun: Sun; + sunBloom: boolean; + terrainExaggeration: number; + terrainProvider: TerrainProvider; + readonly terrainProviderChanged: Event; + useDepthPicking: boolean; + useWebVR: boolean; + constructor(options?: { + canvas: HTMLCanvasElement; + contextOptions?: any; + creditContainer?: Element; + creditViewport?: Element; + mapProjection?: MapProjection; + orderIndependentTranslucency?: boolean; + scene3DOnly?: boolean; + terrainExaggeration?: number; + shadows?: boolean; + mapMode2D?: MapMode2D; + requestRenderMode?: boolean; + maximumRenderTimeChange?: number + }); + cartesianToCanvasCoordinates(position: Cartesian3, result?: Cartesian2): Cartesian2; + completeMorph(): void; + destroy(): void; + drillPick(windowPosition: Cartesian2, limit?: number): any[]; + getCompressedTextureFormatSupported(format: string): boolean; + isDestroyed(): boolean; + morphTo2D(duration?: number): void; + morphTo3D(duration?: number): void; + morphToColumbusView(duration?: number): void; + pick(windowPosition: Cartesian2, width?: number, height?: number): any; + pickPosition(windowPosition: Cartesian2, result?: Cartesian3): Cartesian3; + requestRender(): void; + } + + class ScreenSpaceCameraController { + enableInputs: boolean; + enableTranslate: boolean; + enableZoom: boolean; + enableRotate: boolean; + enableTilt: boolean; + enableLook: boolean; + inertiaSpin: number; + inertiaTranslate: number; + inertiaZoom: number; + maximumMovementRatio: number; + bounceAnimationTime: number; + minimumZoomDistance: number; + maximumZoomDistance: number; + translateEventTypes: CameraEventType | any[]; + zoomEventTypes: CameraEventType | any[]; + rotateEventTypes: CameraEventType | any[]; + tiltEventTypes: CameraEventType | any[]; + lookEventTypes: CameraEventType | any[]; + minimumPickingTerrainHeight: number; + minimumCollisionTerrainHeight: number; + minimumTrackBallHeight: number; + enableCollisionDetection: boolean; + constructor(scene: Scene); + isDestroyed(): boolean; + destroy(): void; + } + + class SingleTileImageryProvider extends ImageryProvider { + url: string; + constructor(options: { url: string; rectangle?: Rectangle; credit?: Credit | string; ellipsoid?: Ellipsoid; proxy?: any }); + } + + class SkyAtmosphere { + show: boolean; + ellipsoid: Ellipsoid; + constructor(ellipsoid?: Ellipsoid); + isDestroyed(): boolean; + destroy(): void; + } + + class SkyBox { + sources: any; + show: boolean; + constructor(options: { sources?: any; show?: boolean }); + update(): void; + isDestroyed(): boolean; + destroy(): void; + } + + class Sun { + show: boolean; + glowFactor: number; + isDestroyed(): boolean; + destroy(): void; + } + + class Fog { + density: number; + enabled: boolean; + minimumBrightness: number; + screenSpaceErrorFactor: number; + } + + class TileCoordinatesImageryProvider extends ImageryProvider { + constructor(options?: { tilingScheme?: TilingScheme; ellipsoid?: Ellipsoid; color?: Color; tileWidth?: number; tileHeight?: number }); + } + + class TileDiscardPolicy { + isReady(): boolean; + shouldDiscardImage(image: HTMLImageElement | Promise): Promise; + } + + class TileMapServiceImageryProvider extends ImageryProvider { + url: string; + constructor(options?: { + url?: string; + fileExtension?: string; + proxy?: any; + credit?: Credit | string; + minimumLevel?: number; + maximumLevel?: number; + rectangle?: Rectangle; + tilingScheme?: TilingScheme; + ellipsoid?: Ellipsoid; + tileWidth?: number; + tileHeight?: number + }); + } + + class ViewportQuad { + show: boolean; + rectangle: BoundingRectangle; + material: Material; + constructor(rectangle?: BoundingRectangle, material?: Material); + update(): void; + isDestroyed(): boolean; + destroy(): void; + } + + class WebMapServiceImageryProvider extends ImageryProvider { + readonly url: string; + static DefaultParameters: {service: string, version: string, request: string, styles: string, format: string}; + static GetFeatureInfoDefaultParameters: {service: string, version: string, request: string}; + constructor(options: { + url: string; + layers: string; + parameters?: any; + getFeatureInfoParameters?: any; + enablePickFeatures?: boolean; + getFeatureInfoFormats?: GetFeatureInfoFormat[]; + rectangle?: Rectangle; + tilingScheme?: TilingScheme; + ellipsoid?: Ellipsoid; + tileWidth?: number; + tileHeight?: number; + minimumLevel?: number; + maximumLevel?: number; + crs?: string; + srs?: string; + credit?: Credit | string; + subdomains?: string | string[] + }); + } + + class WebMapTileServiceImageryProvider extends ImageryProvider { + clock: Clock; + dimensions: any; + readonly format: string; + times: TimeIntervalCollection; + readonly url: string; + constructor(options: { + url: string; + format?: string; + layer: string; + style: string; + tileMatrixSetID: string; + tileMatrixLabels?: any[]; + clock?: Clock; + times?: TimeIntervalCollection; + dimensions?: any; + tileWidth?: number; + tileHeight?: number; + tilingScheme?: TilingScheme; + rectangle?: Rectangle; + minimumLevel?: number; + maximumLevel?: number; + ellipsoid?: Ellipsoid; + credit?: Credit | string; + subdomains?: string | string[] + }); + } + + class Animation { + readonly container: Element; + readonly viewModel: AnimationViewModel; + constructor(container: Element | string, viewModel: AnimationViewModel); + isDestroyed(): boolean; + destroy(): void; + resize(): void; + applyThemeChanges(): void; + } + + class AnimationViewModel { + shuttleRingDragging: boolean; + snapToTicks: boolean; + timeLabel: string; + dateLabel: string; + multiplierLabel: string; + shuttleRingAngle: number; + slower: Command; + faster: Command; + clockViewModel: ClockViewModel; + pauseViewModel: ToggleButtonViewModel; + playReverseViewModel: ToggleButtonViewModel; + playForwardViewModel: ToggleButtonViewModel; + playRealtimeViewModel: ToggleButtonViewModel; + dateFormatter: AnimationViewModel.DateFormatter; + timeFormatter: AnimationViewModel.TimeFormatter; + static defaultDateFormatter: AnimationViewModel.DateFormatter; + static defaultTicks: number[]; + static defaultTimeFormatter: AnimationViewModel.TimeFormatter; + constructor(clockViewModel: ClockViewModel); + getShuttleRingTicks(): number[]; + setShuttleRingTicks(positiveTicks: number[]): void; + } + + namespace AnimationViewModel { + type DateFormatter = (date: JulianDate, viewModel: AnimationViewModel) => string; + type TimeFormatter = (date: JulianDate, viewModel: AnimationViewModel) => string; + } + + class BaseLayerPicker { + container: Element; + viewModel: BaseLayerPickerViewModel; + constructor(container: Element, options: { + globe: Globe; + imageryProviderViewModels?: ProviderViewModel[]; + selectedImageryProviderViewModel?: ProviderViewModel; + terrainProviderViewModels?: ProviderViewModel[]; + selectedTerrainProviderViewModel?: ProviderViewModel + }); + isDestroyed(): boolean; + destroy(): void; + } + + class BaseLayerPickerViewModel { + imageryProviderViewModels: ProviderViewModel[]; + terrainProviderViewModels: ProviderViewModel[]; + dropDownVisible: boolean; + buttonTooltip: string; + buttonImageUrl: string; + selectedImagery: ProviderViewModel; + selectedTerrain: ProviderViewModel; + toggleDropDown: Command; + globe: Globe; + constructor(options: { + globe: Globe; + imageryProviderViewModels?: ProviderViewModel[]; + selectedImageryProviderViewModel?: ProviderViewModel; + terrainProviderViewModels?: ProviderViewModel[]; + selectedTerrainProviderViewModel?: ProviderViewModel + }); + } + + class ProviderViewModel { + name: string; + tooltip: string; + iconUrl: string; + creationCommand: Command; + constructor(options: { name: string; tooltip: string; iconUrl: string; creationFunction: ProviderViewModel.CreationFunction | Command }); + } + + namespace ProviderViewModel { + type CreationFunction = () => ImageryProvider | TerrainProvider | ImageryProvider[] | TerrainProvider[]; + } + + class CesiumInspector { + container: Element; + viewModel: CesiumInspectorViewModel; + constructor(container: Element | string, scene: Scene); + isDestroyed(): boolean; + destroy(): void; + } + + class CesiumInspectorViewModel { + frustums: boolean; + performance: boolean; + shaderCacheText: string; + primitiveBoundingSphere: boolean; + primitiveReferenceFrame: boolean; + filterPrimitive: boolean; + tileBoundingSphere: boolean; + filterTile: boolean; + wireframe: boolean; + suspendUpdates: boolean; + tileCoordinates: boolean; + frustumStatisticText: string; + tileText: string; + hasPickedPrimitive: boolean; + hasPickedTile: boolean; + pickPimitiveActive: boolean; + pickTileActive: boolean; + dropDownVisible: boolean; + generalVisible: boolean; + primitivesVisible: boolean; + terrainVisible: boolean; + generalSwitchText: string; + primitivesSwitchText: string; + terrainSwitchText: string; + scene: Scene; + performanceContainer: Element; + toggleDropDown: Command; + showFrustums: Command; + showPerformance: Command; + showPrimitiveBoundingSphere: Command; + showPrimitiveReferenceFrame: Command; + doFilterPrimitive: Command; + showWireframe: Command; + doSuspendUpdates: Command; + showTileCoordinates: Command; + showTileBoundingSphere: Command; + doFilterTile: Command; + toggleGeneral: Command; + togglePrimitives: Command; + toggleTerrain: Command; + pickPrimitive: Command; + pickTile: Command; + selectParent: Command; + selectNW: Command; + selectNE: Command; + selectSW: Command; + selectSE: Command; + primitive: Command; + tile: Command; + constructor(scene: Scene); + isDestroyed(): boolean; + destroy(): void; + } + + class CesiumWidget { + container: Element; + canvas: HTMLCanvasElement; + creditContainer: Element; + creditViewport: Element; + scene: Scene; + readonly imageryLayers: ImageryLayerCollection; + terrainProvider: TerrainProvider; + readonly camera: Camera; + clock: Clock; + screenSpaceEventHandler: ScreenSpaceEventHandler; + targetFrameRate: number; + useDefaultRenderLoop: boolean; + resolutionScale: number; + constructor(container: Element | string, options?: { + clock?: Clock; + imageryProvider?: ImageryProvider; + terrainProvider?: TerrainProvider; + skyBox?: SkyBox; + skyAtmosphere?: SkyAtmosphere; + sceneMode?: SceneMode; + scene3DOnly?: boolean; + orderIndependentTranslucency?: boolean; + mapProjection?: MapProjection; + globe?: Globe; + useDefaultRenderLoop?: boolean; + targetFrameRate?: number; + showRenderLoopErrors?: boolean; + contextOptions?: any; + creditContainer?: Element | string; + creditViewport?: Element | string; + terrainExaggeration?: number; + shadows?: boolean; + terrainShadows?: ShadowMode; + mapMode2D?: MapMode2D; + requestRenderMode?: boolean; + maximumRenderTimeChange?: number + }); + showErrorPanel(title: string, message: string, error?: string): void; + isDestroyed(): boolean; + destroy(): void; + resize(): void; + render(): void; + } + + class ClockViewModel { + systemTime: JulianDate; + startTime: JulianDate; + stopTime: JulianDate; + currentTime: JulianDate; + multiplier: number; + clockStep: ClockStep; + clockRange: ClockRange; + canAnimate: boolean; + shouldAnimate: boolean; + clock: Clock; + constructor(clock?: Clock); + synchronize(): void; + isDestroyed(): boolean; + destroy(): void; + } + + class Command { + canExecute: boolean; + beforeExecute: Event; + afterExecute: Event; + } + + class FullscreenButton { + container: Element; + viewModel: FullscreenButtonViewModel; + constructor(container: Element | string, fullscreenElement?: Element | string); + isDestroyed(): boolean; + destroy(): void; + } + + class FullscreenButtonViewModel { + isFullscreen: boolean; + isFullscreenEnabled: boolean; + tooltip: string; + fullscreenElement: Element; + command: Command; + constructor(fullscreenElement?: Element | string); + isDestroyed(): boolean; + destroy(): void; + } + + class Geocoder { + container: Element; + viewModel: GeocoderViewModel; + constructor(options: { container: Element | string; scene: Scene; url?: string; key?: string; flightDuration?: number }); + isDestroyed(): boolean; + destroy(): void; + } + + class GeocoderViewModel { + isSearchInProgress: boolean; + searchText: string; + flightDuration: number; + url: string; + key: string; + complete: Event; + scene: Scene; + search: Command; + constructor(options: { scene: Scene; url?: string; key?: string; flightDuration?: number }); + } + + class HomeButton { + container: Element; + viewModel: HomeButtonViewModel; + constructor(container: Element | string, scene: Scene, duration?: number); + isDestroyed(): boolean; + destroy(): void; + } + + class HomeButtonViewModel { + tooltip: string; + scene: Scene; + command: Command; + duration: number; + constructor(scene: Scene, duration?: number); + } + + class VRButton { + container: Element; + viewModel: VRButtonViewModel; + constructor(container: Element | string, scene: Scene, vrElement: Element | string); + destroy(): void; + isDestroyed(): boolean; + } + + class VRButtonViewModel { + command: Command; + isVREnabled: boolean; + isVRMode: boolean; + tooltip: string; + vrElement: Element; + constructor(scene: Scene, vrElement: Element | string); + destroy(): void; + isDestroyed(): boolean; + } + + class InfoBox { + container: Element; + viewModel: InfoBoxViewModel; + frame: HTMLIFrameElement; + constructor(container: Element | string); + isDestroyed(): boolean; + destroy(): void; + } + + class InfoBoxViewModel { + maxHeight: number; + enableCamera: boolean; + isCameraTracking: boolean; + showInfo: boolean; + titleText: string; + description: string; + cameraIconPath: string; + cameraClicked: Event; + closeClicked: Event; + maxHeightOffset(offset: number): string; + } + + class NavigationHelpButton { + container: Element; + viewModel: NavigationHelpButtonViewModel; + constructor(options: { container: Element | string; instructionsInitiallyVisible?: boolean }); + isDestroyed(): boolean; + destroy(): void; + } + + class NavigationHelpButtonViewModel { + showInstructions: boolean; + tooltip: string; + command: Command; + showClick: Command; + showTouch: Command; + } + + class PerformanceWatchdog { + container: Element; + viewModel: PerformanceWatchdogViewModel; + constructor(options?: { container: Element | string; scene: Scene; lowFrameRateMessage?: string }); + isDestroyed(): boolean; + destroy(): void; + } + + class PerformanceWatchdogViewModel { + lowFrameRateMessage: string; + lowFrameRateMessageDismissed: boolean; + showingLowFrameRateMessage: boolean; + scene: Scene; + dismissMessage: Command; + constructor(options?: { scene: Scene; lowFrameRateMessage?: string }); + } + + class ProjectionPicker { + container: Element; + viewModel: ProjectionPickerViewModel; + constructor(container: Element | string, scene: Scene); + destroy(): void; + isDestroyed(): boolean; + } + + class ProjectionPickerViewModel { + dropDownVisible: boolean; + isOrthographicProjection: Command; + scene: Scene; + sceneMode: SceneMode; + selectedTooltip: string; + switchToOrthographic: Command; + switchToPerspective: Command; + toggleDropdown: Command; + tooltipOrthographic: string; + tooltipPerspective: string; + constructor(scene: Scene); + destroy(): void; + isDestroyed(): boolean; + } + + class SceneModePicker { + container: Element; + viewModel: SceneModePickerViewModel; + constructor(container: Element | string, scene: Scene, duration?: number); + isDestroyed(): boolean; + destroy(): void; + } + + class SceneModePickerViewModel { + sceneMode: SceneMode; + dropDownVisible: boolean; + tooltip2D: string; + tooltip3D: string; + tooltipColumbusView: string; + selectedTooltip: string; + scene: Scene; + duration: number; + toggleDropDown: Command; + morphTo2D: Command; + morphTo3D: Command; + morphToColumbusView: Command; + constructor(scene: Scene, duration?: number); + isDestroyed(): boolean; + destroy(): void; + } + + class SelectionIndicator { + container: Element; + viewModel: SelectionIndicatorViewModel; + constructor(container: Element | string, scene: Scene); + isDestroyed(): boolean; + destroy(): void; + } + + class SelectionIndicatorViewModel { + position: Cartesian3; + showSelection: boolean; + isVisible: boolean; + computeScreenSpacePosition: SelectionIndicatorViewModel.ComputeScreenSpacePosition; + container: Element; + selectionIndicatorElement: Element; + scene: Scene; + constructor(scene: Scene, selectionIndicatorElement: Element, container: Element); + update(): void; + animateAppear(): void; + animateDepart(): void; + } + + namespace SelectionIndicatorViewModel { + type ComputeScreenSpacePosition = (position: Cartesian3, result: Cartesian2) => Cartesian2; + } + + class Timeline { + container: Element; + constructor(container: Element, clock: Clock); + isDestroyed(): boolean; + destroy(): void; + zoomTo(startTime: JulianDate, stopTime: JulianDate): void; + resize(): void; + } + + class ToggleButtonViewModel { + toggled: boolean; + tooltip: string; + command: Command; + constructor(command: Command, options?: { toggled?: boolean; tooltip?: string }); + } + + class Viewer { + readonly container: Element; + readonly bottomContainer: Element; + readonly cesiumWidget: CesiumWidget; + readonly selectionIndicator: SelectionIndicator; + readonly infoBox: InfoBox; + readonly geocoder: Geocoder; + readonly homeButton: HomeButton; + readonly sceneModePicker: SceneModePicker; + readonly projectionPicker: ProjectionPicker; + readonly navigationHelpButton: NavigationHelpButton; + readonly baseLayerPicker: BaseLayerPicker; + readonly animation: Animation; + readonly timeline: Timeline; + readonly fullscreenButton: FullscreenButton; + readonly dataSourceDisplay: DataSourceDisplay; + readonly entities: EntityCollection; + readonly dataSources: DataSourceCollection; + readonly canvas: HTMLCanvasElement; + readonly scene: Scene; + readonly imageryLayers: ImageryLayerCollection; + terrainProvider: TerrainProvider; + terrainShadows: ShadowMode; + readonly camera: Camera; + clockTrackedDataSource: DataSource; + readonly clockViewModel: ClockViewModel; + readonly clock: Clock; + readonly screenSpaceEventHandler: ScreenSpaceEventHandler; + targetFrameRate: number; + useDefaultRenderLoop: boolean; + resolutionScale: number; + allowDataSourcesToSuspendAnimation: boolean; + trackedEntity: Entity; + selectedEntity: Entity; + readonly trackedEntityChanged: Event; + readonly selectedEntityChanged: Event; + readonly shadowMap: ShadowMap; + readonly vrButton: VRButton; + shadows: boolean; + constructor(container: Element | string, options?: { + animation?: boolean; + baseLayerPicker?: boolean; + fullscreenButton?: boolean; + vrButton?: boolean; + geocoder?: boolean; + homeButton?: boolean; + infoBox?: boolean; + sceneModePicker?: boolean; + selectionIndicator?: boolean; + timeline?: boolean; + navigationHelpButton?: boolean; + navigationInstructionsInitiallyVisible?: boolean; + scene3DOnly?: boolean; + shouldAnimate?: boolean; + clockViewModel?: ClockViewModel; + selectedImageryProviderViewModel?: ProviderViewModel; + imageryProviderViewModels?: ProviderViewModel[]; + selectedTerrainProviderViewModel?: ProviderViewModel; + terrainProviderViewModels?: ProviderViewModel[]; + imageryProvider?: ImageryProvider; + terrainProvider?: TerrainProvider; + skyBox?: SkyBox; + skyAtmosphere?: SkyAtmosphere; + fullscreenElement?: Element | string; + useDefaultRenderLoop?: boolean; + targetFrameRate?: number; + showRenderLoopErrors?: boolean; + automaticallyTrackDataSourceClocks?: boolean; + contextOptions?: any; + sceneMode?: SceneMode; + mapProjection?: MapProjection; + globe?: Globe; + orderIndependentTranslucency?: boolean; + creditContainer?: Element | string; + creditViewport?: Element | string; + dataSources?: DataSourceCollection; + terrainExaggeration?: number; + shadows?: boolean; + terrainShadows?: ShadowMode; + mapMode2D?: MapMode2D; + projectionPicker?: boolean; + requestRenderMode?: boolean; + maximumRenderTimeChange?: number + }); + extend(mixin: Viewer.ViewerMixin, options: any): void; + resize(): void; + forceResize(): void; + render(): void; + isDestroyed(): boolean; + destroy(): void; + zoomTo(target: Entity | Entity[] | EntityCollection | DataSource | Promise, offset?: HeadingPitchRange): Promise; + flyTo(target: Entity | Entity[] | EntityCollection | DataSource | Promise, + options?: { duration?: number; maximumHeight?: number; offset?: HeadingPitchRange }): Promise; + } + + namespace Viewer { + type ViewerMixin = (viewer: Viewer, options: any) => void; + } + + function barycentricCoordinates(point: Cartesian2 | Cartesian3, p0: Cartesian2 | Cartesian3, p1: Cartesian2 | Cartesian3, p2: Cartesian2 | Cartesian3, result?: Cartesian3): Cartesian3; + + function binarySearch(array: any[], itemToFind: any, comparator: binarySearch.Comparator): number; + + namespace binarySearch { + type Comparator = (a: any, b: any) => number; + } + + function cancelAnimationFrame(requestID: number): undefined; + + function clone(object: any, deep?: boolean): any; + + function combine(object1?: any, object2?: any, deep?: boolean): any; + + function destroyObject(object: any, message?: string): undefined; + + function formatError(object: any): string; + + function getFilenameFromUri(uri: string): string; + + function getImagePixels(image: HTMLImageElement): number[]; + + function isArray(value: any): boolean; + + function isLeapYear(year: number): boolean; + + function jsonp(url: string, options?: { parameters?: any; callbackParameterName?: string; proxy?: any }): Promise; + + function loadArrayBuffer(url: string | Promise, headers?: any): Promise; + + function loadBlob(url: string | Promise, headers?: any): Promise; + + function loadImage(url: string | Promise, allowCrossOrigin?: boolean): Promise; + + function loadImageViaBlob(url: string | Promise): Promise; + + function loadJson(url: string | Promise, headers?: any): Promise; + + function loadText(url: string | Promise, headers?: any): Promise; + + function loadWithXhr(options: { url: string | Promise; responseType?: string; method?: string; data?: string; headers?: any; overrideMimeType?: string }): Promise; + + function loadXML(url: string | Promise, headers?: any): Promise; + + function mergeSort(array: any[], comparator: mergeSort.Comparator, userDefinedObject?: any): undefined; + + namespace mergeSort { + type Comparator = (a: any, b: any, userDefinedObject?: any) => number; + } + + function objectToQuery(obj: any): string; + + function pointInsideTriangle(point: Cartesian2 | Cartesian3, p0: Cartesian2 | Cartesian3, p1: Cartesian2 | Cartesian3, p2: Cartesian2 | Cartesian3): boolean; + + function queryToObject(queryString: string): any; + + function requestAnimationFrame(callback: requestAnimationFrame.Callback): number; + + namespace requestAnimationFrame { + type Callback = (timestamp: number) => void; + } + + function sampleTerrain(terrainProvider: TerrainProvider, level: number, positions: Cartographic[]): Promise; + + function subdivideArray(array: any[], numberOfArrays: number): undefined; + + function throttleRequestByServer(url: string, requestFunction: throttleRequestByServer.RequestFunction): Promise; + + namespace throttleRequestByServer { + type RequestFunction = (url: string) => Promise; + } + + function createTangentSpaceDebugPrimitive(options: { geometry: Geometry; length?: number; modelMatrix?: Matrix4 }): Primitive; + + function viewerCesiumInspectorMixin(viewer: Viewer): undefined; + + function viewerDragDropMixin(viewer: Viewer, options?: { dropTarget?: Element | string; clearOnDrop?: boolean; flyToOnDrop?: boolean; clampToGround?: boolean; proxy?: DefaultProxy }): undefined; + + function viewerPerformanceWatchdogMixin(viewer: Viewer): undefined; + + function createCommand(func: () => any, canExecute?: boolean): Command; + + function createTaskProcessorWorker(workerFunction: createTaskProcessorWorker.WorkerFunction): createTaskProcessorWorker.TaskProcessorWorkerFunction; + + namespace createTaskProcessorWorker { + type WorkerFunction = (parameters: any, transferableObjects: any[]) => any; + type TaskProcessorWorkerFunction = (event: any) => void; + } + + enum ClockRange { + UNBOUNDED, + CLAMPED, + LOOP_STOP, + } + + enum ClockStep { + TICK_DEPENDENT, + SYSTEM_CLOCK_MULTIPLIER, + SYSTEM_CLOCK, + } + + enum ComponentDatatype { + BYTE, + UNSIGNED_BYTE, + SHORT, + UNSIGNED_SHORT, + FLOAT, + DOUBLE, + } + + namespace ComponentDatatype { + function getSizeInBytes(componentDatatype: ComponentDatatype): number; + function fromTypedArray(array: Int8Array | Uint8Array | Int16Array | Uint16Array | Float32Array | Float64Array): ComponentDatatype; + function validate(componentDatatype: ComponentDatatype): boolean; + function createTypedArray(componentDatatype: ComponentDatatype, valuesOrLength: number | any[]): Int8Array | Uint8Array | Int16Array | Uint16Array | Float32Array | Float64Array; + function createArrayBufferView(componentDatatype: ComponentDatatype, buffer: ArrayBuffer, byteOffset?: number, length?: number): + Int8Array | Uint8Array | Int16Array | Uint16Array | Float32Array | Float64Array; + } + + enum CornerType { + ROUNDED, + MITERED, + BEVELED, + } + + namespace CubicRealPolynomial { + function computeDiscriminant(a: number, b: number, c: number, d: number): number; + function computeRealRoots(a: number, b: number, c: number, d: number): number[]; + } + + enum ExtrapolationType { + NONE, + HOLD, + EXTRAPOLATE, + } + + namespace FeatureDetection { + function supportsFullscreen(): boolean; + function supportsTypedArrays(): boolean; + function supportsWebAssembly(): boolean; + function supportsWebWorkers(): boolean; + } + + enum Fullscreen { + element, + changeEventName, + errorEventName, + enabled, + fullscreen, + } + + namespace Fullscreen { + function supportsFullscreen(): boolean; + function requestFullscreen(element: any): undefined; + function exitFullscreen(): undefined; + } + + namespace GeometryPipeline { + function toWireframe(geometry: Geometry): Geometry; + function createLineSegmentsForVectors(geometry: Geometry, attributeName?: string, length?: number): Geometry; + function createAttributeLocations(geometry: Geometry): any; + function reorderForPreVertexCache(geometry: Geometry): Geometry; + function reorderForPostVertexCache(geometry: Geometry, cacheCapacity?: number): Geometry; + function fitToUnsignedShortIndices(geometry: Geometry): Geometry[]; + function projectTo2D(geometry: Geometry, attributeName: string, attributeName3D: string, attributeName2D: string, projection?: any): Geometry; + function encodeAttribute(geometry: Geometry, attributeName: string, attributeHighName: string, attributeLowName: string): Geometry; + function transformToWorldCoordinates(instance: GeometryInstance): GeometryInstance; + function computeNormal(geometry: Geometry): Geometry; + function computeBinormalAndTangent(geometry: Geometry): Geometry; + function compressVertices(geometry: Geometry): Geometry; + } + + enum HeightmapTessellator { + DEFAULT_STRUCTURE, + } + + namespace HeightmapTessellator { + function computeVertices(options: { + vertices: any[] | Float32Array; + heightmap: Int8Array | Uint8Array | Int16Array | Uint16Array | Float32Array | Float64Array; + width: number; + height: number; + skirtHeight: number; + nativeRectangle: Rectangle; + rectangle?: Rectangle; + isGeographic?: boolean; + relativetoCenter?: Cartesian3; + ellipsoid?: Ellipsoid; + structure?: any; + structureheightScale?: number; + structureheightOffset?: number; + structureelementsPerHeight?: number; + structurestride?: number; + structureelementMultiplier?: number; + structureisBigEndian?: boolean + }): undefined; + } + + enum HeightReference { + CLAMP_TO_GROUND, + NONE, + RELATIVE_TO_GROUND + } + + class HermitePolynomialApproximation extends InterpolationAlgorithm { + static getRequiredDataPoints(degree: number, inputOrder?: number): number; + } + + enum IndexDatatype { + UNSIGNED_BYTE, + UNSIGNED_SHORT, + UNSIGNED_INT, + } + + namespace IndexDatatype { + function getSizeInBytes(indexDatatype: IndexDatatype): number; + function validate(indexDatatype: IndexDatatype): boolean; + function createTypedArray(numberOfVertices: number, indicesLengthOrArray: any): Uint16Array | Uint32Array; + function createTypedArrayFromArrayBuffer(numberOfVertices: number, sourceArray: ArrayBuffer, byteOffset: number, length: number): Uint16Array | Uint32Array; + } + + // tslint:disable-next-line no-unnecessary-class + class InterpolationAlgorithm { + static type: string; + static getRequiredDataPoints(degree: number): number; + static interpolateOrderZero(x: number, xTable: number[], yTable: number[], yStride: number, result?: number[]): number[]; + static interpolate(x: number, xTable: number[], yTable: number[], yStride: number, inputOrder: number, outputOrder: number, result?: number[]): number[]; + } + + enum Intersect { + OUTSIDE, + INTERSECTING, + INSIDE, + } + + namespace IntersectionTests { + function rayPlane(ray: Ray, plane: Plane, result?: Cartesian3): Cartesian3; + function rayTriangle(ray: Ray, p0: Cartesian3, p1: Cartesian3, p2: Cartesian3, cullBackFaces?: boolean, result?: Cartesian3): Cartesian3; + function lineSegmentTriangle(v0: Cartesian3, v1: Cartesian3, p0: Cartesian3, p1: Cartesian3, p2: Cartesian3, cullBackFaces?: boolean, result?: Cartesian3): Cartesian3; + function raySphere(ray: Ray, sphere: BoundingSphere, result?: any): any; + function lineSegmentSphere(p0: Cartesian3, p1: Cartesian3, sphere: BoundingSphere, result?: any): any; + function rayEllipsoid(ray: Ray, ellipsoid: Ellipsoid): any; + function grazingAltitudeLocation(ray: Ray, ellipsoid: Ellipsoid): Cartesian3; + function lineSegmentPlane(endPoint0: Cartesian3, endPoint1: Cartesian3, plane: Plane, result?: Cartesian3): Cartesian3; + function trianglePlaneIntersection(p0: Cartesian3, p1: Cartesian3, p2: Cartesian3, plane: Plane): any; + } + + namespace Intersections2D { + function clipTriangleAtAxisAlignedThreshold(threshold: number, keepAbove: boolean, u0: number, u1: number, u2: number, result?: number[]): number[]; + function computeBarycentricCoordinates(x: number, y: number, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, result?: Cartesian3): Cartesian3; + } + + enum Iso8601 { + MINIMUM_VALUE, + MAXIMUM_VALUE, + MAXIMUM_INTERVAL, + } + + enum KeyboardEventModifier { + SHIFT, + CTRL, + ALT, + } + + class LagrangePolynomialApproximation extends InterpolationAlgorithm {} + + class LinearApproximation extends InterpolationAlgorithm {} + + enum MapMode2D { + INFINITE_SCROLL, + ROTATE + } + + enum Math { + EPSILON1, + EPSILON2, + EPSILON3, + EPSILON4, + EPSILON5, + EPSILON6, + EPSILON7, + EPSILON8, + EPSILON9, + EPSILON10, + EPSILON11, + EPSILON12, + EPSILON13, + EPSILON14, + EPSILON15, + EPSILON16, + EPSILON17, + EPSILON18, + EPSILON19, + EPSILON20, + GRAVITATIONALPARAMETER, + SOLAR_RADIUS, + LUNAR_RADIUS, + SIXTY_FOUR_KILOBYTES, + PI, + ONE_OVER_PI, + PI_OVER_TWO, + PI_OVER_THREE, + PI_OVER_FOUR, + PI_OVER_SIX, + THREE_PI_OVER_TWO, + TWO_PI, + ONE_OVER_TWO_PI, + RADIANS_PER_DEGREE, + DEGREES_PER_RADIAN, + RADIANS_PER_ARCSECOND, + } + + namespace Math { + function sign(value: number): number; + function signNotZero(value: number): number; + function toSNorm(value: number): number; + function fromSNorm(value: number): number; + function sinh(value: number): number; + function cosh(value: number): number; + function lerp(p: number, q: number, time: number): number; + function toRadians(degrees: number): number; + function toDegrees(radians: number): number; + function convertLongitudeRange(angle: number): number; + function negativePiToPi(angle: number): number; + function zeroToTwoPi(angle: number): number; + function mod(m: number, n: number): number; + function equalsEpsilon(left: number, right: number, relativeEpsilon: number, absoluteEpsilon?: number): boolean; + function factorial(n: number): number; + function incrementWrap(n?: number, maximumValue?: number, minimumValue?: number): number; + function isPowerOfTwo(n: number): boolean; + function nextPowerOfTwo(n: number): number; + function clamp(value: number, min: number, max: number): number; + function setRandomNumberSeed(seed: number): undefined; + function nextRandomNumber(): number; + function acosClamped(value: number): number; + function asinClamped(value: number): number; + function chordLength(angle: number, radius: number): number; + } + + // tslint:disable-next-line no-unnecessary-class + abstract class Packable { + static packedLength: number; + static pack(value: any, array: number[], startingIndex?: number): number[]; + static unpack(array: number[], startingIndex?: number, result?: any): Packable; + } + + enum PackableForInterpolation { + packedInterpolationLength, + } + + namespace PackableForInterpolation { + function convertPackedArrayForInterpolation(packedArray: number[], startingIndex?: number, lastIndex?: number, result?: number[]): number[]; + function unpackInterpolationResult(array: number[], sourceArray: number[], startingIndex?: number, lastIndex?: number, result?: any): any; + } + + enum PixelFormat { + DEPTH_COMPONENT, + DEPTH_STENCIL, + ALPHA, + RGB, + RGBA, + LUMINANCE, + LUMINANCE_ALPHA, + } + + enum PrimitiveType { + POINTS, + LINES, + LINE_LOOP, + LINE_STRIP, + TRIANGLES, + TRIANGLE_STRIP, + TRIANGLE_FAN, + } + + namespace QuadraticRealPolynomial { + function computeDiscriminant(a: number, b: number, c: number): number; + function computeRealRoots(a: number, b: number, c: number): number[]; + } + + namespace QuarticRealPolynomial { + function computeDiscriminant(a: number, b: number, c: number, d: number, e: number): number; + function computeRealRoots(a: number, b: number, c: number, d: number, e: number): number[]; + } + + enum ReferenceFrame { + FIXED, + INERTIAL, + } + + enum ScreenSpaceEventType { + LEFT_DOWN, + LEFT_UP, + LEFT_CLICK, + LEFT_DOUBLE_CLICK, + RIGHT_DOWN, + RIGHT_UP, + RIGHT_CLICK, + RIGHT_DOUBLE_CLICK, + MIDDLE_DOWN, + MIDDLE_UP, + MIDDLE_CLICK, + MIDDLE_DOUBLE_CLICK, + MOUSE_MOVE, + WHEEL, + PINCH_START, + PINCH_END, + PINCH_MOVE, + } + + namespace Simon1994PlanetaryPositions { + function computeSunPositionInEarthInertialFrame(julianDate?: JulianDate, result?: Cartesian3): Cartesian3; + function computeMoonPositionInEarthInertialFrame(julianDate?: JulianDate, result?: Cartesian3): Cartesian3; + } + + class ShadowMap { + darkness: number; + enabled: boolean; + maximumDistance: number; + normalOffset: boolean; + size: number; + softShadows: boolean; + constructor(obtions: { + lightCamera: Camera; + enabled?: boolean; + isPointLight?: boolean; + pointLightRadius?: number; + cascadesEnabled?: boolean; + numberOfCascades?: number; + maximumDistance?: number; + size?: number; + softShadows?: boolean; + darkness?: number; + normalOffset?: boolean + }); + } + + enum ShadowMode { + CAST_ONLY, + DISABLED, + ENABLED, + RECEIVE_ONLY + } + + enum TimeStandard { + UTC, + TAI, + } + + namespace Transforms { + function eastNorthUpToFixedFrame(origin: Cartesian3, ellipsoid?: Ellipsoid, result?: Matrix4): Matrix4; + function northEastDownToFixedFrame(origin: Cartesian3, ellipsoid?: Ellipsoid, result?: Matrix4): Matrix4; + function northUpEastToFixedFrame(origin: Cartesian3, ellipsoid?: Ellipsoid, result?: Matrix4): Matrix4; + function headingPitchRollToFixedFrame(origin: Cartesian3, heading: number, pitch: number, roll: number, ellipsoid?: Ellipsoid, result?: Matrix4): Matrix4; + function headingPitchRollQuaternion(origin: Cartesian3, heading: number, pitch: number, roll: number, ellipsoid?: Ellipsoid, result?: Quaternion): Quaternion; + function computeTemeToPseudoFixedMatrix(date: JulianDate, result?: Matrix3): Matrix3; + function preloadIcrfFixed(timeInterval: TimeInterval): Promise; + function computeIcrfToFixedMatrix(date: JulianDate, result?: Matrix3): Matrix3; + function computeFixedToIcrfMatrix(date: JulianDate, result?: Matrix3): Matrix3; + function pointToWindowCoordinates(modelViewProjectionMatrix: Matrix4, viewportTransformation: Matrix4, point: Cartesian3, result?: Cartesian2): Cartesian2; + } + + namespace TridiagonalSystemSolver { + function solve(diagonal: number[], lower: number[], upper: number[], right: Cartesian3[]): Cartesian3[]; + } + + enum Visibility { + NONE, + PARTIAL, + FULL, + } + + enum WindingOrder { + CLOCKWISE, + COUNTER_CLOCKWISE, + } + + enum StripeOrientation { + HORIZONTAL, + VERTICAL, + } + + enum BingMapsStyle { + AERIAL, + AERIAL_WITH_LABELS, + ROAD, + ORDNANCE_SURVEY, + COLLINS_BART, + } + + enum BlendEquation { + ADD, + SUBTRACT, + REVERSE_SUBTRACT, + } + + enum BlendFunction { + ZERO, + ONE, + SOURCE_COLOR, + ONE_MINUS_SOURCE_COLOR, + DESTINATION_COLOR, + ONE_MINUS_DESTINATION_COLOR, + SOURCE_ALPHA, + ONE_MINUS_SOURCE_ALPHA, + DESTINATION_ALPHA, + ONE_MINUS_DESTINATION_ALPHA, + CONSTANT_COLOR, + ONE_MINUS_CONSTANT_COLOR, + CONSTANT_ALPHA, + ONE_MINUS_CONSTANT_ALPHA, + SOURCE_ALPHA_SATURATE, + } + + enum BlendingState { + DISABLED, + ALPHA_BLEND, + PRE_MULTIPLIED_ALPHA_BLEND, + ADDITIVE_BLEND, + } + + enum BlendOption { + OPAQUE, + OPAQUE_AND_TRANSLUCENT, + TRANSLUCENT + } + + enum CameraEventType { + LEFT_DRAG, + RIGHT_DRAG, + MIDDLE_DRAG, + WHEEL, + PINCH, + } + + enum CullFace { + FRONT, + BACK, + FRONT_AND_BACK, + } + + enum DepthFunction { + NEVER, + LESS, + EQUAL, + LESS_OR_EQUAL, + GREATER, + NOT_EQUAL, + GREATER_OR_EQUAL, + ALWAYS, + } + + enum HorizontalOrigin { + CENTER, + LEFT, + RIGHT, + } + + enum LabelStyle { + FILL, + OUTLINE, + FILL_AND_OUTLINE, + } + + enum ModelAnimationLoop { + NONE, + REPEAT, + MIRRORED_REPEAT, + } + + enum SceneMode { + MORPHING, + COLUMBUS_VIEW, + SCENE2D, + SCENE3D, + } + + namespace SceneMode { + function getMorphTime(value: SceneMode): number; + } + + namespace SceneTransforms { + function wgs84ToWindowCoordinates(scene: Scene, position: Cartesian3, result?: Cartesian2): Cartesian2; + function wgs84ToDrawingBufferCoordinates(scene: Scene, position: Cartesian3, result?: Cartesian2): Cartesian2; + } + + enum StencilFunction { + NEVER, + LESS, + EQUAL, + LESS_OR_EQUAL, + GREATER, + NOT_EQUAL, + GREATER_OR_EQUAL, + ALWAYS, + } + + enum StencilOperation { + ZERO, + KEEP, + REPLACE, + INCREMENT, + DECREMENT, + INVERT, + INCREMENT_WRAP, + DECREMENT_WRAP, + } + + enum VerticalOrigin { + CENTER, + BOTTOM, + TOP, + } + + function createOpenStreetMapImageryProvider(options: { + url?: string, + fileExtension?: string, + rectangle?: Rectangle, + minimumLevel?: number, + maximumLevel?: number, + ellipsoid?: Ellipsoid, + credit?: Credit | string + }): UrlTemplateImageryProvider; + + function createTileMapServiceImageryProvider(options: { + url?: string, + fileExtension?: string, + credit?: Credit | string, + minimumLevel?: number, + maximumLevel?: number, + rectangle?: Rectangle, + tilingScheme?: TilingScheme, + ellipsoid?: Ellipsoid, + tileWidth?: number, + tileHeight?: number, + flipXY?: boolean + }): UrlTemplateImageryProvider; + + function createWorldImagery(options: { + style?: any // IonWorldImageryStyle + }): IonImageryProvider; + + function createWorldTerrain(options: { + requestVertexNormals?: boolean, + requestWaterMask?: boolean + }): CesiumTerrainProvider; + + class UrlTemplateImageryProvider extends ImageryProvider { + url: string; + pickFeaturesUrl: string; + urlSchemeZeroPadding: {}; + subdomains: string | string[]; + ellipsoid: Ellipsoid; + getFeatureInfoFormats: GetFeatureInfoFormat[]; + enablePickFeatures: boolean; + + constructor(options: { + url: string, + pickFeaturesUrl?: string, + urlSchemeZeroPadding?: {}, + subdomains?: string | string[] + proxy?: {}, + credit?: Credit | string, + minimumLevel?: number, + maximumLevel?: number, + rectangle?: Rectangle, + tilingScheme?: TilingScheme, + ellipsoid?: Ellipsoid, + tileWidth?: number, + tileHeight?: number, + hasAlphaChannel?: boolean, + getFeatureInfoFormats?: GetFeatureInfoFormat[], + enablePickFeatures?: boolean + }); + reinitialize(options: Promise | object): void; + } + + class Resource { + static DEFAULT: Resource; + static readonly isBlobSupported: boolean; + readonly extension: string; + hasHeaders: boolean; + headers: any; + isBlobUri: boolean; + isCrossOriginUrl: boolean; + isDataUri: boolean; + proxy: DefaultProxy; + readonly queryParameters: any; + request: Request; + retryAttempts: number; + retryCallback: () => void; + readonly templateValues: any; + url: string; + static delete(options?: { url: string; data?: any; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; responseType?: string; overrideMimeType?: string }): Promise | undefined; + static fetch(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; responseType?: string; overrideMimeType?: string }): Promise | undefined; + static fetchArrayBuffer(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request }): Promise | undefined; + static fetchBlob(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request }): Promise | undefined; + static fetchImage(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; preferBlob?: boolean }): Promise | undefined; + static fetchJson(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request }): Promise | undefined; + static fetchJsonp(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; callbackParameterName?: string }): Promise | undefined; + static fetchText(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request }): Promise | undefined; + static fetchXml(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request }): Promise | undefined; + static head(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; responseType?: string; overrideMimeType?: string }): Promise | undefined; + static options(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; responseType?: string; overrideMimeType?: string }): Promise | undefined; + static patch(options?: { url: string; data?: any; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; responseType?: string; overrideMimeType?: string }): Promise | undefined; + static post(options?: { url: string; data?: any; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; responseType?: string; overrideMimeType?: string }): Promise | undefined; + static put(options?: { url: string; data?: any; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; responseType?: string; overrideMimeType?: string }): Promise | undefined; + constructor(options?: { url: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request }); + addQueryParameters(params: any, useAsDefault: boolean): void; + addTemplateValues(template: any, useAsDefault: boolean): void; + appendForwardSlash(): void; + appendQueryParameters(params: any): void; + clone(result: Resource): Resource; + delete(options?: { responseType?: string; headers?: any; overrideMimeType?: string }): Promise | undefined; + fetch(options?: { responseType?: string; headers?: any; overrideMimeType?: string }): Promise | undefined; + fetchArrayBuffer(): Promise | undefined; + fetchBlob(): Promise | undefined; + fetchImage(preferBlob: boolean): Promise | undefined; + fetchJson(): Promise | undefined; + fetchJsonp(callbackParameterName: string): Promise | undefined; + fetchText(): Promise | undefined; + fetchXml(): Promise | undefined; + getBaseUri(includeQuery: boolean): string; + getDerivedResource(options: {url?: string; queryParameters?: any; templateValues?: any; headers?: any; proxy?: DefaultProxy; retryCallback?: Resource.RetryCallback; + retryAttempts?: number; request?: Request; preserveQueryParameters?: boolean}): Resource; + getUrlComponent(query: boolean, proxy: boolean): string; + head(options?: {responseType?: string; headers?: any; overrideMimeType?: string}): Promise | undefined; + options(options?: { responseType?: string; headers?: any; overrideMimeType?: string }): Promise | undefined; + patch(data: any, options?: { responseType?: string; headers?: any; overrideMimeType?: string }): Promise | undefined; + post(data: any, options?: { data?: any; responseType?: string; headers?: any; overrideMimeType?: string }): Promise | undefined; + put(data: any, options?: { responseType?: string; headers?: any; overrideMimeType?: string }): Promise | undefined; + setQueryParameters(params: any, useAsDefault: boolean): void; + setTemplateValues(template: any, useAsDefault: boolean): void; + } + + namespace Resource { + type RetryCallback = (resource: Resource, error: Error) => void; + } + + function defined(value: any): boolean; + + namespace buildModuleUrl { + function setBaseUrl(value: string): undefined; + } +} diff --git a/types/cesium/test/cesium-global.test.ts b/types/cesium/test/cesium-global.test.ts new file mode 100644 index 0000000000..8974e56542 --- /dev/null +++ b/types/cesium/test/cesium-global.test.ts @@ -0,0 +1,48 @@ +Cesium.buildModuleUrl.setBaseUrl('/assets/cesium/'); + +const viewer = new Cesium.Viewer('#cesium', { + sceneMode: Cesium.SceneMode.COLUMBUS_VIEW, + imageryProvider: new Cesium.IonImageryProvider({ assetId: 3845 }), + baseLayerPicker: false, + geocoder: false, +}); + +const midnight = Cesium.JulianDate.fromDate(new Date(2018, 5, 14)); +const prop = new Cesium.SampledPositionProperty(); + +const pos = Cesium.Cartesian3.fromDegrees(1, 2, 3); +const time = Cesium.JulianDate.addSeconds(midnight, 12345, new Cesium.JulianDate()); +prop.addSample(time, pos); +viewer.entities.add(new Cesium.Entity({ + position: pos, + point: new Cesium.PointGraphics({ + color: Cesium.Color.fromCssColorString('#123123'), + pixelSize: 2 + }) +})); + +const objStart = Cesium.JulianDate.addSeconds(midnight, 12340, new Cesium.JulianDate()); +const objStop = Cesium.JulianDate.addSeconds(midnight, 12350, new Cesium.JulianDate()); + +const entity = new Cesium.Entity({ + name: 'TEST', + availability: new Cesium.TimeIntervalCollection([ + new Cesium.TimeInterval({ + start: objStart, + stop: objStop + }) + ]), + position: prop, + orientation: new Cesium.VelocityOrientationProperty(prop), + path: new Cesium.PathGraphics({ + resolution: 5, + width: 3, + material: new Cesium.ColorMaterialProperty(Cesium.Color.fromCssColorString('#223344')), + leadTime: 0 + }), + model: new Cesium.ModelGraphics({ + uri: 'http://assets.agi.com/models/rv1.gltf', + minimumPixelSize: 48 + }) +}); +viewer.entities.add(entity); diff --git a/types/cesium/test/cesium-module.test.ts b/types/cesium/test/cesium-module.test.ts new file mode 100644 index 0000000000..726daf7df2 --- /dev/null +++ b/types/cesium/test/cesium-module.test.ts @@ -0,0 +1,50 @@ +import * as Cesium from 'cesium'; + +Cesium.buildModuleUrl.setBaseUrl('/assets/cesium/'); + +const viewer = new Cesium.Viewer('#cesium', { + sceneMode: Cesium.SceneMode.COLUMBUS_VIEW, + imageryProvider: new Cesium.IonImageryProvider({ assetId: 3845 }), + baseLayerPicker: false, + geocoder: false, +}); + +const midnight = Cesium.JulianDate.fromDate(new Date(2018, 5, 14)); +const prop = new Cesium.SampledPositionProperty(); + +const pos = Cesium.Cartesian3.fromDegrees(1, 2, 3); +const time = Cesium.JulianDate.addSeconds(midnight, 12345, new Cesium.JulianDate()); +prop.addSample(time, pos); +viewer.entities.add(new Cesium.Entity({ + position: pos, + point: new Cesium.PointGraphics({ + color: Cesium.Color.fromCssColorString('#123123'), + pixelSize: 2 + }) +})); + +const objStart = Cesium.JulianDate.addSeconds(midnight, 12340, new Cesium.JulianDate()); +const objStop = Cesium.JulianDate.addSeconds(midnight, 12350, new Cesium.JulianDate()); + +const entity = new Cesium.Entity({ + name: 'TEST', + availability: new Cesium.TimeIntervalCollection([ + new Cesium.TimeInterval({ + start: objStart, + stop: objStop + }) + ]), + position: prop, + orientation: new Cesium.VelocityOrientationProperty(prop), + path: new Cesium.PathGraphics({ + resolution: 5, + width: 3, + material: new Cesium.ColorMaterialProperty(Cesium.Color.fromCssColorString('#223344')), + leadTime: 0 + }), + model: new Cesium.ModelGraphics({ + uri: 'http://assets.agi.com/models/rv1.gltf', + minimumPixelSize: 48 + }) +}); +viewer.entities.add(entity); diff --git a/types/cesium/tsconfig.json b/types/cesium/tsconfig.json new file mode 100644 index 0000000000..e82d8ca16a --- /dev/null +++ b/types/cesium/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "test/cesium-global.test.ts", + "test/cesium-module.test.ts" + ] +} diff --git a/types/cesium/tslint.json b/types/cesium/tslint.json new file mode 100644 index 0000000000..4c4fc86ace --- /dev/null +++ b/types/cesium/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "strict-export-declare-modifiers": false + } +} diff --git a/types/chrome/chrome-cast.d.ts b/types/chrome/chrome-cast/index.d.ts similarity index 100% rename from types/chrome/chrome-cast.d.ts rename to types/chrome/chrome-cast/index.d.ts diff --git a/types/chrome/tsconfig.json b/types/chrome/tsconfig.json index 1463d006eb..d4342a641c 100644 --- a/types/chrome/tsconfig.json +++ b/types/chrome/tsconfig.json @@ -20,10 +20,10 @@ "files": [ "index.d.ts", "chrome-app.d.ts", - "chrome-cast.d.ts", "chrome-webview.d.ts", + "chrome-cast/index.d.ts", "test/index.ts", "test/chrome-app.ts", "test/chrome-webview.ts" ] -} \ No newline at end of file +} diff --git a/types/chromecast-caf-sender/chromecast-caf-sender-tests.ts b/types/chromecast-caf-sender/chromecast-caf-sender-tests.ts new file mode 100644 index 0000000000..49e2bf5fee --- /dev/null +++ b/types/chromecast-caf-sender/chromecast-caf-sender-tests.ts @@ -0,0 +1,134 @@ +cast.framework.VERSION === "1.0.06"; +cast.framework.setLoggerLevel(cast.framework.LoggerLevel.DEBUG); + +const context = cast.framework.CastContext.getInstance(); +context.getCastState() === cast.framework.CastState.CONNECTED; +context.getSessionState() === cast.framework.SessionState.NO_SESSION; + +context.setOptions({ + autoJoinPolicy: chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED, + language: "en-US", + receiverApplicationId: "test", + resumeSavedSession: true +}); + +context.addEventListener( + cast.framework.CastContextEventType.CAST_STATE_CHANGED, + event => { + const { castState } = event; + } +); +context.addEventListener( + cast.framework.CastContextEventType.SESSION_STATE_CHANGED, + event => { + const { sessionState } = event; + } +); + +const handleSessionStateChange = ( + event: cast.framework.SessionStateEventData +) => {}; +context.removeEventListener( + cast.framework.CastContextEventType.SESSION_STATE_CHANGED, + handleSessionStateChange +); + +context.requestSession().then(err => { + if (err === chrome.cast.ErrorCode.CHANNEL_ERROR) return; + + const session = cast.framework.CastContext.getInstance().getCurrentSession(); + if (!session) return; + + const handleError = (err?: chrome.cast.ErrorCode) => {}; + + session.getSessionObj().sessionId === session.getSessionId(); + session.getSessionState() === cast.framework.SessionState.SESSION_STARTED; + session.getCastDevice().name; + session.getApplicationMetadata().applicationId; + session.getApplicationStatus() === ""; + session.getActiveInputState() === + cast.framework.ActiveInputState.ACTIVE_INPUT_STATE_UNKNOWN; + session.endSession(false); + session.setVolume(0.5).then(handleError); + session.getVolume() === 0.5; + session.setMute(true).then(handleError); + session.isMute(); + session.sendMessage("namespace", { obj: 1 }).then(handleError); + session.sendMessage("namespace", "string"); + session.sendMessage("namespace", 2); + + session.addMessageListener("namespace", (namespace, message) => {}); + session.removeMessageListener("namespace", (namespace, message) => {}); + + const req = new chrome.cast.media.LoadRequest( + new chrome.cast.media.MediaInfo("id", "type") + ); + session.loadMedia(req); + + const media = session.getMediaSession(); + if (media && media.sessionId) { + } + + session.addEventListener( + cast.framework.SessionEventType.ACTIVE_INPUT_STATE_CHANGED, + ({ activeInputState }) => {} + ); + session.addEventListener( + cast.framework.SessionEventType.APPLICATION_METADATA_CHANGED, + ({ metadata }) => {} + ); + session.addEventListener( + cast.framework.SessionEventType.APPLICATION_STATUS_CHANGED, + ({ status }) => {} + ); + session.addEventListener( + cast.framework.SessionEventType.MEDIA_SESSION, + ({ mediaSession }) => {} + ); + session.addEventListener( + cast.framework.SessionEventType.VOLUME_CHANGED, + ({ volume }) => {} + ); + session.removeEventListener( + cast.framework.SessionEventType.VOLUME_CHANGED, + ({ volume }) => {} + ); +}); + +const player = new cast.framework.RemotePlayer(); +{ + const bool: boolean = + player.isConnected && + player.isMediaLoaded && + player.canControlVolume && + player.isPaused && + player.isMuted && + player.canPause && + player.canSeek; + const sum: number = player.duration + player.currentTime + player.volumeLevel; + const str: string = + player.displayName + player.statusText + player.title + player.displayName; +} +player.mediaInfo && player.mediaInfo.contentId; +player.imageUrl && player.imageUrl === ""; +player.playerState && player.playerState === chrome.cast.media.PlayerState.IDLE; +player.savedPlayerState && player.savedPlayerState.currentTime; +player.controller === null; + +const playerCtrl = new cast.framework.RemotePlayerController(player); +player.controller === playerCtrl; +playerCtrl.playOrPause(); +playerCtrl.stop(); +playerCtrl.seek(); +playerCtrl.muteOrUnmute(); +playerCtrl.setVolumeLevel(); +playerCtrl.getFormattedTime(60); +playerCtrl.getSeekPosition(1, 60) === playerCtrl.getSeekTime(1, 60); +playerCtrl.addEventListener( + cast.framework.RemotePlayerEventType.ANY_CHANGE, + () => {} +); +playerCtrl.removeEventListener( + cast.framework.RemotePlayerEventType.ANY_CHANGE, + () => {} +); diff --git a/types/chromecast-caf-sender/index.d.ts b/types/chromecast-caf-sender/index.d.ts new file mode 100644 index 0000000000..de152b0715 --- /dev/null +++ b/types/chromecast-caf-sender/index.d.ts @@ -0,0 +1,305 @@ +// Type definitions for Cast Application Framework Sender API 1.0 +// Project: https://developers.google.com/cast/docs/caf_receiver_overview +// Definitions by: Samuel Maddock +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 + +/// + +//////////////////// +// Global object +//////////////////// +interface Window { + cast: typeof cast; +} + +//////////////////// +// Framework +//////////////////// +/** + * Cast Application Framework + * @see https://developers.google.com/cast/docs/reference/chrome/cast.framework + */ +declare namespace cast.framework { + enum LoggerLevel { + DEBUG, + INFO, + WARNING, + ERROR, + NONE + } + + enum CastState { + NO_DEVICES_AVAILABLE = "NO_DEVICES_AVAILABLE", + NOT_CONNECTED = "NOT_CONNECTED", + CONNECTING = "CONNECTING", + CONNECTED = "CONNECTED" + } + + enum SessionState { + NO_SESSION = "NO_SESSION", + SESSION_STARTING = "SESSION_STARTING", + SESSION_STARTED = "SESSION_STARTED", + SESSION_START_FAILED = "SESSION_START_FAILED", + SESSION_ENDING = "SESSION_ENDING", + SESSION_ENDED = "SESSION_ENDED", + SESSION_RESUMED = "SESSION_RESUMED" + } + enum CastContextEventType { + CAST_STATE_CHANGED = "caststatechanged", + SESSION_STATE_CHANGED = "sessionstatechanged" + } + enum SessionEventType { + APPLICATION_STATUS_CHANGED = "applicationstatuschanged", + APPLICATION_METADATA_CHANGED = "applicationmetadatachanged", + ACTIVE_INPUT_STATE_CHANGED = "activeinputstatechanged", + VOLUME_CHANGED = "volumechanged", + MEDIA_SESSION = "mediasession" + } + enum RemotePlayerEventType { + ANY_CHANGE = "anyChanged", + IS_CONNECTED_CHANGED = "isConnectedChanged", + IS_MEDIA_LOADED_CHANGED = "isMediaLoadedChanged", + DURATION_CHANGED = "durationChanged", + CURRENT_TIME_CHANGED = "currentTimeChanged", + IS_PAUSED_CHANGED = "isPausedChanged", + VOLUME_LEVEL_CHANGED = "volumeLevelChanged", + CAN_CONTROL_VOLUME_CHANGED = "canControlVolumeChanged", + IS_MUTED_CHANGED = "isMutedChanged", + CAN_PAUSE_CHANGED = "canPauseChanged", + CAN_SEEK_CHANGED = "canSeekChanged", + DISPLAY_NAME_CHANGED = "displayNameChanged", + STATUS_TEXT_CHANGED = "statusTextChanged", + TITLE_CHANGED = "titleChanged", + DISPLAY_STATUS_CHANGED = "displayStatusChanged", + MEDIA_INFO_CHANGED = "mediaInfoChanged", + IMAGE_URL_CHANGED = "imageUrlChanged", + PLAYER_STATE_CHANGED = "playerStateChanged" + } + + enum ActiveInputState { + ACTIVE_INPUT_STATE_UNKNOWN = -1, + ACTIVE_INPUT_STATE_NO = 0, + ACTIVE_INPUT_STATE_YES = 1 + } + + interface CastOptions { + autoJoinPolicy: chrome.cast.AutoJoinPolicy; + language?: string; + receiverApplicationId?: string; + resumeSavedSession?: boolean; + } + + const VERSION: string; + function setLoggerLevel(level: LoggerLevel): void; + + class CastContext { + static getInstance(): CastContext; + setOptions(options: CastOptions): void; + getCastState(): CastState; + getSessionState(): SessionState; + requestSession(): Promise; + getCurrentSession(): CastSession | null; + endCurrentSession(stopCasting: boolean): void; + + addEventListener( + type: CastContextEventType.CAST_STATE_CHANGED, + handler: (event: CastStateEventData) => void + ): void; + addEventListener( + type: CastContextEventType.SESSION_STATE_CHANGED, + handler: (event: SessionStateEventData) => void + ): void; + removeEventListener( + type: CastContextEventType.CAST_STATE_CHANGED, + handler: (event: CastStateEventData) => void + ): void; + removeEventListener( + type: CastContextEventType.SESSION_STATE_CHANGED, + handler: (event: SessionStateEventData) => void + ): void; + } + + class CastSession { + constructor(sessionObj: chrome.cast.Session, state: SessionState); + getSessionObj(): chrome.cast.Session; + getSessionId(): string; + getSessionState(): SessionState; + getCastDevice(): chrome.cast.Receiver; + getApplicationMetadata(): ApplicationMetadata; + getApplicationStatus(): string; + getActiveInputState(): ActiveInputState; + endSession(stopCasting: boolean): void; + setVolume(volume: number): Promise; + getVolume(): number; + setMute(mute: boolean): Promise; + isMute(): boolean; + sendMessage( + namespace: string, + data: any + ): Promise; + addMessageListener( + namespace: string, + listener: (namespace: string, message: string) => void + ): void; + removeMessageListener( + namespace: string, + listener: (namespace: string, message: string) => void + ): void; + loadMedia( + request: chrome.cast.media.LoadRequest + ): Promise; + getMediaSession(): chrome.cast.media.Media | null; + + addEventListener( + type: SessionEventType.ACTIVE_INPUT_STATE_CHANGED, + handler: (event: ActiveInputStateEventData) => void + ): void; + addEventListener( + type: SessionEventType.APPLICATION_METADATA_CHANGED, + handler: (event: ApplicationMetadataEventData) => void + ): void; + addEventListener( + type: SessionEventType.APPLICATION_STATUS_CHANGED, + handler: (event: ApplicationStatusEventData) => void + ): void; + addEventListener( + type: SessionEventType.MEDIA_SESSION, + handler: (event: MediaSessionEventData) => void + ): void; + addEventListener( + type: SessionEventType.VOLUME_CHANGED, + handler: (event: VolumeEventData) => void + ): void; + removeEventListener( + type: SessionEventType.ACTIVE_INPUT_STATE_CHANGED, + handler: (event: ActiveInputStateEventData) => void + ): void; + removeEventListener( + type: SessionEventType.APPLICATION_METADATA_CHANGED, + handler: (event: ApplicationMetadataEventData) => void + ): void; + removeEventListener( + type: SessionEventType.APPLICATION_STATUS_CHANGED, + handler: (event: ApplicationStatusEventData) => void + ): void; + removeEventListener( + type: SessionEventType.MEDIA_SESSION, + handler: (event: MediaSessionEventData) => void + ): void; + removeEventListener( + type: SessionEventType.VOLUME_CHANGED, + handler: (event: VolumeEventData) => void + ): void; + } + + class RemotePlayerController { + constructor(player: RemotePlayer); + playOrPause(): void; + stop(): void; + seek(): void; + muteOrUnmute(): void; + setVolumeLevel(): void; + getFormattedTime(timeInSec: number): string; + getSeekPosition(currentTime: number, duration: number): number; + getSeekTime(currentPosition: number, duration: number): number; + + addEventListener( + type: RemotePlayerEventType, + handler: (event: RemotePlayerChangedEvent) => void + ): void; + removeEventListener( + type: RemotePlayerEventType, + handler: (event: RemotePlayerChangedEvent) => void + ): void; + } + + interface SavedPlayerState { + mediaInfo: chrome.cast.media.PlayerState | null; + currentTime: number; + isPaused: boolean; + } + + class RemotePlayer { + isConnected: boolean; + isMediaLoaded: boolean; + duration: number; + currentTime: number; + volumeLevel: number; + canControlVolume: boolean; + isPaused: boolean; + isMuted: boolean; + canPause: boolean; + canSeek: boolean; + displayName: string; + statusText: string; + title: string; + displayStatus: string; + mediaInfo?: chrome.cast.media.MediaInfo; + imageUrl: string | null; + playerState: chrome.cast.media.PlayerState | null; + savedPlayerState: SavedPlayerState | null; + controller: RemotePlayerController | null; + } + + class ApplicationMetadata { + constructor(sessionObj: chrome.cast.Session); + applicationId: string; + images: chrome.cast.Image[]; + name: string; + namespaces: string[]; + } + + abstract class EventData { + constructor(type: string); + type: string; + } + + class ActiveInputStateEventData extends EventData { + constructor(activeInputState: ActiveInputState); + activeInputState: ActiveInputState; + } + + class ApplicationMetadataEventData extends EventData { + constructor(metadata: ApplicationMetadata); + metadata: ApplicationMetadata; + } + + class ApplicationStatusEventData extends EventData { + constructor(status: string); + status: string; + } + + class CastStateEventData extends EventData { + constructor(castState: CastState); + castState: CastState; + } + + class MediaSessionEventData extends EventData { + constructor(mediaSession: chrome.cast.media.Media); + mediaSession: chrome.cast.media.Media; + } + + class RemotePlayerChangedEvent extends EventData { + constructor(type: RemotePlayerEventType, field: string, value: T); + field: string; + value: T; + } + + class SessionStateEventData extends EventData { + constructor( + session: CastSession, + sessionState: SessionState, + opt_errorCode: chrome.cast.ErrorCode + ); + errorCode: chrome.cast.ErrorCode; + session: CastSession; + sessionState: SessionState; + } + + class VolumeEventData extends EventData { + constructor(volume: number, isMute: boolean); + isMute: boolean; + volume: number; + } +} diff --git a/types/chromecast-caf-sender/tsconfig.json b/types/chromecast-caf-sender/tsconfig.json new file mode 100644 index 0000000000..0d8a0cad6e --- /dev/null +++ b/types/chromecast-caf-sender/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "chromecast-caf-sender-tests.ts" + ] +} diff --git a/types/chromecast-caf-sender/tslint.json b/types/chromecast-caf-sender/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/chromecast-caf-sender/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/cytoscape/cytoscape-tests.ts b/types/cytoscape/cytoscape-tests.ts index 0b7bac436e..25d6151259 100644 --- a/types/cytoscape/cytoscape-tests.ts +++ b/types/cytoscape/cytoscape-tests.ts @@ -80,3 +80,17 @@ cy.on('zoom', (event) => { cy.nodes('$node > node').style('opacity', 0); } }); + +cy.animate({ + fit: { + padding: 10, + eles: cy.nodes() + }, + duration: 500 +}); + +const node = cy.nodes()[0]; +cy.animate({ + center: {eles: node}, + duration: 500 +}); diff --git a/types/cytoscape/index.d.ts b/types/cytoscape/index.d.ts index 18c3c0d1b5..e85041861a 100644 --- a/types/cytoscape/index.d.ts +++ b/types/cytoscape/index.d.ts @@ -1127,8 +1127,7 @@ declare namespace cytoscape { /** * The output is a collection of node and edge elements OR single element. */ - interface CollectionElements extends - EdgeCollection, NodeCollection, SingularElement { } + type CollectionElements = EdgeCollection | NodeCollection | SingularElement; /** * edges -> Cy.EdgeCollection diff --git a/types/ejs/ejs-tests.ts b/types/ejs/ejs-tests.ts index a7b7b66944..8a0b2404d7 100644 --- a/types/ejs/ejs-tests.ts +++ b/types/ejs/ejs-tests.ts @@ -3,7 +3,7 @@ import ejs = require("ejs"); import { readFileSync as read } from 'fs'; import LRU = require("lru-cache"); -import { TemplateFunction, Options } from "ejs"; +import { TemplateFunction, AsyncTemplateFunction, Options } from "ejs"; const fileName = 'test.ejs'; const people = ['geddy', 'neil', 'alex']; @@ -12,6 +12,8 @@ const template = '<%= people.join(", "); %>'; const options = { filename: fileName }; let result: string; let ejsFunction: TemplateFunction; +let asyncResult: Promise; +let ejsAsyncFunction: AsyncTemplateFunction; const SimpleCallback = (err: any, html?: string) => { if (err) { @@ -44,11 +46,19 @@ ejsFunction = ejs.compile('<%= it.people.join(", "); %>', { _with: false, locals ejsFunction = ejs.compile(template, { rmWhitespace: true }); const customEscape = (str: string) => !str ? '' : str.toUpperCase(); ejsFunction = ejs.compile(template, { escape: customEscape }); +ejsFunction = ejs.compile(template, { async: false }); + +ejsAsyncFunction = ejs.compile(template, { async: true }); +ejsAsyncFunction = ejs.compile(template, { client: true, async: true }); result = ejsFunction(); result = ejsFunction({}); result = ejsFunction(data); +asyncResult = ejsAsyncFunction(); +asyncResult = ejsAsyncFunction({}); +asyncResult = ejsAsyncFunction(data); + /** @see https://github.com/mde/ejs/tree/v2.5.7#custom-fileloader */ ejs.fileLoader = (path: string) => ""; diff --git a/types/ejs/index.d.ts b/types/ejs/index.d.ts index e56ad1a8ec..73eb716e23 100644 --- a/types/ejs/index.d.ts +++ b/types/ejs/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ejs.js 2.5 +// Type definitions for ejs.js 2.6 // Project: http://ejs.co/ // Definitions by: Ben Liddicott // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -28,14 +28,20 @@ export function resolveInclude(name: string, filename: string, isDir: boolean): /** * Compile the given `str` of ejs into a template function. */ -export function compile(template: string, opts?: Options): (TemplateFunction); +export function compile(template: string, opts?: Options & { async: false }): TemplateFunction; +export function compile(template: string, opts: Options & { async: true }): AsyncTemplateFunction; +export function compile(template: string, opts: Options & { async?: never }): TemplateFunction; +export function compile(template: string, opts?: Options): TemplateFunction | AsyncTemplateFunction; /** * Render the given `template` of ejs. * * If you would like to include options but not data, you need to explicitly * call this function with `data` being an empty object or `null`. */ -export function render(template: string, data?: Data, opts?: Options): string; +export function render(template: string, data?: Data, opts?: Options & { async: false }): string; +export function render(template: string, data: Data | undefined, opts: Options & { async: true }): Promise; +export function render(template: string, data: Data | undefined, opts: Options & { async?: never }): string; +export function render(template: string, data?: Data, opts?: Options): string | Promise; export type RenderFileCallback = (err: Error, str?: string) => T; @@ -55,6 +61,7 @@ export function renderFile(path: string, data: Data, opts: Options, cb: Rende export function clearCache(): void; export type TemplateFunction = (data?: Data) => string; +export type AsyncTemplateFunction = (data?: Data) => Promise; export interface Options { /** Compiled functions are cached, requires `filename` */ cache?: boolean; @@ -95,6 +102,8 @@ export interface Options { * (By default escapes XML). */ escape?(str: string): string; + /** Whether or not to use a Promise */ + async?: boolean; } export function escapeRegexChars(s: string): string; diff --git a/types/elasticsearch/elasticsearch-tests.ts b/types/elasticsearch/elasticsearch-tests.ts index 3236a181a1..35b4e39798 100644 --- a/types/elasticsearch/elasticsearch-tests.ts +++ b/types/elasticsearch/elasticsearch-tests.ts @@ -206,7 +206,8 @@ client.mget({ index: 'myindex', type: 'mytype', body: { - ids: [1, 2, 3] + ids: [1, 2, 3], + _source: ['test'] } }, (error, response) => { // ... diff --git a/types/elasticsearch/index.d.ts b/types/elasticsearch/index.d.ts index 7973b598ab..2cfd14f689 100644 --- a/types/elasticsearch/index.d.ts +++ b/types/elasticsearch/index.d.ts @@ -465,7 +465,7 @@ export interface MGetParams extends GenericParams { preference?: string; realtime?: boolean; refresh?: boolean; - source?: NameList; + _source?: NameList; _sourceExclude?: NameList; _sourceInclude?: NameList; index?: string; diff --git a/types/express-serve-static-core/index.d.ts b/types/express-serve-static-core/index.d.ts index f8521d433d..96c4c233c2 100644 --- a/types/express-serve-static-core/index.d.ts +++ b/types/express-serve-static-core/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Express 4.11 +// Type definitions for Express 4.16 // Project: http://expressjs.com // Definitions by: Boris Yankov // Michał Lytek @@ -23,6 +23,7 @@ declare global { import * as http from "http"; import { EventEmitter } from "events"; +import { Options as RangeParserOptions, Result as RangeParserResult, Ranges as RangeParserRanges } from "range-parser"; export interface NextFunction { // tslint:disable-next-line callable-types (In ts2.1 it thinks the type alias has no call signatures) @@ -174,7 +175,7 @@ export interface CookieOptions { export interface ByteRange { start: number; end: number; } -export interface RequestRanges extends Array { type: string; } +export interface RequestRanges extends RangeParserRanges { } export type Errback = (err: Error) => void; @@ -283,21 +284,19 @@ export interface Request extends http.IncomingMessage, Express.Request { acceptsLanguages(...lang: string[]): string | false; /** - * Parse Range header field, - * capping to the given `size`. + * Parse Range header field, capping to the given `size`. * - * Unspecified ranges such as "0-" require - * knowledge of your resource length. In - * the case of a byte range this is of course - * the total number of bytes. If the Range - * header field is not given `null` is returned, - * `-1` when unsatisfiable, `-2` when syntactically invalid. + * Unspecified ranges such as "0-" require knowledge of your resource length. In + * the case of a byte range this is of course the total number of bytes. + * If the Range header field is not given `undefined` is returned. + * If the Range header field is given, return value is a result of range-parser. + * See more ./types/range-parser/index.d.ts + * + * NOTE: remember that ranges are inclusive, so for example "Range: users=0-3" + * should respond with 4 users when available, not 3. * - * NOTE: remember that ranges are inclusive, so - * for example "Range: users=0-3" should respond - * with 4 users when available, not 3. */ - range(size: number): RequestRanges|null|-1|-2; + range(size: number, options?: RangeParserOptions): RangeParserRanges | RangeParserResult | undefined; /** * Return an array of Accepted media types @@ -450,6 +449,13 @@ export interface Request extends http.IncomingMessage, Express.Request { baseUrl: string; app: Application; + + /** + * After middleware.init executed, Request will contain res and next properties + * See: express/lib/middleware/init.js + */ + res?: Response; + next?: NextFunction; } export interface MediaType { @@ -827,7 +833,13 @@ export interface Response extends http.ServerResponse, Express.Response { * * @since 4.11.0 */ - append(field: string, value?: string[]|string): Response; + append(field: string, value?: string[] | string): Response; + + /** + * After middleware.init executed, Response will contain req property + * See: express/lib/middleware/init.js + */ + req?: Request; } export interface Handler extends RequestHandler { } @@ -1062,6 +1074,22 @@ export interface Application extends EventEmitter, IRouter, Express.Application _router: any; use: ApplicationRequestHandler; + + /** + * The mount event is fired on a sub-app, when it is mounted on a parent app. + * The parent app is passed to the callback function. + * + * NOTE: + * Sub-apps will: + * - Not inherit the value of settings that have a default value. You must set the value in the sub-app. + * - Inherit the value of settings with no default value. + */ + on: (event: string, callback: (parent: Application) => void) => this; + + /** + * The app.mountpath property contains one or more path patterns on which a sub-app was mounted. + */ + mountpath: string | string[]; } export interface Express extends Application { diff --git a/types/express/express-tests.ts b/types/express/express-tests.ts index 137c70c8e8..07bf2fc5c3 100644 --- a/types/express/express-tests.ts +++ b/types/express/express-tests.ts @@ -104,6 +104,9 @@ namespace express_tests { req.headers.existingHeader as string; req.headers.nonExistingHeader as any as undefined; + // Since 4.14.0 req.range() has options + req.range(2, { combine: true }); + res.send(req.query['token']); }); @@ -128,6 +131,19 @@ namespace express_tests { app.use(router); + // Test req.res, req.next, res.req should exists after middleware.init + app.use((req, res) => { + req.res; + req.next; + res.req; + }); + + // Test on mount event + app.on('mount', (parent) => true); + + // Test mountpath + const mountPath: string|string[] = app.mountpath; + app.listen(3000); const next: express.NextFunction = () => { }; @@ -139,6 +155,7 @@ namespace express_tests { * * ***************************/ import * as http from 'http'; +import { RequestRanges } from 'express-serve-static-core'; namespace node_tests { { diff --git a/types/express/index.d.ts b/types/express/index.d.ts index 4e6ed8fcc1..81821ca98c 100644 --- a/types/express/index.d.ts +++ b/types/express/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Express 4.11 +// Type definitions for Express 4.16 // Project: http://expressjs.com // Definitions by: Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped diff --git a/types/generate-json-webpack-plugin/generate-json-webpack-plugin-tests.ts b/types/generate-json-webpack-plugin/generate-json-webpack-plugin-tests.ts new file mode 100644 index 0000000000..44422f02ad --- /dev/null +++ b/types/generate-json-webpack-plugin/generate-json-webpack-plugin-tests.ts @@ -0,0 +1,9 @@ +import GenerateJsonWebpackPlugin = require('generate-json-webpack-plugin'); + +new GenerateJsonWebpackPlugin('name', { key: 'value '}); + +new GenerateJsonWebpackPlugin('name', { key: 'value '}, (key, value) => `${key}${value}`); + +new GenerateJsonWebpackPlugin('name', { key: 'value '}, (key, value) => `${key}${value}`, 4); + +new GenerateJsonWebpackPlugin('name', { key: 'value '}, (key, value) => `${key}${value}`, ' '); diff --git a/types/generate-json-webpack-plugin/index.d.ts b/types/generate-json-webpack-plugin/index.d.ts new file mode 100644 index 0000000000..65ebf8cbd0 --- /dev/null +++ b/types/generate-json-webpack-plugin/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for generate-json-webpack-plugin 0.3 +// Project: https://github.com/elliottsj/generate-json-webpack-plugin +// Definitions by: Ryan Clark +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +import { Plugin } from 'webpack'; + +export = GenerateJsonWebpackPlugin; + +declare class GenerateJsonWebpackPlugin extends Plugin { + constructor(fileName: string, value: object, replacer?: (key: string, value: any) => any, space?: string | number); +} diff --git a/types/generate-json-webpack-plugin/tsconfig.json b/types/generate-json-webpack-plugin/tsconfig.json new file mode 100644 index 0000000000..9d288fa4f9 --- /dev/null +++ b/types/generate-json-webpack-plugin/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "generate-json-webpack-plugin-tests.ts" + ] +} diff --git a/types/generate-json-webpack-plugin/tslint.json b/types/generate-json-webpack-plugin/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/generate-json-webpack-plugin/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/helmet/index.d.ts b/types/helmet/index.d.ts index a78e768688..0162912d99 100644 --- a/types/helmet/index.d.ts +++ b/types/helmet/index.d.ts @@ -20,6 +20,7 @@ declare namespace helmet { ieNoOpen?: boolean, noCache?: boolean, noSniff?: boolean, + referrerPolicy?: boolean | IHelmetReferrerPolicyConfiguration, xssFilter?: boolean | IHelmetXssFilterConfiguration, expectCt?: boolean | IHelmetExpectCtConfiguration, } diff --git a/types/imperium/imperium-tests.ts b/types/imperium/imperium-tests.ts new file mode 100644 index 0000000000..f7380c25cc --- /dev/null +++ b/types/imperium/imperium-tests.ts @@ -0,0 +1,19 @@ +import imperium from 'imperium'; + +imperium.role('admin', async (req) => { + return true; +}); + +imperium.role('user') + .can('seeUser', { user: '@' }) + .can('manageUser', { user: '@' }); + +imperium.role('admin') + .is('user', { user: '*' }); + +imperium.can('seeUser'); +imperium.can(['seeUser', 'manageUser']); +imperium.can({ action: 'seeUser', user: ':userId' }); +imperium.can([{ action: 'manageUser', user: ':userId' }]); +imperium.is('admin'); +imperium.is(['admin', 'user']); diff --git a/types/imperium/index.d.ts b/types/imperium/index.d.ts new file mode 100644 index 0000000000..67eace244e --- /dev/null +++ b/types/imperium/index.d.ts @@ -0,0 +1,98 @@ +// Type definitions for imperium 2.0 +// Project: https://www.npmjs.org/package/imperium +// Definitions by: Gaetan SENN +// Definitions: https://github.com/psnider/DefinitelyTyped/imperium +// TypeScript Version: 2.7 + +/// + +import express = require('express'); + +export type GetAcl = (req: express.Request) => Promise | Promise; +export type Actions = string[] | string; +export type Context = Array<'params' | 'query' | 'headers' | 'body'>; +// Can contain when key that is evaluated during route action +export interface RoleParams { + [key: string]: string; +} + +export const context: string[]; +export const roles: Roles; + +// Add new role with specific ImperiumGetAcl +export function role(roleName: string, getAcl?: GetAcl): Role; + +// Check if user has role(s) act like as an OR +export function is(roleNames: string | string[]): Promise; + +// Check if current user can do action(s) +export function can(actionS: string | string[] | Action | Action[]): Promise; + +export function evaluateRouteActions(req: express.Request, action: Action[], context: Context): Actions; + +export function evaluateRouteAction(req: express.Request, expr: string, key: string, context: Context): string; + +export function evaluateUserActions(req: express.Request, roles: Role[]): Promise; + +export function evaluateUserAction(action: RoleParams, context: { [key: string]: string[] }): { [key: string]: string[] }; + +export class Imperium { + constructor() + + context: string[]; + roles: Roles; + + // Add new role with specific ImperiumGetAcl + role(roleName: string, getAcl?: GetAcl): Role; + + // Check if user has role(s) act like as an OR + is(roleNames: string | string[]): Promise; + + // Check if current user can do action(s) + can(actionS: string | string[] | Action | Action[]): Promise; + + private addRole(roleName: string, getAcl: GetAcl): void; + + evaluateRouteActions(req: express.Request, action: Action[], context: Context): Actions; + + evaluateRouteAction(req: express.Request, expr: string, key: string, context: Context): string; + + evaluateUserActions(req: express.Request, roles: Role[]): Promise; + + evaluateUserAction(action: RoleParams, context: { [key: string]: string[] }): { [key: string]: string[] }; +} + +export interface Roles { + [key: string]: RoleActions; +} + +export interface RoleActions { + actions: Action[]; + getAcl?: GetAcl; +} + +export interface Action { + action: string; + [key: string]: string; +} + +export class Role { + constructor(imperium: Imperium, roleName: string) + + // Imperium instance to retreive child role + imperium: Imperium; + // Role name + roleName: string; + // Contain all the actions for this specific role + role: RoleActions; + + /* Add action with specific params */ + can(action: string, params: RoleParams): Role; + + /* Get actions of childRoleName and replace params */ + is(childRoleName: string, params: RoleParams): Role; +} + +export class UnauthorizedError extends Error { + constructor(message: string, status: number, context: any) +} diff --git a/types/imperium/tsconfig.json b/types/imperium/tsconfig.json new file mode 100644 index 0000000000..caaa7b74ce --- /dev/null +++ b/types/imperium/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "esModuleInterop": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "imperium-tests.ts" + ] +} diff --git a/types/imperium/tslint.json b/types/imperium/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/imperium/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index 4520247216..af86996795 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Jest 22.2 +// Type definitions for Jest 23.0 // Project: http://facebook.github.io/jest/ // Definitions by: Asana // Ivo Stratev @@ -218,7 +218,7 @@ declare namespace jest { * @param fn The function for your test * @param timeout The timeout for an async function test */ - (name: string, fn?: ProvidesCallback, timeout?: number): void; + (name: string, fn: ProvidesCallback, timeout?: number): void; /** * Only runs this test in the current file. */ diff --git a/types/jquery.nicescroll/index.d.ts b/types/jquery.nicescroll/index.d.ts new file mode 100644 index 0000000000..8228ae5209 --- /dev/null +++ b/types/jquery.nicescroll/index.d.ts @@ -0,0 +1,105 @@ +// Type definitions for jquery.nicescroll 3.7 +// Project: https://nicescroll.areaaperta.com +// Definitions by: Bohdan Stupak +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +/// + +declare namespace JQueryNiceScroll { + interface NiceScrollPage { + maxw: number; + maxh: number; + width: number; + height: number; + w: number; + h: number; + } + + interface NiceScroll { + show(): NiceScroll; + hide(): NiceScroll; + toggle(): NiceScroll; + onResize(e?: Event, page?: NiceScrollPage): NiceScroll; + resize(e?: Event, page?: NiceScrollPage): NiceScroll; + remove(): void; + stop(): NiceScroll; + doScrollPos(x: number, y: number, spd: number): void; + doScrollLeft(x: number, duration: number): void; + doScrollTop(x: number, duration: number): void; + } + + interface NiceScrollOptions { + zindex?: "auto" | number; + cursoropacitymin?: number; + cursoropacitymax?: number; + cursorcolor?: string; + cursorwidth?: string; + cursorborder?: string; + cursorborderradius?: string; + scrollspeed?: number; + mousescrollstep?: number; + touchbehavior?: boolean; + emulatetouch?: boolean; + hwacceleration?: boolean; + usetransition?: boolean; + boxzoom?: boolean; + dblclickzoom?: boolean; + gesturezoom?: boolean; + grabcursorenabled?: boolean; + autohidemode?: "leave" | "scroll" | "cursor" | "hidden" | boolean; + background?: string; + iframeautoresize?: boolean; + cursorminheight?: number; + preservenativescrolling?: boolean; + railoffset?: boolean | { + top?: number; + left?: number; + }; + railhoffset?: boolean | { + top?: number; + left?: number; + }; + bouncescroll?: boolean; + spacebarenabled?: boolean; + railpadding?: { + top: number; + right: number; + left: number; + bottom: number; + }; + disableoutline?: boolean; + horizrailenabled?: boolean; + railalign?: "right" | "left" | "top" | "bottom"; + railvalign?: "right" | "left" | "top" | "bottom"; + enabletranslate3d?: boolean; + enablemousewheel?: boolean; + enablekeyboard?: boolean; + smoothscroll?: boolean; + sensitiverail?: boolean; + enablemouselockapi?: boolean; + cursorfixedheight?: number; + directionlockdeadzone?: number; + hidecursordelay?: number; + nativeparentscrolling?: boolean; + enablescrollonselection?: boolean; + overflowx?: "auto" | "hidden" | "inherit" | "initial" | "overlay" | "scroll" | "unset" | "visible"; + overflowy?: "auto" | "hidden" | "inherit" | "initial" | "overlay" | "scroll" | "unset" | "visible"; + cursordragspeed?: number; + rtlmode?: "auto" | boolean; + cursordragontouch?: boolean; + oneaxismousemode?: "auto" | boolean; + scriptpath?: string; + preventmultitouchscrolling?: boolean; + disablemutationobserver?: boolean; + enableobserver?: boolean; + scrollbarid?: string; + scrollCLass?: string; + } +} + +interface JQuery { + niceScroll(options?: JQueryNiceScroll.NiceScrollOptions): JQueryNiceScroll.NiceScroll; + niceScroll(wrapper: string, options: JQueryNiceScroll.NiceScrollOptions): JQueryNiceScroll.NiceScroll; + getNiceScroll(index?: number): JQueryNiceScroll.NiceScroll; +} diff --git a/types/jquery.nicescroll/jquery.nicescroll-tests.ts b/types/jquery.nicescroll/jquery.nicescroll-tests.ts new file mode 100644 index 0000000000..f4362530f9 --- /dev/null +++ b/types/jquery.nicescroll/jquery.nicescroll-tests.ts @@ -0,0 +1,41 @@ +// cases from documentation +// 1. Simple mode, it styles document scrollbar: +$(() => { + $("body").niceScroll(); +}); + +// 2. Instance with object returned: +let nice; +$(() => { + nice = $("body").niceScroll(); +}); + +// 3. Style a DIV and change cursor color: +$(() => { + $("#thisdiv").niceScroll({cursorcolor: "#00F"}); +}); + +// 4. DIV with "wrapper", formed by two divs, the first is the vieport, the latter is the content: +$(() => { + $("#viewportdiv").niceScroll("#wrapperdiv", {cursorcolor: "#00F"}); +}); + +// 5. Get nicescroll object: +nice = $("#mydiv").getNiceScroll(); + +// 6. Hide scrollbars: +$("#mydiv").getNiceScroll().hide(); + +// 7. Check for scrollbars resize (when content or position have changed): +$("#mydiv").getNiceScroll().resize(); + +// 8. Scrolling to a position: +$("#mydiv").getNiceScroll(0).doScrollLeft(1, 2); // Scroll X Axis +$("#mydiv").getNiceScroll(0).doScrollTop(1, 14); // Scroll Y Axis + +// other cases +$(".ui-grid-viewport").niceScroll({ + cursorcolor: "#fff", + cursorwidth: "8px", + autohidemode: "leave" +}); diff --git a/types/jquery.nicescroll/tsconfig.json b/types/jquery.nicescroll/tsconfig.json new file mode 100644 index 0000000000..9d94444fc2 --- /dev/null +++ b/types/jquery.nicescroll/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jquery.nicescroll-tests.ts" + ] +} \ No newline at end of file diff --git a/types/jquery.nicescroll/tslint.json b/types/jquery.nicescroll/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/jquery.nicescroll/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/kendo-ui/index.d.ts b/types/kendo-ui/index.d.ts index e734f52cfa..7d759eb974 100644 --- a/types/kendo-ui/index.d.ts +++ b/types/kendo-ui/index.d.ts @@ -1855,7 +1855,7 @@ declare namespace kendo.ui { dates?: any; depth?: string; disableDates?: any|Function; - footer?: string|Function; + footer?: false | string | Function; format?: string; max?: Date; messages?: CalendarMessages; @@ -4293,7 +4293,7 @@ declare namespace kendo.ui { columnMenu?: boolean | GridColumnMenu; dataSource?: any|any|kendo.data.DataSource; detailTemplate?: string|Function; - editable?: boolean | GridEditable; + editable?: boolean | "inline" | "incell" | "popup" | GridEditable; excel?: GridExcel; filterable?: boolean | GridFilterable; groupable?: boolean | GridGroupable; diff --git a/types/koa-webpack/index.d.ts b/types/koa-webpack/index.d.ts index 4f86fcd11f..951d8d58a2 100644 --- a/types/koa-webpack/index.d.ts +++ b/types/koa-webpack/index.d.ts @@ -1,30 +1,35 @@ -// Type definitions for koa-webpack 1.0 +// Type definitions for koa-webpack 5.x // Project: https://github.com/shellscape/koa-webpack#readme // Definitions by: Luka Maljic +// Lee Benson +// miZyind // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 import Koa = require('koa'); import webpack = require('webpack'); import webpackDevMiddleware = require('webpack-dev-middleware'); -import webpackHotMiddleware = require('webpack-hot-middleware'); -import connect = require('connect'); +import webpackHotClient = require('webpack-hot-client'); declare function koaWebpack( options?: koaWebpack.Options -): Koa.Middleware & koaWebpack.CombinedWebpackMiddleware; +): Promise; declare namespace koaWebpack { interface Options { compiler?: webpack.Compiler; config?: webpack.Configuration; - dev?: webpackDevMiddleware.Options; - hot?: webpackHotMiddleware.Options | boolean; + devMiddleware?: webpackDevMiddleware.Options; + hotClient?: webpackHotClient.Options | boolean; } interface CombinedWebpackMiddleware { - dev: connect.NextHandleFunction & webpackDevMiddleware.WebpackDevMiddleware; - hot: connect.NextHandleFunction & webpackHotMiddleware.EventStream; + devMiddleware: webpackDevMiddleware.WebpackDevMiddleware; + hotClient: { + close: () => void; + options: webpackHotClient.Options; + server: any; + }; } } diff --git a/types/koa-webpack/koa-webpack-tests.ts b/types/koa-webpack/koa-webpack-tests.ts index 12062302de..de4990eea6 100644 --- a/types/koa-webpack/koa-webpack-tests.ts +++ b/types/koa-webpack/koa-webpack-tests.ts @@ -7,39 +7,50 @@ const config: webpack.Configuration = {}; const compiler = webpack(config); // Using the middleware - -const middleware = koaWebpack({ +koaWebpack({ compiler, config, - dev: { - lazy: true, - watchOptions: { - aggregateTimeout: 300, - poll: true, - }, - publicPath: '/assets/', + // Reference: https://github.com/webpack/webpack-dev-middleware#options + devMiddleware: { + headers: { 'X-Custom-Header': 'yes' }, index: 'index.html', - headers: { - 'X-Custom-Header': 'yes' - }, - stats: { - colors: true, - }, + lazy: false, + logger: undefined, + logLevel: 'info', + // logTime: false, + // mimeTypes: null, + publicPath: '/assets/', reporter: null, - serverSideRender: false + serverSideRender: false, + stats: { context: process.cwd() }, + watchOptions: { aggregateTimeout: 200 }, + // writeToDisk: false }, - hot: { - log: console.log.bind(console), - path: '/__what', - heartbeat: 2000 + // Reference: https://github.com/webpack-contrib/webpack-hot-client#api + hotClient: { + allEntries: false, + autoConfigure: true, + host: 'localhost', + hmr: true, + https: false, + logLevel: 'info', + logTime: false, + port: 0, + reload: true, + server: undefined, + stats: { context: process.cwd() } } -}); +}) + .then((middleware) => { + app.use(middleware); -app.use(middleware); - -// Accessing the underlying middleware - -middleware.dev.close(); -middleware.dev.invalidate(); -middleware.dev.waitUntilValid(); -middleware.hot.publish(null); + // Accessing the underlying middleware + middleware.devMiddleware.close(); + middleware.devMiddleware.invalidate(); + middleware.devMiddleware.waitUntilValid(); + middleware.devMiddleware.getFilenameFromUrl('/public/index.html'); + middleware.devMiddleware.fileSystem; + middleware.hotClient.close(); + middleware.hotClient.options; + middleware.hotClient.server; + }); diff --git a/types/kraken-js/index.d.ts b/types/kraken-js/index.d.ts index 0980e31eb1..3013938dd2 100644 --- a/types/kraken-js/index.d.ts +++ b/types/kraken-js/index.d.ts @@ -1,16 +1,16 @@ // Type definitions for krakenjs 2.2 // Project: http://krakenjs.com // Definitions by: Timur Manyanov +// Satana Charuwichitratana // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 import { Express } from 'express'; -import { EventEmitter } from 'events'; declare function k(options?: k.Options | string): Express; declare namespace k { - interface Kraken extends Express, EventEmitter { + interface Kraken extends Express { kraken: Kraken; } diff --git a/types/mathjax/index.d.ts b/types/mathjax/index.d.ts index 8c0dc99e1a..aaf4a6109c 100644 --- a/types/mathjax/index.d.ts +++ b/types/mathjax/index.d.ts @@ -1030,6 +1030,17 @@ declare namespace MathJax { * they were MathML, you might need to set this to true. */ addMMLclasses?: boolean; + /*This controls whether the SVG output uses elements to re-use font paths rather than repeat paths every + * time. If useGlobalCache (see below) is set to false, this will still reduce duplication of paths while keeping + * each SVG self-contained. + */ + useFontCache?: boolean; + /*When set to true the SVG Output stores paths (corresponding to “fonts” in the SVG output) in a global SVG + * object using elements so that it can re-use them in all equations via elements (much like a font + * file allows re-use of characters across the document). While set to true by default, it will have no effect if + * useFontCache is set to false. + */ + useGlobalCache?: boolean; /*EqnChunk is the number of equations that will be typeset before they appear on screen. Larger values make for * less visual flicker as the equations are drawn, but also mean longer delays before the reader sees anything. */ diff --git a/types/mathjax/mathjax-tests.ts b/types/mathjax/mathjax-tests.ts index 619a8fc591..755e3bc4bd 100644 --- a/types/mathjax/mathjax-tests.ts +++ b/types/mathjax/mathjax-tests.ts @@ -57,4 +57,11 @@ MathJax.Hub.Config({ "HTML-CSS": { linebreaks: { automatic: true } }, CommonHTML: { linebreaks: { automatic: true } }, SVG: { linebreaks: { automatic: true } } -}); \ No newline at end of file +}); + +MathJax.Hub.Config({ + SVG: { + useFontCache: true, + useGlobalCache: true + } +}) diff --git a/types/newman/index.d.ts b/types/newman/index.d.ts new file mode 100644 index 0000000000..8f566b275c --- /dev/null +++ b/types/newman/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for newman 3.9 +// Project: https://github.com/postmanlabs/newman +// Definitions by: Leonid Logvinov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface NewmanRunSummary { + run: NewmanRun; +} +export interface NewmanRun { + executions: NewmanRunExecution[]; +} +export interface NewmanRunExecution { + item: NewmanRunExecutionItem; + assertions: NewmanRunExecutionAssertion[]; +} +export interface NewmanRunExecutionItem { + name: string; +} +export interface NewmanRunExecutionAssertion { + assertion: string; + error: NewmanRunExecutionAssertionError; +} +export interface NewmanRunExecutionAssertionError { + message: string; +} +export function run(options: any, callback?: (err: Error | null, summary: NewmanRunSummary) => void): void; diff --git a/types/newman/newman-tests.ts b/types/newman/newman-tests.ts new file mode 100644 index 0000000000..82ba6002e7 --- /dev/null +++ b/types/newman/newman-tests.ts @@ -0,0 +1,11 @@ +import { + run, + NewmanRun, + NewmanRunExecution, + NewmanRunExecutionAssertion, + NewmanRunExecutionAssertionError, + NewmanRunExecutionItem, + NewmanRunSummary, +} from 'newman'; + +run({}); diff --git a/types/newman/tsconfig.json b/types/newman/tsconfig.json new file mode 100644 index 0000000000..a4fcd1bf48 --- /dev/null +++ b/types/newman/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "newman-tests.ts"] +} diff --git a/types/newman/tslint.json b/types/newman/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/newman/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/node-telegram-bot-api/index.d.ts b/types/node-telegram-bot-api/index.d.ts index 7785617957..47d50223d2 100644 --- a/types/node-telegram-bot-api/index.d.ts +++ b/types/node-telegram-bot-api/index.d.ts @@ -1,16 +1,17 @@ -// Type definitions for node-telegram-bot-api 0.28 +// Type definitions for node-telegram-bot-api 0.30 // Project: https://github.com/yagop/node-telegram-bot-api // Definitions by: Alex Muench // Agadar // Giorgio Garasto // Kallu609 +// XC-Zhang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 /// import { EventEmitter } from 'events'; -import { Stream } from 'stream'; +import { Stream, Readable } from 'stream'; import { ServerOptions } from 'https'; import { Options } from 'request'; @@ -58,6 +59,11 @@ declare namespace TelegramBot { restart?: boolean; } + interface StopPollingOptions { + cancel?: boolean; + reason?: string; + } + interface SetWebHookOptions { url?: string; certificate?: string | Stream; @@ -136,6 +142,10 @@ declare namespace TelegramBot { type SendLocationOptions = SendBasicOptions; + type EditMessageLiveLocationOptions = EditMessageCaptionOptions; + + type StopMessageLiveLocationOptions = EditMessageCaptionOptions; + interface SendVenueOptions extends SendBasicOptions { foursquare_id?: string; } @@ -147,6 +157,7 @@ declare namespace TelegramBot { type SendGameOptions = SendBasicOptions; interface SendInvoiceOptions extends SendBasicOptions { + provider_data?: string; photo_url?: string; photo_size?: number; photo_width?: number; @@ -818,7 +829,7 @@ declare class TelegramBot extends EventEmitter { startPolling(options?: TelegramBot.StartPollingOptions): Promise; - stopPolling(): Promise; + stopPolling(options?: TelegramBot.StopPollingOptions): Promise; isPolling(): boolean; @@ -886,6 +897,11 @@ declare class TelegramBot extends EventEmitter { unpinChatMessage(chatId: number | string): Promise; + answerCallbackQuery(callbackQueryId: string, options?: Partial): Promise; + + /** + * @deprecated since version 0.30.0 + */ answerCallbackQuery(options?: TelegramBot.AnswerCallbackQueryOptions): Promise; editMessageText(text: string, options?: TelegramBot.EditMessageTextOptions): Promise; @@ -898,6 +914,10 @@ declare class TelegramBot extends EventEmitter { sendLocation(chatId: number | string, latitude: number, longitude: number, options?: TelegramBot.SendLocationOptions): Promise; + editMessageLiveLocation(latitude: number, longitude: number, options?: TelegramBot.EditMessageLiveLocationOptions): Promise; + + stopMessageLiveLocation(options?: TelegramBot.StopMessageLiveLocationOptions): Promise; + sendVenue(chatId: number | string, latitude: number, longitude: number, title: string, address: string, options?: TelegramBot.SendVenueOptions): Promise; sendContact(chatId: number | string, phoneNumber: string, firstName: string, options?: TelegramBot.SendContactOptions): Promise; @@ -906,6 +926,8 @@ declare class TelegramBot extends EventEmitter { getFileLink(fileId: string): Promise; + getFileStream(fileId: string): Readable; + downloadFile(fileId: string, downloadDir: string): Promise; onText(regexp: RegExp, callback: ((msg: TelegramBot.Message, match: RegExpExecArray | null) => void)): void; @@ -926,6 +948,10 @@ declare class TelegramBot extends EventEmitter { leaveChat(chatId: number | string): Promise; + setChatStickerSet(chatId: number | string, stickerSetName: string): Promise; + + deleteChatStickerSet(chatId: number | string): Promise; + sendGame(chatId: number | string, gameShortName: string, options?: TelegramBot.SendGameOptions): Promise; setGameScore(userId: string, score: number, options?: TelegramBot.SetGameScoreOptions): Promise; diff --git a/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts b/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts index 58d4fb8b7e..dcd8adc238 100644 --- a/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts +++ b/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts @@ -44,6 +44,7 @@ MyTelegramBot.setChatTitle(1234, 'Chat Title'); MyTelegramBot.setChatDescription(1234, 'Chat Description'); MyTelegramBot.pinChatMessage(1234, 'Pinned Message'); MyTelegramBot.unpinChatMessage(1234); +MyTelegramBot.answerCallbackQuery('432832'); MyTelegramBot.answerCallbackQuery({ callback_query_id: '432832' }); MyTelegramBot.editMessageText('test-text', { disable_web_page_preview: true }); MyTelegramBot.editMessageCaption('My Witty Caption', { message_id: 1245 }); @@ -52,10 +53,13 @@ MyTelegramBot.editMessageReplyMarkup({ inline_keyboard: [[{ }]] }, { message_id: 1244 }); MyTelegramBot.getUserProfilePhotos('myUserID', { limit: 10 }); MyTelegramBot.sendLocation(1234, 100, 200, { reply_to_message_id: 1234 }); +MyTelegramBot.editMessageLiveLocation(100, 200, { message_id: 1245 }); +MyTelegramBot.stopMessageLiveLocation({ message_id: 1245 }); MyTelegramBot.sendVenue(1234, 100, 200, 'Venue Title', '123 Fake St.', { reply_to_message_id: 1234 }); MyTelegramBot.sendContact(1234, '345-555-0192', 'John', { last_name: 'Smith' }); MyTelegramBot.getFile('My/File/ID'); MyTelegramBot.getFileLink('My/File/ID'); +MyTelegramBot.getFileStream('My/File/ID'); MyTelegramBot.downloadFile('My/File/ID', 'mydownloaddir/'); MyTelegramBot.onText(/regex/, (msg, match) => { }); MyTelegramBot.removeTextListener(/regex/); @@ -66,6 +70,8 @@ MyTelegramBot.getChatAdministrators(1234); MyTelegramBot.getChatMembersCount(1234); MyTelegramBot.getChatMember(1234, 'myUserID'); MyTelegramBot.leaveChat(1234); +MyTelegramBot.setChatStickerSet(1234, 'sticker'); +MyTelegramBot.deleteChatStickerSet(1234); MyTelegramBot.sendGame(1234, 'MygameName', { reply_to_message_id: 1234 }); MyTelegramBot.setGameScore('myUserID', 99, { message_id: 1234 }); MyTelegramBot.getGameHighScores('myUserID', { message_id: 1234 }); diff --git a/types/node/index.d.ts b/types/node/index.d.ts index def335cf3c..f7519cb076 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -2178,6 +2178,7 @@ declare module "child_process" { } export interface SpawnOptions { + argv0?: string; cwd?: string; env?: any; stdio?: any; @@ -2320,6 +2321,7 @@ declare module "child_process" { export function fork(modulePath: string, args?: ReadonlyArray, options?: ForkOptions): ChildProcess; export interface SpawnSyncOptions { + argv0?: string; cwd?: string; input?: string | Buffer; stdio?: any; diff --git a/types/node/node-tests.ts b/types/node/node-tests.ts index 52ec31af07..740ad1f61a 100644 --- a/types/node/node-tests.ts +++ b/types/node/node-tests.ts @@ -2097,8 +2097,10 @@ namespace child_process_tests { childProcess.exec("echo test"); childProcess.exec("echo test", { windowsHide: true }); childProcess.spawn("echo", ["test"], { windowsHide: true }); + childProcess.spawn("echo", ["test"], { windowsHide: true, argv0: "echo-test" }); childProcess.spawnSync("echo test"); childProcess.spawnSync("echo test", {windowsVerbatimArguments: false}); + childProcess.spawnSync("echo test", {windowsVerbatimArguments: false, argv0: "echo-test"}); } { diff --git a/types/nvd3/index.d.ts b/types/nvd3/index.d.ts index cd60da4b8d..7f92d2410e 100644 --- a/types/nvd3/index.d.ts +++ b/types/nvd3/index.d.ts @@ -1698,6 +1698,8 @@ id(value: number|string): this; valueFormat(): string; /*D3 Format object for the label of pie/donut, discrete bar and multibar charts.*/ valueFormat(value: string): this; + /*D3 Format object for the label of pie/donut, discrete bar and multibar charts.*/ + valueFormat(format: (d: any) => string): 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.*/ @@ -2649,6 +2651,8 @@ id(value: number|string): this; valueFormat(): string; /*D3 Format object for the label of pie/donut, discrete bar and multibar charts.*/ valueFormat(value: string): this; + /*D3 Format object for the label of pie/donut, discrete bar and multibar charts.*/ + valueFormat(format: (d: any) => string): this; /*.*/ valuePadding(): number; /**/ diff --git a/types/nvd3/test/discreteBarChart.ts b/types/nvd3/test/discreteBarChart.ts index 2f31a29a0c..d9c8998fb1 100644 --- a/types/nvd3/test/discreteBarChart.ts +++ b/types/nvd3/test/discreteBarChart.ts @@ -48,6 +48,7 @@ namespace nvd3_test_discreteBarChart { //.staggerLabels(historicalBarChart[0].values.length > 8) .showValues(true) .duration(250) + .valueFormat(d3.format("d")) ; d3.select('#chart1 svg') diff --git a/types/nvd3/test/multibarHorizontalChart.ts b/types/nvd3/test/multibarHorizontalChart.ts index 748c83e10a..5bfc5d976f 100644 --- a/types/nvd3/test/multibarHorizontalChart.ts +++ b/types/nvd3/test/multibarHorizontalChart.ts @@ -136,6 +136,7 @@ namespace nvd3_test_multibarHorizontalChart { .barColor(d3.scale.category20().range()) .duration(250) .margin({ left: 100 }) + .valueFormat(d3.format("d")) .stacked(true); chart.yAxis.tickFormat(d3.format(',.2f')); diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index c69e98cbaa..28ecfb162c 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -402,67 +402,104 @@ declare namespace Office { value: any; } /** - * Represents the runtime environment of the add-in and provides access to key objects of the API. - * - * @remarks - * Hosts: Access, Excel, Outlook, PowerPoint, Project, Word - */ + * Represents the runtime environment of the add-in and provides access to key objects of the API. + * + * @remarks + * Hosts: Access, Excel, Outlook, PowerPoint, Project, Word + */ interface Context { /** * Provides information and access to the signed-in user. */ auth: Auth; /** + * True, if the current platform allows the add-in to display a UI for selling or upgrading; otherwise returns False. + * + * @remarks + * The iOS App Store doesn't support apps with add-ins that provide links to additional payment systems. However, Office Add-ins running on the Windows desktop or for Office Online in the browser, do allow such links. If you want the UI of your add-in to provide a link to an external payment system on platforms other than iOS, you can use the commerceAllowed property to control when that link is displayed. + */ + commerceAllowed: boolean; + /** * Gets the locale (language) specified by the user for editing the document or item. */ contentLanguage: string; /** + * Gets information about the environment in which the add-in is running. + */ + diagnostics: ContextInformation; + /** * Gets the locale (language) specified by the user for the UI of the Office host application. + * @remarks + * When using in Outlook,the applicable modes are Compose or read. */ displayLanguage: string; /** - * + * Gets an object that represents the document the content or task pane add-in is interacting with. + */ + document: Document; + /** + * Contains the Office application host in which the add-in is running. + */ + host: HostType; + /** + * Gets the license information for the user's Office installation. */ license: string; + /** + * Provides access to the Outlook Add-in object model for Microsoft Outlook and Microsoft Outlook on the web. + * + * Namespaces: + * + * - diagnostics: Provides diagnostic information to an Outlook add-in. + * + * - item: Provides methods and properties for accessing a message or appointment in an Outlook add-in. + * + * - userProfile: Provides information about the user in an Outlook add-in. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * Minimum permission level: Restricted + * + * Applicable Outlook mode: Compose or read + */ + mailbox: Mailbox; /** * Provides access to the properties for Office theme colors. */ officeTheme: OfficeTheme; /** - * Provides access to the properties for Office theme colors. + * Provides the platform on which the add-in is running. + */ + platform: PlatformType; + /** + * Provides a method for determining what requirement sets are supported on the current host and platform. + */ + requirements: RequirementSetSupport; + /** + * Gets an object that represents the custom settings or state of a mail add-in saved to a user's mailbox. + * + * The RoamingSettings object lets you store and access data for a mail add-in that is stored in a user's mailbox, so that is available to that add-in when it is running from any host client application used to access that mailbox. + * + * [Api set: Mailbox 1.0] + * + * @remarks + * Minimum permission level: Restricted + * + * Applicable Outlook mode: Compose or read + */ + roamingSettings: RoamingSettings; + /** + * Specifies whether the platform and device allows touch interaction. + * + * @remarks + * Use the touchEnabled property to determine when your add-in is running on a touch device and if necessary, adjust the kind of controls, and size and spacing of elements in your add-in's UI to accommodate touch interactions. */ touchEnabled: boolean; /** * Provides objects and methods that you can use to create and manipulate UI components, such as dialog boxes. */ ui: UI; - /** - * Contains the host in which the add-in (web application) is running in. Possible values are: Word, Excel, PowerPoint - */ - host: HostType; - /** - * Provides the platform on which the add-in is running. Possible values are: PC, OfficeOnline, Mac, iOS, Android, Universal - */ - platform: PlatformType; - /** - * - */ - diagnostics: { - host: HostType; - platform: PlatformType; - version: string; - }; - /** - * Provides a method for determining what requirement sets are supported on the current host and platform. - */ - requirements: { - /** - * Check if the specified requirement set is supported by the host Office application. - * @param name - Set name; e.g., "MatrixBindings". - * @param minVersion - The minimum required version; e.g., "1.4". - */ - isSetSupported(name: string, minVersion?: number): boolean; - } } /** * Provides specific information about an error that occurred during an asynchronous data operation. @@ -587,6 +624,17 @@ declare namespace Office { */ closeContainer(): void; } + /** + * Provides information about what Requirement Sets are supported in current environment. + */ + interface RequirementSetSupport { + /** + * Check if the specified requirement set is supported by the host Office application. + * @param name - Set name; e.g., "MatrixBindings". + * @param minVersion - The minimum required version; e.g., "1.4". + */ + isSetSupported(name: string, minVersion?: number): boolean; +} /** * Provides options for how a dialog is displayed. */ @@ -650,7 +698,7 @@ declare namespace Office { asyncContext?: any } /** - * Provides an option for preserving, unchanged, context data of any type, for use in a callback, that might be changed by an asynchronous method. + * Provides an option for preserving context data of any type, unchanged, for use in a callback. */ interface AsyncContextOptions { /** @@ -658,6 +706,23 @@ declare namespace Office { */ asyncContext?: any } + /** + * Provides information about the environment in which the add-in is running. + */ + interface ContextInformation { + /** + * Gets the Office application host in which the add-in is running. + */ + host: Office.HostType; + /** + * Gets the platform on which the add-in is running. + */ + platform: Office.PlatformType; + /** + * Gets the version of Office on which the add-in is running. + */ + version: string; + } /** * Provides options for how to get the data in a binding. * @@ -757,7 +822,7 @@ declare namespace Office { format: object } /** - * Specifies a cell, or row, or column, by its zero-based row and/or column number. Example: {row: 4, column: 3} specifies the cell in the 3rd (zero-based) row in the 4th (zero-based) column. + * Specifies a cell, or row, or column, by its zero-based row and/or column number. Example: {row: 3, column: 4} specifies the cell in the 3rd (zero-based) row in the 4th (zero-based) column. */ interface RangeCoordinates { /** @@ -790,10 +855,6 @@ declare namespace Office { * The unique ID of the binding. Autogenerated if not supplied. */ id?: string - /** - * The names of the columns involved in the binding. - */ - columns?: Array /** * A user-defined item of any type that is returned, unchanged, in the value property of the AsyncResult object that is passed to a callback. */ @@ -814,7 +875,7 @@ declare namespace Office { /** * Specifies a table of sample data displayed in the prompt UI as an example of the kinds of fields (columns) that can be bound by your add-in. The headers provided in the TableData object specify the labels used in the field selection UI. Note: This parameter is used only in add-ins for Access. It is ignored if provided when calling the method in an add-in for Excel. */ - sampleData?: TableData + sampleData?: Office.TableData /** * A user-defined item of any type that is returned, unchanged, in the value property of the AsyncResult object that is passed to a callback. */ @@ -982,7 +1043,6 @@ declare namespace Office { * - DialogEventReceived. Triggered when the dialog box has been closed or otherwise unloaded. */ addEventHandler(eventType: Office.EventType, handler: Function): void; - } } @@ -1095,6 +1155,44 @@ declare namespace Office { */ ReadWrite } + /** + * Specifies the type of the XML node. + * + * @remarks + * Hosts: Word + * + * Available in Requirement set: CustomXmlParts + */ + enum CustomXMLNodeType { + /** + * The node is an attribute. + */ + Attribute, + /** + * The node is CData. + */ + CData, + /** + * The node is a comment. + */ + NodeComment, + /** + * The node is an element. + */ + Element, + /** + * The node is a Document element. + */ + NodeDocument, + /** + * The node is a processing instruction. + */ + ProcessingInstruction, + /** + * The node is text. + */ + Text, + } /** * Specifies the kind of event that was raised. Returned by the type property of an EventNameEventArgs object. * @@ -1238,12 +1336,6 @@ declare namespace Office { */ Index } - enum Index { - First, - Last, - Next, - Previous - } /** * Specifies whether to select (highlight) the location to navigate to (when using the Document.goToByIdAsync method). * @@ -1322,11 +1414,10 @@ declare namespace Office { * * @param eventType The event type. For example, for bindings, it can be **Office.EventType.BindingSelectionChanged**, **Office.EventType.BindingDataChanged**, or the corresponding text values of these enumerations. * @param handler The event handler function to add. - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - addHandlerAsync(eventType: EventType, handler: any, options?: any, callback?: (result: AsyncResult) => void): void; + addHandlerAsync(eventType: EventType, handler: any, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Returns the data contained within the binding. * @@ -1338,7 +1429,6 @@ declare namespace Office { * When called from a MatrixBinding or TableBinding, the getDataAsync method will return a subset of the bound values if the optional startRow, startColumn, rowCount, and columnCount parameters are specified (and they specify a contiguous and valid range). * * @param options Provides options for how to get the data in a binding. - * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ getDataAsync(options?: GetBindingDataOptions, callback?: (result: AsyncResult) => void): void; @@ -1461,11 +1551,10 @@ declare namespace Office { * * Available in Requirement set: MatrixBindings, TableBindings, TextBindings * - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - getAllAsync(options?: any, callback?: (result: AsyncResult) => void): void; + getAllAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Retrieves a binding based on its Name * @@ -1477,11 +1566,10 @@ declare namespace Office { * Fails if the specified id does not exist. * * @param id Specifies the unique name of the binding object. Required. - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - getByIdAsync(id: string, options?: any, callback?: (result: AsyncResult) => void): void; + getByIdAsync(id: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Removes the binding from the document * @@ -1493,23 +1581,10 @@ declare namespace Office { * Fails if the specified id does not exist. * * @param id Specifies the unique name to be used to identify the binding object. Required. - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - releaseByIdAsync(id: string, options?: any, callback?: (result: AsyncResult) => void): void; - } - /** - * Represents the runtime environment of the add-in and provides access to key objects of the API. - * - * @remarks - * Hosts: Access, Excel, Outlook, PowerPoint, Project, Word - */ - interface Context { - /** - * Gets an object that represents the document the content or task pane add-in is interacting with. - */ - document: Document; + releaseByIdAsync(id: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; } /** * Represents an XML node in a tree in a document. @@ -1556,11 +1631,10 @@ declare namespace Office { * Available in Requirement set: CustomXmlParts * * @param xPath The XPath expression that specifies the nodes to get. Required. - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - getNodesAsync(xPath: string, options?: any, callback?: (result: AsyncResult) => void): void; + getNodesAsync(xPath: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets the node value. * @@ -1569,11 +1643,10 @@ declare namespace Office { * * Available in Requirement set: CustomXmlParts * - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - getNodeValueAsync(options?: any, callback?: (result: AsyncResult) => void): void; + getNodeValueAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets the text of an XML node in a custom XML part. * @@ -1582,11 +1655,10 @@ declare namespace Office { * * Available in Requirement set: CustomXmlParts * - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - getTextAsync(options?: any, callback?: (result: AsyncResult) => void): void; + getTextAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Gets the node's XML. * @@ -1595,11 +1667,10 @@ declare namespace Office { * * Available in Requirement set: CustomXmlParts * - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - getXmlAsync(options?: any, callback?: (result: AsyncResult) => void): void; + getXmlAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Sets the node value. * @@ -1609,11 +1680,10 @@ declare namespace Office { * Available in Requirement set: CustomXmlParts * * @param value The value to be set on the node - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - setNodeValueAsync(value: string, options?: any, callback?: (result: AsyncResult) => void): void; + setNodeValueAsync(value: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously sets the text of an XML node in a custom XML part. * @@ -1623,11 +1693,10 @@ declare namespace Office { * Available in Requirement set: CustomXmlParts * * @param text Required. The text value of the XML node. - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - setTextAsync(text: string, options?: any, callback?: (result: AsyncResult) => void): void; + setTextAsync(text: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Sets the node XML. * @@ -1637,11 +1706,10 @@ declare namespace Office { * Available in Requirement set: CustomXmlParts * * @param xml The XML to be set on the node - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - setXmlAsync(xml: string, options?: any, callback?: (result: AsyncResult) => void): void; + setXmlAsync(xml: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; } /** * Represents a single CustomXMLPart in a CustomXMLParts collection. @@ -1689,11 +1757,10 @@ declare namespace Office { * * @param eventType Specifies the type of event to add. Required. For a CustomXmlPart object event, the eventType parameter can be specified as Office.EventType.DataNodeDeleted, Office.EventType.DataNodeInserted, Office.EventType.DataNodeReplaced, or the corresponding text values of these enumerations. * @param handler The event handler function to add, whose only parameter is of type NodeDeletedEventArgs, NodeInsertedEventArgs, or NodeReplaceEventArgs. Required. - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback.. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - addHandlerAsync(eventType: EventType, handler: (result: any) => void, options?: any, callback?: (result: AsyncResult) => void): void; + addHandlerAsync(eventType: EventType, handler: (result: any) => void, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Deletes the Custom XML Part. * @@ -1702,11 +1769,10 @@ declare namespace Office { * * Available in Requirement set: CustomXmlParts * - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - deleteAsync(options?: any, callback?: (result: AsyncResult) => void): void; + deleteAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets any CustomXmlNodes in this custom XML part which match the specified XPath. * @@ -1716,11 +1782,10 @@ declare namespace Office { * Available in Requirement set: CustomXmlParts * * @param xPath An XPath expression that specifies the nodes you want returned. Required. - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - getNodesAsync(xPath: string, options?: any, callback?: (result: AsyncResult) => void): void; + getNodesAsync(xPath: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the XML inside this custom XML part. * @@ -1729,11 +1794,10 @@ declare namespace Office { * * Available in Requirement set: CustomXmlParts * - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - getXmlAsync(options?: any, callback?: (result: AsyncResult) => void): void; + getXmlAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Removes an event handler for the specified event type. * @@ -1766,11 +1830,10 @@ declare namespace Office { * Available in Requirement set: CustomXmlParts * * @param xml The XML to add to the newly created custom XML part. - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - addAsync(xml: string, options?: any, callback?: (result: AsyncResult) => void): void; + addAsync(xml: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the specified custom XML part by its id. * @@ -1780,11 +1843,10 @@ declare namespace Office { * Available in Requirement set: CustomXmlParts * * @param id The GUID of the custom XML part, including opening and closing braces. - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback.. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - getByIdAsync(id: string, options?: any, callback?: (result: AsyncResult) => void): void; + getByIdAsync(id: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the specified custom XML part(s) by its namespace. * @@ -1794,11 +1856,10 @@ declare namespace Office { * Available in Requirement set: CustomXmlParts * * @param ns The namespace URI. - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - getByNamespaceAsync(ns: string, options?: any, callback?: (result: AsyncResult) => void): void; + getByNamespaceAsync(ns: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; } /** * Represents a collection of CustomXmlPart objects. @@ -1819,11 +1880,10 @@ declare namespace Office { * * @param prefix Specifies the prefix to add to the prefix mapping list. Required. * @param ns Specifies the namespace URI to assign to the newly added prefix. Required. - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - addNamespaceAsync(prefix: string, ns: string, options?: any, callback?: (result: AsyncResult) => void): void; + addNamespaceAsync(prefix: string, ns: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the namespace mapped to the specified prefix. * @@ -1835,11 +1895,10 @@ declare namespace Office { * If the prefix already exists in the namespace manager, this method will overwrite the mapping of that prefix except when the prefix is one added or used by the data store internally, in which case it will return an error. * * @param prefix TSpecifies the prefix to get the namespace for. Required. - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - getNamespaceAsync(prefix: string, options?: any, callback?: (result: AsyncResult) => void): void; + getNamespaceAsync(prefix: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Asynchronously gets the prefix for the specified namespace. * @@ -1851,11 +1910,10 @@ declare namespace Office { * If no prefix is assigned to the requested namespace, the method returns an empty string (""). If there are multiple prefixes specified in the namespace manager, the method returns the first prefix that matches the supplied namespace. * * @param ns Specifies the namespace to get the prefix for. Required. - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - getPrefixAsync(ns: string, options?: any, callback?: (result: AsyncResult) => void): void; + getPrefixAsync(ns: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; } /** * An abstract class that represents the document the add-in is interacting with. @@ -1913,10 +1971,10 @@ declare namespace Office { * * @param eventType For a Document object event, the eventType parameter can be specified as Office.EventType.Document.SelectionChanged or Office.EventType.Document.ActiveViewChanged, or the corresponding text value of this enumeration. * @param handler The event handler function to add, whose only parameter is of type DocumentSelectionChangedEventArgs. Required. - * @param options An object like {asyncContext:context} where `context` is a user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - addHandlerAsync(eventType: EventType, handler: any, options?: any, callback?: (result: AsyncResult) => void): void; + addHandlerAsync(eventType: EventType, handler: any, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Returns the state of the current view of the presentation (edit or read). * @@ -1927,10 +1985,10 @@ declare namespace Office { * * Can trigger an event when the view changes. * - * @param options An object like {asyncContext:context} where `context` is a user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback.. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - getActiveViewAsync(options?: any, callback?: (result: AsyncResult) => void): void; + getActiveViewAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Returns the entire document file in slices of up to 4194304 bytes (4 MB). For add-ins for iOS, file slice is supported up to 65536 (64 KB). Note that specifying file slice size of above permitted limit will result in an "Internal Error" failure. * @@ -1966,10 +2024,10 @@ declare namespace Office { * * You get the file's URL with the url property ( asyncResult.value.url). * - * @param options An object like {asyncContext:context} where `context` is a user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - getFilePropertiesAsync(options?: any, callback?: (result: AsyncResult) => void): void; + getFilePropertiesAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Reads the data contained in the current selection in the document. * @@ -2061,6 +2119,60 @@ declare namespace Office { * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ setSelectedDataAsync(data: string | TableData | any[][], options?: SetSelectedDataOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get Project field (Ex. ProjectWebAccessURL). + * @param fieldId Project level fields. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + */ + getProjectFieldAsync(fieldId: number, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get resource field for provided resource Id. (Ex.ResourceName) + * @param resourceId Either a string or value of the Resource Id. + * @param fieldId Resource Fields. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + */ + getResourceFieldAsync(resourceId: string, fieldId: number, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the current selected Resource's Id. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + */ + getSelectedResourceAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the current selected Task's Id. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + */ + getSelectedTaskAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the current selected View Type (Ex. Gantt) and View Name. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + */ + getSelectedViewAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the Task Name, WSS Task Id, and ResourceNames for given taskId. + * @param taskId Either a string or value of the Task Id. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + */ + getTaskAsync(taskId: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get task field for provided task Id. (Ex. StartDate). + * @param taskId Either a string or value of the Task Id. + * @param fieldId Task Fields. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + */ + getTaskFieldAsync(taskId: string, fieldId: number, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; + /** + * Project documents only. Get the WSS Url and list name for the Tasks List, the MPP is synced too. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. + * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + */ + getWSSUrlAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; } /** * Provides information about the document that raised the SelectionChanged event. @@ -2437,11 +2549,10 @@ declare namespace Office { * Additional remark for Excel Online: The total number of cells in the TableData object passed to the data parameter can't exceed 20,000 in a single call to this method. * * @param tableData An array of arrays ("matrix") or a TableData object that contains one or more columns of data to add to the table. Required. - * @param options Syntax example: {asyncContext:context} - * asyncContext: A user-defined item of any type that is returned in the AsyncResult object without being altered. + * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. */ - addColumnsAsync(tableData: TableData | any[][], options?: any, callback?: (result: AsyncResult) => void): void; + addColumnsAsync(tableData: TableData | any[][], options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Adds the specified data to the table as additional rows. * @@ -4692,63 +4803,6 @@ declare namespace Office { */ Timeline } - // Objects - interface Document { - /** - * Get Project field (Ex. ProjectWebAccessURL). - * @param fieldId Project level fields. - * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. - * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. - */ - getProjectFieldAsync(fieldId: number, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; - /** - * Get resource field for provided resource Id. (Ex.ResourceName) - * @param resourceId Either a string or value of the Resource Id. - * @param fieldId Resource Fields. - * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. - * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. - */ - getResourceFieldAsync(resourceId: string, fieldId: number, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; - /** - * Get the current selected Resource's Id. - * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. - * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. - */ - getSelectedResourceAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; - /** - * Get the current selected Task's Id. - * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. - * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. - */ - getSelectedTaskAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; - /** - * Get the current selected View Type (Ex. Gantt) and View Name. - * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. - * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. - */ - getSelectedViewAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; - /** - * Get the Task Name, WSS Task Id, and ResourceNames for given taskId. - * @param taskId Either a string or value of the Task Id. - * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. - * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. - */ - getTaskAsync(taskId: string, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; - /** - * Get task field for provided task Id. (Ex. StartDate). - * @param taskId Either a string or value of the Task Id. - * @param fieldId Task Fields. - * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. - * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. - */ - getTaskFieldAsync(taskId: string, fieldId: number, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; - /** - * Get the WSS Url and list name for the Tasks List, the MPP is synced too. - * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. - * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. - */ - getWSSUrlAsync(options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; - } } @@ -6088,61 +6142,6 @@ declare namespace Office { */ urls: Array; } - /** - * The Office.context namespace provides shared interfaces that are used by add-ins in all of the Office apps. This listing documents only those interfaces that are used by Outlook add-ins. - * - * [Api set: Mailbox 1.0] - * - * @remarks - * For a full listing of the Office.context namespace, see the [Office.context reference in the Shared API](https://dev.office.com/reference/add-ins/shared/office.context.htm). - * - * Applicable Outlook mode: Compose or read - */ - interface Context { - /** - * Gets the locale (language) in RFC 1766 Language tag format specified by the user for the UI of the Office host application. - * - * The displayLanguage value reflects the current Display Language setting specified with File > Options > Language in the Office host application. - * - * [Api set: Mailbox 1.0] - * - * @remarks - * Applicable Outlook mode: Compose or read - */ - displayLanguage: string; - /** - * Provides access to the Outlook Add-in object model for Microsoft Outlook and Microsoft Outlook on the web. - * - * Namespaces: - * - * - diagnostics: Provides diagnostic information to an Outlook add-in. - * - * - item: Provides methods and properties for accessing a message or appointment in an Outlook add-in. - * - * - userProfile: Provides information about the user in an Outlook add-in. - * - * [Api set: Mailbox 1.0] - * - * @remarks - * Minimum permission level: Restricted - * - * Applicable Outlook mode: Compose or read - */ - mailbox: Mailbox; - /** - * Gets an object that represents the custom settings or state of a mail add-in saved to a user's mailbox. - * - * The RoamingSettings object lets you store and access data for a mail add-in that is stored in a user's mailbox, so that is available to that add-in when it is running from any host client application used to access that mailbox. - * - * [Api set: Mailbox 1.0] - * - * @remarks - * Minimum permission level: Restricted - * - * Applicable Outlook mode: Compose or read - */ - roamingSettings: RoamingSettings; - } /** * The CustomProperties object represents custom properties that are specific to a particular item and specific to a mail add-in for Outlook. For example, there might be a need for a mail add-in to save some data that is specific to the current email message that activated the add-in. If the user revisits the same message in the future and activates the mail add-in again, the add-in will be able to retrieve the data that had been saved as custom properties. * @@ -8345,11 +8344,10 @@ declare namespace Office { * * @param eventType The event that should invoke the handler. * @param handler The function to handle the event. The function must accept a single parameter, which is an object literal. The type property on the parameter will match the eventType parameter passed to addHandlerAsync. - * @param options Optional. An object literal that contains one or more of the following properties. - * asyncContext: Developers can provide any object they wish to access in the callback method. + * @param options Optional. Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type AsyncResult. */ - addHandlerAsync(eventType: Office.EventType, handler: (type: Office.EventType) => void, options?: any, callback?: (result: AsyncResult) => void): void; + addHandlerAsync(eventType: Office.EventType, handler: (type: Office.EventType) => void, options?: AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Converts an item ID formatted for REST into EWS format. * @@ -11312,15 +11310,11 @@ declare namespace Excel { * Copy a worksheet and place it at the specified position. Return the copied worksheet. * * [Api set: ExcelApi 1.7] + * + * @param positionType Specifies where to put the copy relative to the worksheet specified in relativeTo param. Can be Excel.WorksheetPositionType or string equivalent. Must not be Excel.WorksheetPositionType.none or "None". + * @param relativeTo Specifies the worksheet that is the basis for intepreting the positionType param. If not specified, the worksheet on which the copy() is called is assumed. */ - copy(positionType?: Excel.WorksheetPositionType, relativeTo?: Excel.Worksheet): Excel.Worksheet; - /** - * - * Copy a worksheet and place it at the specified position. Return the copied worksheet. - * - * [Api set: ExcelApi 1.7] - */ - copy(positionType?: "None" | "Before" | "After" | "Beginning" | "End", relativeTo?: Excel.Worksheet): Excel.Worksheet; + copy(positionType?: Excel.WorksheetPositionType | string, relativeTo?: Excel.Worksheet): Excel.Worksheet; /** * * Deletes the worksheet from the workbook. diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts index 689214138b..d16a80818a 100644 --- a/types/plotly.js/index.d.ts +++ b/types/plotly.js/index.d.ts @@ -397,6 +397,7 @@ export interface ScatterData { 'z+x' | 'z+x+text' | 'z+x+name' | 'z+y+x' | 'z+y+x+text' | 'z+y+x+name' | 'z+x+y' | 'z+x+y+text' | 'z+x+y+name'; + hoverlabel: Partial