diff --git a/types/accounting/accounting-tests.ts b/types/accounting/accounting-tests.ts
index a397c559eb..41150f7a37 100644
--- a/types/accounting/accounting-tests.ts
+++ b/types/accounting/accounting-tests.ts
@@ -3,6 +3,9 @@
// Default usage:
accounting.formatMoney(12345678); // $12,345,678.00
+// Stringified usage:
+accounting.formatMoney('$4394958309392.9401'); // $4,394,958,309,392.94
+
// European formatting (custom symbol and separators), could also use options object as second param:
accounting.formatMoney(4999.99, "€", 2, ".", ","); // €4.999,99
diff --git a/types/accounting/index.d.ts b/types/accounting/index.d.ts
index ef8991999f..9a990a6519 100644
--- a/types/accounting/index.d.ts
+++ b/types/accounting/index.d.ts
@@ -1,6 +1,7 @@
-// Type definitions for accounting.js 0.3
-// Project: http://josscrowcroft.github.io/accounting.js/
+// Type definitions for accounting.js 0.4
+// Project: http://openexchangerates.github.io/accounting.js/
// Definitions by: Sergey Gerasimov
+// Christopher Eck
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace accounting {
@@ -30,9 +31,9 @@ declare namespace accounting {
}
interface Static {
- // format any number into currency
- formatMoney(number: number, symbol?: string, precision?: number, thousand?: string, decimal?: string, format?: string): string;
- formatMoney(number: number, options: CurrencySettings | CurrencySettings): string;
+ // format any number or stringified number into currency
+ formatMoney(number: number | string, symbol?: string, precision?: number, thousand?: string, decimal?: string, format?: string): string;
+ formatMoney(number: number | string, options: CurrencySettings | CurrencySettings): string;
formatMoney(numbers: number[], symbol?: string, precision?: number, thousand?: string, decimal?: string, format?: string): string[];
formatMoney(numbers: number[], options: CurrencySettings | CurrencySettings): string[];
diff --git a/types/alt/index.d.ts b/types/alt/index.d.ts
index f0ea3ba008..2d4c6e259f 100644
--- a/types/alt/index.d.ts
+++ b/types/alt/index.d.ts
@@ -2,7 +2,7 @@
// Project: https://github.com/goatslacker/alt
// Definitions by: Michael Shearer
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-// TypeScript Version: 2.1
+// TypeScript Version: 2.3
///
@@ -141,7 +141,7 @@ declare module "alt/utils/chromeDebug" {
declare module "alt/AltContainer" {
- import React = require("react");
+ import * as React from "react";
interface ContainerProps {
store?:AltJS.AltStore;
@@ -152,7 +152,7 @@ declare module "alt/AltContainer" {
flux?:AltJS.Alt;
transform?:(store:AltJS.AltStore, actions:any) => any;
shouldComponentUpdate?:(props:any) => boolean;
- component?:React.Component;
+ component?:React.Component;
}
type AltContainer = React.ReactElement;
diff --git a/types/amqplib/index.d.ts b/types/amqplib/index.d.ts
index a6e5aec204..45b5e6e3ca 100644
--- a/types/amqplib/index.d.ts
+++ b/types/amqplib/index.d.ts
@@ -2,6 +2,7 @@
// Project: https://github.com/squaremo/amqp.node
// Definitions by: Michael Nahkies , Ab Reitsma , Nicolás Fantone
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.3
///
diff --git a/types/angular-block-ui/index.d.ts b/types/angular-block-ui/index.d.ts
index bf311b04a1..7733bc72f7 100644
--- a/types/angular-block-ui/index.d.ts
+++ b/types/angular-block-ui/index.d.ts
@@ -2,6 +2,7 @@
// Project: https://github.com/McNull/angular-block-ui
// Definitions by: Lasse Nørregaard , Stephan Classen
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.3
import * as angular from "angular";
diff --git a/types/angular-gridster/index.d.ts b/types/angular-gridster/index.d.ts
index 272470bc6f..3d4fbbe799 100644
--- a/types/angular-gridster/index.d.ts
+++ b/types/angular-gridster/index.d.ts
@@ -2,6 +2,7 @@
// Project: https://github.com/ManifestWebDesign/angular-gridster
// Definitions by: Joao Monteiro
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.3
import * as angular from "angular";
diff --git a/types/angular-oauth2/index.d.ts b/types/angular-oauth2/index.d.ts
index 23df762df1..1c5e3ac6ed 100644
--- a/types/angular-oauth2/index.d.ts
+++ b/types/angular-oauth2/index.d.ts
@@ -2,6 +2,7 @@
// Project: https://github.com/oauthjs/angular-oauth2
// Definitions by: Antério Vieira
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.3
import * as angular from 'angular';
diff --git a/types/angular/angular-tests.ts b/types/angular/angular-tests.ts
index d77c18fa37..80b73c062a 100644
--- a/types/angular/angular-tests.ts
+++ b/types/angular/angular-tests.ts
@@ -337,6 +337,16 @@ namespace TestQ {
let result: angular.IPromise<{a: number; b: string; }>;
result = $q.all<{a: number; b: string; }>({a: promiseAny, b: promiseAny});
}
+ {
+ let result = $q.all({ num: $q.when(2), str: $q.when('test') });
+ // TS should infer that num is a number and str is a string
+ result.then(r => (r.num * 2) + r.str.indexOf('s'));
+ }
+ {
+ let result = $q.all({ num: $q.when(2), str: 'test' });
+ // TS should infer that num is a number and str is a string
+ result.then(r => (r.num * 2) + r.str.indexOf('s'));
+ }
// $q.defer
{
@@ -367,8 +377,7 @@ namespace TestQ {
let result: angular.IPromise;
result = $q.resolve(tResult);
result = $q.resolve(promiseTResult);
- result = $q.resolve(Math.random() > 0.5 ? tResult : promiseTOther);
- result = $q.resolve(Math.random() > 0.5 ? tResult : promiseTOther);
+ let result2: angular.IPromise = $q.resolve(Math.random() > 0.5 ? tResult : promiseTOther);
}
// $q.when
@@ -378,7 +387,8 @@ namespace TestQ {
}
{
let result: angular.IPromise;
- let resultOther: angular.IPromise;
+ let other: angular.IPromise;
+ let resultOther: angular.IPromise;
result = $q.when(tResult);
result = $q.when(promiseTResult);
@@ -388,20 +398,21 @@ namespace TestQ {
result = $q.when(tValue, (result: TValue) => tResult, (any) => any, (any) => any);
result = $q.when(promiseTValue, (result: TValue) => tResult);
- result = resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => tOther);
- result = resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => tOther, (any) => any);
- result = resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => promiseTOther);
- result = resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => promiseTOther, (any) => any);
+ resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => tOther);
+ resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => tOther);
+ resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => tOther, (any) => any);
+ resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => promiseTOther);
+ resultOther = $q.when(promiseTValue, (result: TValue) => tResult, (any) => promiseTOther, (any) => any);
result = $q.when(tValue, (result: TValue) => promiseTResult);
result = $q.when(tValue, (result: TValue) => promiseTResult, (any) => any);
result = $q.when(tValue, (result: TValue) => promiseTResult, (any) => any, (any) => any);
result = $q.when(promiseTValue, (result: TValue) => promiseTResult);
- result = resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => tOther);
- result = resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => tOther, (any) => any);
- result = resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => promiseTOther);
- result = resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => promiseTOther, (any) => any);
+ resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => tOther);
+ resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => tOther, (any) => any);
+ resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => promiseTOther);
+ resultOther = $q.when(promiseTValue, (result: TValue) => promiseTResult, (any) => promiseTOther, (any) => any);
}
}
@@ -547,7 +558,7 @@ namespace TestPromise {
assertPromiseType(promise.then((result) => result, (any) => any, (any) => any));
assertPromiseType(promise.then((result) => result, (any) => reject, (any) => any));
- assertPromiseType(promise.then((result) => anyOf2(reject, result)));
+ assertPromiseType | TResult>(promise.then((result) => anyOf2(reject, result)));
assertPromiseType(promise.then((result) => anyOf3(result, tresultPromise, reject)));
assertPromiseType(promise.then(
(result) => anyOf3(reject, result, tresultPromise),
@@ -557,7 +568,7 @@ namespace TestPromise {
assertPromiseType>(promise.then((result) => tresultHttpPromise));
assertPromiseType(promise.then((result) => result, (any) => tother));
- assertPromiseType(promise.then(
+ assertPromiseType | angular.IPromise | TOther | angular.IPromise>(promise.then(
(result) => anyOf3(reject, result, totherPromise),
(reason) => anyOf3(reject, tother, tresultPromise)
));
@@ -588,7 +599,7 @@ namespace TestPromise {
assertPromiseType(promise.catch((err) => err));
assertPromiseType(promise.catch((err) => any));
assertPromiseType(promise.catch((err) => tresult));
- assertPromiseType(promise.catch((err) => anyOf2(tresult, reject)));
+ assertPromiseType>(promise.catch((err) => anyOf2(tresult, reject)));
assertPromiseType(promise.catch((err) => anyOf3(tresult, tresultPromise, reject)));
assertPromiseType(promise.catch((err) => tresultPromise));
assertPromiseType>(promise.catch((err) => tresultHttpPromise));
diff --git a/types/angular/index.d.ts b/types/angular/index.d.ts
index d0e2d978dc..fe78ba03ff 100644
--- a/types/angular/index.d.ts
+++ b/types/angular/index.d.ts
@@ -1029,8 +1029,7 @@ declare namespace angular {
*
* @param promises A hash of promises.
*/
- all(promises: { [id: string]: IPromise; }): IPromise<{ [id: string]: any; }>;
- all(promises: { [id: string]: IPromise; }): IPromise;
+ all(promises: { [K in keyof T]: (IPromise | T[K]); }): IPromise;
/**
* Creates a Deferred object which represents a task which will finish in the future.
*/
@@ -1049,6 +1048,10 @@ declare namespace angular {
* @param value Value or a promise
*/
resolve(value: IPromise|T): IPromise;
+ /**
+ * @deprecated Since TS 2.4, inference is stricter and no longer produces the desired type when T1 !== T2.
+ * To use resolve with two different types, pass a union type to the single-type-argument overload.
+ */
resolve(value: IPromise|T2): IPromise;
/**
* Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
@@ -1846,6 +1849,10 @@ declare namespace angular {
* different in Angular 1 there is no direct mapping and care should be taken when upgrading.
*/
$postLink?(): void;
+
+ // IController implementations frequently do not implement any of its methods.
+ // A string indexer indicates to TypeScript not to issue a weak type error in this case.
+ [s: string]: any;
}
/**
diff --git a/types/anydb-sql-migrations/index.d.ts b/types/anydb-sql-migrations/index.d.ts
index 5db740c70f..ae922c37ae 100644
--- a/types/anydb-sql-migrations/index.d.ts
+++ b/types/anydb-sql-migrations/index.d.ts
@@ -2,6 +2,7 @@
// Project: https://github.com/spion/anydb-sql-migrations
// Definitions by: Gorgi Kosev
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.3
import Promise = require('bluebird');
import { Column, Table, Transaction, AnydbSql } from 'anydb-sql';
diff --git a/types/aphrodite/aphrodite-tests.tsx b/types/aphrodite/aphrodite-tests.tsx
index f3c51f899e..685a9a4283 100644
--- a/types/aphrodite/aphrodite-tests.tsx
+++ b/types/aphrodite/aphrodite-tests.tsx
@@ -39,7 +39,7 @@ const withFont = StyleSheet.create({
});
-class App extends React.Component<{}, {}> {
+class App extends React.Component {
render() {
return
diff --git a/types/aphrodite/index.d.ts b/types/aphrodite/index.d.ts
index 63eba46927..0e04b07af7 100644
--- a/types/aphrodite/index.d.ts
+++ b/types/aphrodite/index.d.ts
@@ -2,7 +2,7 @@
// Project: https://github.com/Khan/aphrodite
// Definitions by: Alexey Svetliakov
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-// TypeScript Version: 2.1
+// TypeScript Version: 2.3
import * as React from "react";
diff --git a/types/asana/index.d.ts b/types/asana/index.d.ts
index 364980b66c..ede3bc99f9 100644
--- a/types/asana/index.d.ts
+++ b/types/asana/index.d.ts
@@ -2,6 +2,7 @@
// Project: https://github.com/Asana/node-asana
// Definitions by: Qubo
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.3
///
diff --git a/types/askmethat-rating/askmethat-rating-tests.ts b/types/askmethat-rating/askmethat-rating-tests.ts
new file mode 100644
index 0000000000..2f17ad0b62
--- /dev/null
+++ b/types/askmethat-rating/askmethat-rating-tests.ts
@@ -0,0 +1,15 @@
+import { AskmethatRating, AskmethatRatingSteps } from "askmethat-rating";
+
+let options = {
+ backgroundColor: "#e5e500",
+ hoverColor: "#ffff66",
+ fontClass: "fa fa-star",
+ minRating: 1,
+ maxRating: 5,
+ readonly: false,
+ step: AskmethatRatingSteps["OnePerOneStep"],
+ inputName: "AskmethatRating"
+};
+
+let div = document.createElement("div");
+let amcRating = new AskmethatRating(div, 2 , options);
diff --git a/types/askmethat-rating/index.d.ts b/types/askmethat-rating/index.d.ts
new file mode 100644
index 0000000000..ff31f81747
--- /dev/null
+++ b/types/askmethat-rating/index.d.ts
@@ -0,0 +1,131 @@
+// Type definitions for askmethat-rating 0.3
+// Project: https://alexteixeira.github.io/Askmethat-Rating/
+// Definitions by: Alexandre Teixeira
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.3
+
+export enum AskmethatRatingSteps {
+ /**
+ * Step 0.1 per 0.1
+ */
+ DecimalStep = 0,
+ /**
+ * Step 0.5 per 0.5
+ */
+ HalfStep = 1,
+ /**
+ * Step 1 per 1
+ */
+ OnePerOneStep = 2,
+}
+export interface AskmethatRatingOptions {
+ hoverColor?: string;
+ /**
+ * Color when the rating is not hovered
+ */
+ backgroundColor?: string;
+ /**
+ * Mininmum rating that the user can set
+ */
+ minRating?: number;
+ /**
+ * Maximum rating that the plugin display
+ */
+ maxRating?: number;
+ /**
+ * Class to display as rating (FontAwesome or Rating for exemple)
+ */
+ fontClass: string;
+ /**
+ * Set the rating to readonly
+ */
+ readonly: boolean;
+ /**
+ * The stepping for the rating
+ */
+ step: AskmethatRatingSteps;
+ /**
+ * Input name (Default is AskmethatRating)
+ */
+ inputName: string;
+}
+export class AskmethatRating {
+ private parentElement;
+ private pValue;
+ private styleSheet;
+ private changeEvent;
+ private ratingClick;
+ private mouseMove;
+ /**
+ * @function get the current value for the rating
+ */
+ /**
+ * @function set a new value for the rating
+ *
+ * @param _value this is the new value you want to set to the rating
+ * @returns the current number
+ */
+ value: number;
+ /**
+ * Default option base on @type IAskmethatRatingOptions
+ */
+ private _defaultOptions;
+ /**
+ * @function get the default option for the rating
+ *
+ * @return options based on @type AskmethatRatingOptions
+ */
+ readonly defaultOptions: any;
+ /**
+ * constructor with div element, default rating value & default options
+ *
+ * @param element This is the html container for the rating elements
+ * @param defaultValue Default value set when the plugin render the rating
+ * @param options Default option base on AskmethatRatingOptions type
+ */
+ constructor(element: HTMLDivElement, defaultValue?: number, options?: any);
+ /**
+ * render a new rating, by default value is the minRating
+ *
+ * @param value this is the default value set when the plugin is rendered, by default IAskmethatRatingOptions.minRating
+ */
+ render(value?: number): void;
+ /**
+ * @function when a rating is clicked
+ * @param {type} event : Event {event object}
+ */
+ private onRatingClick(event?);
+ /**
+ * @function Calculate the value according to the step provided in options
+ * @param {Number} value:number the current value
+ * @return {Number} the new value according to step
+ */
+ protected getValueAccordingToStep(value: number): number;
+ /**
+ * @function mouse event enter in rating
+ * @param {type} event?: Event {event}
+ */
+ private onMouseMove(event?);
+ /**
+ * @function mouse out event in rating
+ * @param {type} event?: Event {event}
+ */
+ private onMouseLeave(event?);
+ /**
+ * @function set or unset the active class and color
+ * @param {HTMLSpanElement} current : current span element
+ * @param {number} current : value needed for the if
+ */
+ protected setOrUnsetActive(value: number): void;
+ /**
+ * Check if disabled attribute is added or removed from the input
+ * Update readonly status if needed for the rating
+ */
+ private mutationEvent();
+ /**
+ * @function static method to retrieve with identifier the value
+ * @param {string} identifier: string container identifier
+ * @return {number} current rating
+ */
+ static value(identifier: string): number;
+}
diff --git a/types/askmethat-rating/tsconfig.json b/types/askmethat-rating/tsconfig.json
new file mode 100644
index 0000000000..fd5ef4ae50
--- /dev/null
+++ b/types/askmethat-rating/tsconfig.json
@@ -0,0 +1,23 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "lib": [
+ "es6",
+ "dom"
+ ],
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": true,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "askmethat-rating-tests.ts"
+ ]
+}
diff --git a/types/askmethat-rating/tslint.json b/types/askmethat-rating/tslint.json
new file mode 100644
index 0000000000..3db14f85ea
--- /dev/null
+++ b/types/askmethat-rating/tslint.json
@@ -0,0 +1 @@
+{ "extends": "dtslint/dt.json" }
diff --git a/types/assert-equal-jsx/index.d.ts b/types/assert-equal-jsx/index.d.ts
index 5deb9ede36..f571020ef8 100644
--- a/types/assert-equal-jsx/index.d.ts
+++ b/types/assert-equal-jsx/index.d.ts
@@ -2,7 +2,7 @@
// Project: https://github.com/thejameskyle/assert-equal-jsx
// Definitions by: Josh Toft
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-// TypeScript Version: 2.2
+// TypeScript Version: 2.3
import * as React from 'react';
diff --git a/types/audiosprite/audiosprite-tests.ts b/types/audiosprite/audiosprite-tests.ts
new file mode 100644
index 0000000000..a3f400d454
--- /dev/null
+++ b/types/audiosprite/audiosprite-tests.ts
@@ -0,0 +1,26 @@
+import * as audiosprite from 'audiosprite';
+
+const files = ['file1.mp3', 'file2.mp3'];
+const opts = {output: 'result'};
+
+audiosprite(files, opts, (err, obj) => {
+ if (err) {
+ return err;
+ }
+
+ return JSON.stringify(obj, null, 2);
+});
+
+audiosprite(files, {
+ path: "aaa",
+ format: "howler",
+ export: "ogg,mp3",
+ minlength: 9999,
+ vbr: 9,
+ 'vbr:vorbis': 10,
+ logger: {
+ debug(a) {
+ }
+ }
+}, (err, obj) => {
+});
diff --git a/types/audiosprite/index.d.ts b/types/audiosprite/index.d.ts
new file mode 100644
index 0000000000..c1738386d6
--- /dev/null
+++ b/types/audiosprite/index.d.ts
@@ -0,0 +1,55 @@
+// Type definitions for audiosprite 0.6
+// Project: https://github.com/tonistiigi/audiosprite
+// Definitions by: Gyusun Yeom
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+export as namespace audiosprite;
+export = audiosprite;
+
+declare function audiosprite(files: string[], callback: (error: Error, obj: audiosprite.Result) => void): void;
+declare function audiosprite(files: string[], option: audiosprite.Option, callback: (error: Error, obj: audiosprite.Result) => void): void;
+
+declare namespace audiosprite {
+ type ExportType = "jukebox" | "howler" | "createjs" | null;
+ type LogLevel = "debug" | "info" | "notice" | "warning" | "error";
+ type VBR = -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
+ type VBR_Vorbis = VBR | 10;
+ type Channels = 1 | 2;
+ interface Option {
+ output?: string;
+ path?: string;
+ export?: string;
+ format?: ExportType;
+ log?: LogLevel;
+ autoplay?: string | null;
+ loop?: string[];
+ silence?: number;
+ gap?: number;
+ minlength?: number;
+ bitrate?: number;
+ vbr?: VBR;
+ 'vbr:vorbis'?: VBR_Vorbis;
+ samplerate?: number;
+ channels?: Channels;
+ rawparts?: string;
+ logger?: Logger;
+ }
+
+ interface Logger {
+ debug?(...log: any[]): void;
+ info?(...log: any[]): void;
+ log?(...log: any[]): void;
+ }
+
+ interface Result {
+ resources: string[];
+ spritemap: {
+ [key: string]: {
+ start: number;
+ end: number;
+ loop: boolean;
+ }
+ };
+ autoplay?: string;
+ }
+}
diff --git a/types/audiosprite/tsconfig.json b/types/audiosprite/tsconfig.json
new file mode 100644
index 0000000000..7348d046e8
--- /dev/null
+++ b/types/audiosprite/tsconfig.json
@@ -0,0 +1,22 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "lib": [
+ "es6"
+ ],
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "strictNullChecks": true,
+ "baseUrl": "../",
+ "typeRoots": [
+ "../"
+ ],
+ "types": [],
+ "noEmit": true,
+ "forceConsistentCasingInFileNames": true
+ },
+ "files": [
+ "index.d.ts",
+ "audiosprite-tests.ts"
+ ]
+}
diff --git a/types/audiosprite/tslint.json b/types/audiosprite/tslint.json
new file mode 100644
index 0000000000..3db14f85ea
--- /dev/null
+++ b/types/audiosprite/tslint.json
@@ -0,0 +1 @@
+{ "extends": "dtslint/dt.json" }
diff --git a/types/auth0-js/index.d.ts b/types/auth0-js/index.d.ts
index e44092a9c8..4e6afded1d 100644
--- a/types/auth0-js/index.d.ts
+++ b/types/auth0-js/index.d.ts
@@ -650,8 +650,9 @@ interface RenewAuthOptions {
interface AuthorizeOptions {
domain?: string;
clientID?: string;
- redirectUri: string;
- responseType: string;
+ connection?:string;
+ redirectUri?: string;
+ responseType?: string;
responseMode?: string;
state?: string;
nonce?: string;
diff --git a/types/auth0/auth0-tests.ts b/types/auth0/auth0-tests.ts
index 24a4aad87d..b84e92e223 100644
--- a/types/auth0/auth0-tests.ts
+++ b/types/auth0/auth0-tests.ts
@@ -28,6 +28,42 @@ management
// Handle the error.
});
+// Using a callback.
+management.getUser({id: 'user_id'},(err: Error, user: auth0.User) => {
+ if (err) {
+ // Handle error.
+ }
+ console.log(user);
+});
+
+// Using a Promise.
+management
+ .getUser({id: 'user_id'})
+ .then((user) => {
+ console.log(user);
+ })
+ .catch((err) => {
+ // Handle the error.
+ });
+
+// Using a callback.
+management.deleteUser({id: 'user_id'},(err: Error) => {
+ if (err) {
+ // Handle error.
+ }
+ console.log('deleted');
+});
+
+// Using a Promise.
+management
+ .deleteUser({id: 'user_id'})
+ .then(() => {
+ console.log('deleted');
+ })
+ .catch((err) => {
+ // Handle the error.
+ });
+
management
.createUser({
connection: 'My-Connection',
diff --git a/types/auth0/index.d.ts b/types/auth0/index.d.ts
index a8a6242bb4..3025b8d380 100644
--- a/types/auth0/index.d.ts
+++ b/types/auth0/index.d.ts
@@ -1,7 +1,8 @@
-// Type definitions for auth0 2.4
+// Type definitions for auth0 3.0
// Project: https://github.com/auth0/node-auth0
-// Definitions by: Wilson Hobbs , Seth Westphal
+// Definitions by: Wilson Hobbs , Seth Westphal , Amiram Korach
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.3
import * as Promise from 'bluebird';
@@ -14,16 +15,29 @@ export interface UserMetadata { }
export interface AppMetadata { }
export interface UserData {
- connection: string;
email?: string;
username?: string;
+ email_verified?: boolean;
+ verify_email?: boolean;
password?: string;
phone_number?: string;
+ phone_verified?: boolean,
user_metadata?: UserMetadata;
- email_verified?: boolean;
app_metadata?: AppMetadata;
}
+export interface CreateUserData extends UserData {
+ connection: string;
+}
+
+export interface UpdateUserData extends UserData {
+ connection?: string;
+ blocked?: boolean;
+ verify_phone_number?: boolean,
+ verify_password?: boolean,
+ client_id?: string
+}
+
export interface GetUsersData {
per_page?: number;
page?: number;
@@ -67,10 +81,6 @@ export interface Identity {
isSocial: boolean;
}
-export interface UpdateUserParameters {
- id: string;
-}
-
export interface AuthenticationClientOptions {
clientId?: string;
domain: string;
@@ -134,17 +144,47 @@ export interface ClientParams {
client_id: string;
}
+export type DeleteDeleteMultifactorParamsProvider = 'duo' | 'google-authenticator';
+
export interface DeleteMultifactorParams {
id: string;
- provider: string;
+ provider: DeleteDeleteMultifactorParamsProvider;
}
-export interface LinkAccountsParams {
+export type UnlinkAccountsParamsProvider = 'ad' | 'adfs' | 'amazon' | 'dropbox' | 'bitbucket' | 'aol' | 'auth0-adldap' |
+ 'auth0-oidc' | 'auth0' | 'baidu' | 'bitly' | 'box' | 'custom' | 'dwolla' | 'email' | 'evernote-sandbox' | 'evernote' |
+ 'exact' | 'facebook' | 'fitbit' | 'flickr' | 'github' | 'google-apps' | 'google-oauth2' | 'guardian' | 'instagram' |
+ 'ip' | 'linkedin' | 'miicard' | 'oauth1' | 'oauth2' | 'office365' | 'paypal' | 'paypal-sandbox' | 'pingfederate' |
+ 'planningcenter' | 'renren' | 'salesforce-community' | 'salesforce-sandbox' | 'salesforce' | 'samlp' | 'sharepoint' |
+ 'shopify' | 'sms' | 'soundcloud' | 'thecity-sandbox' | 'thecity' | 'thirtysevensignals' | 'twitter' | 'untappd' |
+ 'vkontakte' | 'waad' | 'weibo' | 'windowslive' | 'wordpress' | 'yahoo' | 'yammer' | 'yandex';
+
+export interface UnlinkAccountsParams {
id: string;
- provider: string;
+ provider: UnlinkAccountsParamsProvider;
user_id: string;
}
+export interface UnlinkAccountsResponseProfile {
+ email?: string;
+ email_verified?: boolean;
+ name?: string;
+ username?: string;
+ given_name?: string;
+ phone_number?: string;
+ phone_verified?: boolean;
+ family_name?: string;
+}
+
+export interface UnlinkAccountsResponse {
+ connection: string;
+ user_id: string;
+ provider: string;
+ isSocial?: boolean;
+ access_token?: string;
+ profileData?: UnlinkAccountsResponseProfile
+}
+
export interface LinkAccountsData {
user_id: string;
connection_id: string;
@@ -307,32 +347,33 @@ export class ManagementClient {
getUsers(params?: GetUsersData): Promise;
getUsers(params?: GetUsersData, cb?: (err: Error, users: User[]) => void): void;
- getUser(params?: ObjectWithId): Promise;
- getUser(params?: ObjectWithId, cb?: (err: Error, users: User[]) => void): void;
+ getUser(params: ObjectWithId): Promise;
+ getUser(params: ObjectWithId, cb?: (err: Error, user: User) => void): void;
- createUser(data: UserData): Promise;
- createUser(data: UserData, cb: (err: Error, data: User) => void): void;
+ createUser(data: CreateUserData): Promise;
+ createUser(data: CreateUserData, cb: (err: Error, data: User) => void): void;
- updateUser(params: UpdateUserParameters, data: User): Promise;
- updateUser(params: UpdateUserParameters, data: User, cb: (err: Error, data: User) => void): void;
+ updateUser(params: ObjectWithId, data: UpdateUserData): Promise;
+ updateUser(params: ObjectWithId, data: UpdateUserData, cb: (err: Error, data: User) => void): void;
- updateUserMetadata(params: UpdateUserParameters, data: UserMetadata): Promise;
- updateUserMetadata(params: UpdateUserParameters, data: UserMetadata, cb: (err: Error, data: User) => void): void;
+ updateUserMetadata(params: ObjectWithId, data: UserMetadata): Promise;
+ updateUserMetadata(params: ObjectWithId, data: UserMetadata, cb: (err: Error, data: User) => void): void;
+ // Should be removed from auth0 also. Doesn't exist in api.
deleteAllUsers(): Promise;
deleteAllUsers(cb: (err: Error, data: any) => void): void;
- deleteUser(params?: ObjectWithId): Promise;
- deleteUser(params?: ObjectWithId, cb?: (err: Error, users: User[]) => void): void;
+ deleteUser(params: ObjectWithId): Promise;
+ deleteUser(params: ObjectWithId, cb?: (err: Error) => void): void;
- updateAppMetadata(params: UpdateUserParameters, data: AppMetadata): Promise;
- updateAppMetadata(params: UpdateUserParameters, data: AppMetadata, cb: (err: Error, data: User) => void): void;
+ updateAppMetadata(params: ObjectWithId, data: AppMetadata): Promise;
+ updateAppMetadata(params: ObjectWithId, data: AppMetadata, cb: (err: Error, data: User) => void): void;
- deleteUserMultifactor(params: DeleteMultifactorParams): Promise;
- deleteUserMultifactor(params: DeleteMultifactorParams, cb: (err: Error, data: any) => void): void;
+ deleteUserMultifactor(params: DeleteMultifactorParams): Promise;
+ deleteUserMultifactor(params: DeleteMultifactorParams, cb: (err: Error) => void): void;
- unlinkUsers(params: LinkAccountsParams): Promise;
- unlinkUsers(params: LinkAccountsParams, cb: (err: Error, data: any) => void): void;
+ unlinkUsers(params: UnlinkAccountsParams): Promise;
+ unlinkUsers(params: UnlinkAccountsParams, cb: (err: Error, data: UnlinkAccountsResponse) => void): void;
linkUsers(params: ObjectWithId, data: LinkAccountsData): Promise;
linkUsers(params: ObjectWithId, data: LinkAccountsData, cb: (err: Error, data: any) => void): void;
diff --git a/types/aws-lambda/aws-lambda-tests.ts b/types/aws-lambda/aws-lambda-tests.ts
index 55a3d6b99f..7f8b8fabdd 100644
--- a/types/aws-lambda/aws-lambda-tests.ts
+++ b/types/aws-lambda/aws-lambda-tests.ts
@@ -61,6 +61,8 @@ var S3CreateEvent: AWSLambda.S3CreateEvent = {
]
};
var cognitoUserPoolEvent: AWSLambda.CognitoUserPoolEvent;
+var cloudformationCustomResourceEvent: AWSLambda.CloudFormationCustomResourceEvent;
+var cloudformationCustomResourceResponse: AWSLambda.CloudFormationCustomResourceResponse;
/* API Gateway Event */
str = apiGwEvt.body;
@@ -213,6 +215,33 @@ str = cognitoUserPoolEvent.response.privateChallengeParameters["answer"];
str = cognitoUserPoolEvent.response.challengeMetaData;
b = cognitoUserPoolEvent.response.answerCorrect;
+// CloudFormation Custom Resource
+switch (cloudformationCustomResourceEvent.RequestType) {
+ case "Create":
+ str = cloudformationCustomResourceEvent.LogicalResourceId;
+ str = cloudformationCustomResourceEvent.RequestId;
+ anyObj = cloudformationCustomResourceEvent.ResourceProperties;
+ str = cloudformationCustomResourceEvent.ResourceProperties.ServiceToken;
+ str = cloudformationCustomResourceEvent.ResourceType;
+ str = cloudformationCustomResourceEvent.ResponseURL;
+ str = cloudformationCustomResourceEvent.ServiceToken;
+ str = cloudformationCustomResourceEvent.StackId;
+ break;
+ case "Update":
+ anyObj = cloudformationCustomResourceEvent.OldResourceProperties;
+ break;
+ case "Delete":
+ str = cloudformationCustomResourceEvent.PhysicalResourceId;
+ break;
+}
+anyObj = cloudformationCustomResourceResponse.Data;
+str = cloudformationCustomResourceResponse.LogicalResourceId;
+str = cloudformationCustomResourceResponse.PhysicalResourceId;
+str = cloudformationCustomResourceResponse.Reason;
+str = cloudformationCustomResourceResponse.RequestId;
+str = cloudformationCustomResourceResponse.StackId;
+str = cloudformationCustomResourceResponse.Status;
+
/* Context */
b = context.callbackWaitsForEmptyEventLoop;
str = context.functionName;
diff --git a/types/aws-lambda/index.d.ts b/types/aws-lambda/index.d.ts
index 2980555a6d..df8effb82b 100644
--- a/types/aws-lambda/index.d.ts
+++ b/types/aws-lambda/index.d.ts
@@ -168,6 +168,64 @@ interface CognitoUserPoolEvent {
};
}
+/**
+ * CloudFormation Custom Resource event and response
+ * http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref.html
+ */
+type CloudFormationCustomResourceEventCommon = {
+ ServiceToken: string;
+ ResponseURL: string;
+ StackId: string;
+ RequestId: string;
+ LogicalResourceId: string;
+ ResourceType: string;
+ ResourceProperties: {
+ ServiceToken: string;
+ [Key: string]: any;
+ }
+}
+
+type CloudFormationCustomResourceCreateEvent = CloudFormationCustomResourceEventCommon & {
+ RequestType: "Create";
+}
+
+type CloudFormationCustomResourceUpdateEvent = CloudFormationCustomResourceEventCommon & {
+ RequestType: "Update";
+ PhysicalResourceId: string;
+ OldResourceProperties: {
+ [Key: string]: any;
+ };
+}
+
+type CloudFormationCustomResourceDeleteEvent = CloudFormationCustomResourceEventCommon & {
+ RequestType: "Delete";
+ PhysicalResourceId: string;
+}
+
+export type CloudFormationCustomResourceEvent = CloudFormationCustomResourceCreateEvent | CloudFormationCustomResourceUpdateEvent | CloudFormationCustomResourceDeleteEvent;
+
+type CloudFormationCustomResourceResponseCommon = {
+ PhysicalResourceId: string;
+ StackId: string;
+ RequestId: string;
+ LogicalResourceId: string;
+ Data?: {
+ [Key: string]: any;
+ }
+}
+
+type CloudFormationCustomResourceSuccessResponse = CloudFormationCustomResourceResponseCommon & {
+ Status: "SUCCESS";
+ Reason?: string;
+}
+
+type CloudFormationCustomResourceFailedResponse = CloudFormationCustomResourceResponseCommon & {
+ Status: "FAILED";
+ Reason: string;
+}
+
+export type CloudFormationCustomResourceResponse = CloudFormationCustomResourceSuccessResponse | CloudFormationCustomResourceFailedResponse;
+
// Context
// http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html
interface Context {
diff --git a/types/baidumap-web-sdk/baidumap-web-sdk-tests.ts b/types/baidumap-web-sdk/baidumap-web-sdk-tests.ts
index 0a4052b147..cc525509c6 100644
--- a/types/baidumap-web-sdk/baidumap-web-sdk-tests.ts
+++ b/types/baidumap-web-sdk/baidumap-web-sdk-tests.ts
@@ -1,24 +1,24 @@
-import "./index"
-namespace BMapTests {
- export class TestFixture {
- //document: http://lbsyun.baidu.com/index.php?title=jspopular
- public createMap(container: string | HTMLElement) {
- navigator.geolocation.getCurrentPosition((position: Position) => {
- let point = new BMap.Point(position.coords.longitude, position.coords.latitude);
- let map = new BMap.Map(container);
- map.centerAndZoom(point, 15);
- }, console.log, { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true });
- }
- public addControl(map: BMap.Map) {
- map.addControl(new BMap.ScaleControl({ anchor: BMAP_ANCHOR_TOP_LEFT }));
- map.addControl(new BMap.NavigationControl());
- map.addControl(new BMap.MapTypeControl({ mapTypes: [BMAP_NORMAL_MAP, BMAP_HYBRID_MAP] }));
- map.addControl(new BMap.OverviewMapControl({ isOpen: true, anchor: BMAP_ANCHOR_BOTTOM_RIGHT }));
- }
- public addMarker(map: BMap.Map, point: BMap.Point) {
- var marker = new BMap.Marker(point);
- map.addOverlay(marker);
- marker.setAnimation(BMAP_ANIMATION_BOUNCE);
- }
- }
-}
+import "./index"
+namespace BMapTests {
+ export class TestFixture {
+ //document: http://lbsyun.baidu.com/index.php?title=jspopular
+ public createMap(container: string | HTMLElement) {
+ navigator.geolocation.getCurrentPosition((position: Position) => {
+ let point = new BMap.Point(position.coords.longitude, position.coords.latitude);
+ let map = new BMap.Map(container);
+ map.centerAndZoom(point, 15);
+ }, console.log, { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true });
+ }
+ public addControl(map: BMap.Map) {
+ map.addControl(new BMap.ScaleControl({ anchor: BMAP_ANCHOR_TOP_LEFT }));
+ map.addControl(new BMap.NavigationControl());
+ map.addControl(new BMap.MapTypeControl({ mapTypes: [BMAP_NORMAL_MAP, BMAP_HYBRID_MAP] }));
+ map.addControl(new BMap.OverviewMapControl({ isOpen: true, anchor: BMAP_ANCHOR_BOTTOM_RIGHT }));
+ }
+ public addMarker(map: BMap.Map, point: BMap.Point) {
+ var marker = new BMap.Marker(point);
+ map.addOverlay(marker);
+ marker.setAnimation(BMAP_ANIMATION_BOUNCE);
+ }
+ }
+}
diff --git a/types/baidumap-web-sdk/baidumap.base.d.ts b/types/baidumap-web-sdk/baidumap.base.d.ts
index 4bea8ad872..9dc07a9377 100644
--- a/types/baidumap-web-sdk/baidumap.base.d.ts
+++ b/types/baidumap-web-sdk/baidumap.base.d.ts
@@ -1,56 +1,56 @@
-// Type definitions for BaiduMap v2.0
-// Project: http://lbsyun.baidu.com/index.php?title=jspopular
-// Definitions by: Codemonk
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-/* *****************************************************************************
-Copyright [Codemonk] [Codemonk@live.cn]
-
-This project is licensed under the MIT license.
-Copyrights are respective of each contributor listed at the beginning of each definition file.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-***************************************************************************** */
-
-declare namespace BMap {
- class Point {
- constructor (lng: number, lat: number)
- lng: number
- lat: number
- equals(other: Point): boolean
- }
- class Pixel {
- constructor (x: number, y: number)
- x: number
- y: number
- equals(other: Pixel): boolean
- }
- class Size {
- constructor (width: number, height: number)
- width: number
- height: number
- equals(other: Size): boolean
- }
- class Bounds {
- constructor (minX: number, minY: number, maxX: number, maxY: number)
- constructor (sw: Point, ne: Point)
- minX: number
- minY: number
- maxX: number
- maxY: number
- equals(other: Bounds): boolean
- containsPoint(point: Point): boolean
- containsBounds(bounds: Bounds): boolean
- intersects(other: Bounds): boolean
- extend(point: Point): void
- getCenter(): Point
- isEmpty(): boolean
- getSouthWest(): Point
- getNorthEast(): Point
- toSpan(): Point
- }
+// Type definitions for BaiduMap v2.0
+// Project: http://lbsyun.baidu.com/index.php?title=jspopular
+// Definitions by: Codemonk
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/* *****************************************************************************
+Copyright [Codemonk] [Codemonk@live.cn]
+
+This project is licensed under the MIT license.
+Copyrights are respective of each contributor listed at the beginning of each definition file.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+***************************************************************************** */
+
+declare namespace BMap {
+ class Point {
+ constructor (lng: number, lat: number)
+ lng: number
+ lat: number
+ equals(other: Point): boolean
+ }
+ class Pixel {
+ constructor (x: number, y: number)
+ x: number
+ y: number
+ equals(other: Pixel): boolean
+ }
+ class Size {
+ constructor (width: number, height: number)
+ width: number
+ height: number
+ equals(other: Size): boolean
+ }
+ class Bounds {
+ constructor (minX: number, minY: number, maxX: number, maxY: number)
+ constructor (sw: Point, ne: Point)
+ minX: number
+ minY: number
+ maxX: number
+ maxY: number
+ equals(other: Bounds): boolean
+ containsPoint(point: Point): boolean
+ containsBounds(bounds: Bounds): boolean
+ intersects(other: Bounds): boolean
+ extend(point: Point): void
+ getCenter(): Point
+ isEmpty(): boolean
+ getSouthWest(): Point
+ getNorthEast(): Point
+ toSpan(): Point
+ }
}
\ No newline at end of file
diff --git a/types/baidumap-web-sdk/baidumap.control.d.ts b/types/baidumap-web-sdk/baidumap.control.d.ts
index 2eb4344dc9..6e3fb771be 100644
--- a/types/baidumap-web-sdk/baidumap.control.d.ts
+++ b/types/baidumap-web-sdk/baidumap.control.d.ts
@@ -1,132 +1,132 @@
-// Type definitions for BaiduMap v2.0
-// Project: http://lbsyun.baidu.com/index.php?title=jspopular
-// Definitions by: Codemonk
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-/* *****************************************************************************
-Copyright [Codemonk] [Codemonk@live.cn]
-
-This project is licensed under the MIT license.
-Copyrights are respective of each contributor listed at the beginning of each definition file.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-***************************************************************************** */
-
-///
-///
-///
-declare namespace BMap {
- class Control {
- constructor()
- defaultAnchor: ControlAnchor
- defaultOffset: Size
- initialize(map: Map): HTMLElement
- setAnchor(anchor: ControlAnchor): void
- getAnchor(): ControlAnchor
- setOffset(offset: Size): void
- getOffset(): Size
- show(): void
- hide(): void
- isVisible(): boolean
- }
- interface NavigationControlOptions {
- anchor?: ControlAnchor
- offset?: Size
- type?: NavigationControlType
- showZoomInfo?: boolean
- enableGeolocation?: boolean
- }
- interface ScaleControlOptions {
- anchor?: ControlAnchor
- offset?: Size
- }
- interface CopyrightControlOptions {
- anchor?: ControlAnchor
- offset?: Size
- }
- type ControlAnchor = number
- class OverviewMapControl extends Control {
- constructor(opts: OverviewMapControlOptions)
- changeView(): void
- setSize(size: Size): void
- getSize(): Size
- onviewchanged: (event: { type: string, target: any, isOpen: boolean }) => void
- onviewchanging: (event: { type: string, target: any }) => void
- }
- type LengthUnit = string
- class MapTypeControl extends Control {
- constructor(opts?: MapTypeControlOptions)
- }
- class NavigationControl extends Control {
- constructor(opts?: NavigationControlOptions)
- getType(): NavigationControlOptions
- setType(type: NavigationControlType): void
- }
- interface OverviewMapControlOptions {
- anchor?: ControlAnchor
- offset?: Size
- size?: Size
- isOpen?: boolean
- }
- class CopyrightControl extends Control {
- constructor(opts?: CopyrightControlOptions)
- addCopyright(copyright: Copyright): void
- removeCopyright(id: number): void
- getCopyright(id: number): Copyright
- getCopyrightCollection(): Copyright[]
- }
- interface MapTypeControlOptions {
- type?: MapTypeControlType,
- mapTypes?: MapType[]
- }
- type NavigationControlType = number
- class ScaleControl extends Control {
- constructor(opts?: ScaleControlOptions)
- getUnit(): LengthUnit
- setUnit(unit: LengthUnit): void
- }
- interface Copyright {
- id?: number
- content?: string
- bounds?: Bounds
- }
- type MapTypeControlType = number
- class GeolocationControl extends Control {
- constructor(opts?: GeolocationControlOptions)
- }
- interface GeolocationControlOptions {
- anchor?: ControlAnchor
- offset?: Size
- showAddressBar?: boolean
- enableAutoLocation?: boolean
- locationIcon?: Icon
- }
- type StatusCode = number
- class PanoramaControl extends Control {
- constructor()
- }
-}
-declare const BMAP_UNIT_METRIC: BMap.LengthUnit
-declare const BMAP_UNIT_IMPERIAL: BMap.LengthUnit
-
-declare const BMAP_ANCHOR_TOP_LEFT: BMap.ControlAnchor
-declare const BMAP_ANCHOR_TOP_RIGHT: BMap.ControlAnchor
-declare const BMAP_ANCHOR_BOTTOM_LEFT: BMap.ControlAnchor
-declare const BMAP_ANCHOR_BOTTOM_RIGHT: BMap.ControlAnchor
-
-declare const BMAP_NAVIGATION_CONTROL_LARGE: BMap.NavigationControlType
-declare const BMAP_NAVIGATION_CONTROL_SMALL: BMap.NavigationControlType
-declare const BMAP_NAVIGATION_CONTROL_PAN: BMap.NavigationControlType
-declare const BMAP_NAVIGATION_CONTROL_ZOOM: BMap.NavigationControlType
-
-declare const BMAP_MAPTYPE_CONTROL_HORIZONTAL: BMap.MapTypeControlType
-declare const BMAP_MAPTYPE_CONTROL_DROPDOWN: BMap.MapTypeControlType
-declare const BMAP_MAPTYPE_CONTROL_MAP: BMap.MapTypeControlType
-
-declare const BMAP_STATUS_PERMISSION_DENIED: BMap.StatusCode
-declare const BMAP_STATUS_SERVICE_UNAVAILABLE: BMap.StatusCode
+// Type definitions for BaiduMap v2.0
+// Project: http://lbsyun.baidu.com/index.php?title=jspopular
+// Definitions by: Codemonk
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/* *****************************************************************************
+Copyright [Codemonk] [Codemonk@live.cn]
+
+This project is licensed under the MIT license.
+Copyrights are respective of each contributor listed at the beginning of each definition file.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+***************************************************************************** */
+
+///
+///
+///
+declare namespace BMap {
+ class Control {
+ constructor()
+ defaultAnchor: ControlAnchor
+ defaultOffset: Size
+ initialize(map: Map): HTMLElement
+ setAnchor(anchor: ControlAnchor): void
+ getAnchor(): ControlAnchor
+ setOffset(offset: Size): void
+ getOffset(): Size
+ show(): void
+ hide(): void
+ isVisible(): boolean
+ }
+ interface NavigationControlOptions {
+ anchor?: ControlAnchor
+ offset?: Size
+ type?: NavigationControlType
+ showZoomInfo?: boolean
+ enableGeolocation?: boolean
+ }
+ interface ScaleControlOptions {
+ anchor?: ControlAnchor
+ offset?: Size
+ }
+ interface CopyrightControlOptions {
+ anchor?: ControlAnchor
+ offset?: Size
+ }
+ type ControlAnchor = number
+ class OverviewMapControl extends Control {
+ constructor(opts: OverviewMapControlOptions)
+ changeView(): void
+ setSize(size: Size): void
+ getSize(): Size
+ onviewchanged: (event: { type: string, target: any, isOpen: boolean }) => void
+ onviewchanging: (event: { type: string, target: any }) => void
+ }
+ type LengthUnit = string
+ class MapTypeControl extends Control {
+ constructor(opts?: MapTypeControlOptions)
+ }
+ class NavigationControl extends Control {
+ constructor(opts?: NavigationControlOptions)
+ getType(): NavigationControlOptions
+ setType(type: NavigationControlType): void
+ }
+ interface OverviewMapControlOptions {
+ anchor?: ControlAnchor
+ offset?: Size
+ size?: Size
+ isOpen?: boolean
+ }
+ class CopyrightControl extends Control {
+ constructor(opts?: CopyrightControlOptions)
+ addCopyright(copyright: Copyright): void
+ removeCopyright(id: number): void
+ getCopyright(id: number): Copyright
+ getCopyrightCollection(): Copyright[]
+ }
+ interface MapTypeControlOptions {
+ type?: MapTypeControlType,
+ mapTypes?: MapType[]
+ }
+ type NavigationControlType = number
+ class ScaleControl extends Control {
+ constructor(opts?: ScaleControlOptions)
+ getUnit(): LengthUnit
+ setUnit(unit: LengthUnit): void
+ }
+ interface Copyright {
+ id?: number
+ content?: string
+ bounds?: Bounds
+ }
+ type MapTypeControlType = number
+ class GeolocationControl extends Control {
+ constructor(opts?: GeolocationControlOptions)
+ }
+ interface GeolocationControlOptions {
+ anchor?: ControlAnchor
+ offset?: Size
+ showAddressBar?: boolean
+ enableAutoLocation?: boolean
+ locationIcon?: Icon
+ }
+ type StatusCode = number
+ class PanoramaControl extends Control {
+ constructor()
+ }
+}
+declare const BMAP_UNIT_METRIC: BMap.LengthUnit
+declare const BMAP_UNIT_IMPERIAL: BMap.LengthUnit
+
+declare const BMAP_ANCHOR_TOP_LEFT: BMap.ControlAnchor
+declare const BMAP_ANCHOR_TOP_RIGHT: BMap.ControlAnchor
+declare const BMAP_ANCHOR_BOTTOM_LEFT: BMap.ControlAnchor
+declare const BMAP_ANCHOR_BOTTOM_RIGHT: BMap.ControlAnchor
+
+declare const BMAP_NAVIGATION_CONTROL_LARGE: BMap.NavigationControlType
+declare const BMAP_NAVIGATION_CONTROL_SMALL: BMap.NavigationControlType
+declare const BMAP_NAVIGATION_CONTROL_PAN: BMap.NavigationControlType
+declare const BMAP_NAVIGATION_CONTROL_ZOOM: BMap.NavigationControlType
+
+declare const BMAP_MAPTYPE_CONTROL_HORIZONTAL: BMap.MapTypeControlType
+declare const BMAP_MAPTYPE_CONTROL_DROPDOWN: BMap.MapTypeControlType
+declare const BMAP_MAPTYPE_CONTROL_MAP: BMap.MapTypeControlType
+
+declare const BMAP_STATUS_PERMISSION_DENIED: BMap.StatusCode
+declare const BMAP_STATUS_SERVICE_UNAVAILABLE: BMap.StatusCode
declare const BMAP_STATUS_TIMEOUT: BMap.StatusCode
\ No newline at end of file
diff --git a/types/baidumap-web-sdk/baidumap.core.d.ts b/types/baidumap-web-sdk/baidumap.core.d.ts
index f736013589..24d1aed9f0 100644
--- a/types/baidumap-web-sdk/baidumap.core.d.ts
+++ b/types/baidumap-web-sdk/baidumap.core.d.ts
@@ -1,154 +1,154 @@
-// Type definitions for BaiduMap v2.0
-// Project: http://lbsyun.baidu.com/index.php?title=jspopular
-// Definitions by: Codemonk
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-/* *****************************************************************************
-Copyright [Codemonk] [Codemonk@live.cn]
-
-This project is licensed under the MIT license.
-Copyrights are respective of each contributor listed at the beginning of each definition file.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-***************************************************************************** */
-
-///
-///
-///
-declare namespace BMap {
- class Map {
- constructor(container: string | HTMLElement, opts?: MapOptions)
- enableDragging(): void
- disableDragging(): void
- enableScrollWheelZoom(): void
- disableScrollWheelZoom(): void
- enableDoubleClickZoom(): void
- disableDoubleClickZoom(): void
- enableKeyboard(): void
- disableKeyboard(): void
- enableInertialDragging(): void
- disableInertialDragging(): void
- enableContinuousZoom(): void
- disableContinuousZoom(): void
- enablePinchToZoom(): void
- disablePinchToZoom(): void
- enableAutoResize(): void
- disableAutoResize(): void
- setDefaultCursor(cursor: string): void
- getDefaultCursor(): string
- setDraggingCursor(cursor: string): void
- getDraggingCursor(): string
- setMinZoom(zoom: number): void
- setMaxZoom(zoom: number): void
- setMapStyle(mapStyle: MapStyle): void
- setPanorama(pano: Panorama): void
- disable3DBuilding(): void
- getBounds(): Bounds
- getCenter(): Point
- getDistance(start: Point, end: Point): number
- getMapType(): MapType
- getSize(): Size
- getViewport(view: Point[], viewportOptions?: ViewportOptions): Viewport
- getZoom(): number
- getPanorama(): Panorama
- centerAndZoom(center: Point, zoom: number): void
- panTo(center: Point, opts?: PanOptions): void
- panBy(x: number, y: number, opts?: PanOptions): void
- reset(): void
- setCenter(center: Point | string): void
- setCurrentCity(city: string): void
- setMapType(mapType: MapType): void
- setViewport(view: Point[], viewportOptions?: ViewportOptions): void
- setZoom(zoom: number): void
- highResolutionEnabled(): boolean
- zoomIn(): void
- zoomOut(): void
- addHotspot(hotspot: Hotspot): void
- removeHotspot(hotspot: Hotspot): void
- clearHotspots(): void
- addControl(control: Control): void
- removeControl(control: Control): void
- getContainer(): HTMLElement
- addContextMenu(menu: ContextMenu): void
- removeContextMenu(menu: ContextMenu): void
- addOverlay(overlay: Overlay): void
- removeOverlay(overlay: Overlay): void
- clearOverlays(): void
- openInfoWindow(infoWnd: InfoWindow, point: Point): void
- closeInfoWindow(): void
- pointToOverlayPixel(point: Point): Pixel
- overlayPixelToPoint(pixel: Pixel): Point
- getInfoWindow(): InfoWindow
- getOverlays(): Overlay[]
- getPanes(): MapPanes
- addTileLayer(tileLayer: TileLayer): void
- removeTileLayer(tilelayer: TileLayer): void
- getTileLayer(mapType: string): TileLayer
- pixelToPoint(pixel: Pixel): Point
- pointToPixel(point: Point): Pixel
- onclick: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void
- ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onrightclick: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void
- onrightdblclick: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void
- onmaptypechange: (event: { type: string, target: any }) => void
- onmousemove: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void
- onmouseover: (event: { type: string, target: any }) => void
- onmouseout: (event: { type: string, target: any }) => void
- onmovestart: (event: { type: string, target: any }) => void
- onmoving: (event: { type: string, target: any }) => void
- onmoveend: (event: { type: string, target: any }) => void
- onzoomstart: (event: { type: string, target: any }) => void
- onzoomend: (event: { type: string, target: any }) => void
- onaddoverlay: (event: { type: string, target: any }) => void
- onaddcontrol: (event: { type: string, target: any }) => void
- onremovecontrol: (event: { type: string, target: any }) => void
- onremoveoverlay: (event: { type: string, target: any }) => void
- onclearoverlays: (event: { type: string, target: any }) => void
- ondragstart: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- ondragging: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- ondragend: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onaddtilelayer: (event: { type: string, target: any }) => void
- onremovetilelayer: (event: { type: string, target: any }) => void
- onload: (event: { type: string, target: any, point: Point, pixel: Pixel, zoom: number }) => void
- onresize: (event: { type: string, target: any, size: Size }) => void
- onhotspotclick: (event: { type: string, target: any, spots: HotspotOptions }) => void
- onhotspotover: (event: { type: string, target: any, spots: HotspotOptions }) => void
- onhotspotout: (event: { type: string, target: any, spots: HotspotOptions }) => void
- ontilesloaded: (event: { type: string, target: any }) => void
- ontouchstart: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- ontouchmove: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- ontouchend: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onlongpress: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- }
- interface PanOptions {
- noAnimation?: boolean
- }
- interface MapOptions {
- minZoom?: number
- maxZoom?: number
- mapType?: MapType
- enableHighResolution?: boolean
- enableAutoResize?: boolean
- enableMapClick?: boolean
- }
- interface Viewport {
- center: Point
- zoom: number
- }
- interface ViewportOptions {
- enableAnimation?: boolean
- margins?: number[]
- zoomFactor?: number
- delay?: number
- }
- type APIVersion = number
- interface MapStyle {
- features: any[]
- style: string
- }
-}
+// Type definitions for BaiduMap v2.0
+// Project: http://lbsyun.baidu.com/index.php?title=jspopular
+// Definitions by: Codemonk
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/* *****************************************************************************
+Copyright [Codemonk] [Codemonk@live.cn]
+
+This project is licensed under the MIT license.
+Copyrights are respective of each contributor listed at the beginning of each definition file.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+***************************************************************************** */
+
+///
+///
+///
+declare namespace BMap {
+ class Map {
+ constructor(container: string | HTMLElement, opts?: MapOptions)
+ enableDragging(): void
+ disableDragging(): void
+ enableScrollWheelZoom(): void
+ disableScrollWheelZoom(): void
+ enableDoubleClickZoom(): void
+ disableDoubleClickZoom(): void
+ enableKeyboard(): void
+ disableKeyboard(): void
+ enableInertialDragging(): void
+ disableInertialDragging(): void
+ enableContinuousZoom(): void
+ disableContinuousZoom(): void
+ enablePinchToZoom(): void
+ disablePinchToZoom(): void
+ enableAutoResize(): void
+ disableAutoResize(): void
+ setDefaultCursor(cursor: string): void
+ getDefaultCursor(): string
+ setDraggingCursor(cursor: string): void
+ getDraggingCursor(): string
+ setMinZoom(zoom: number): void
+ setMaxZoom(zoom: number): void
+ setMapStyle(mapStyle: MapStyle): void
+ setPanorama(pano: Panorama): void
+ disable3DBuilding(): void
+ getBounds(): Bounds
+ getCenter(): Point
+ getDistance(start: Point, end: Point): number
+ getMapType(): MapType
+ getSize(): Size
+ getViewport(view: Point[], viewportOptions?: ViewportOptions): Viewport
+ getZoom(): number
+ getPanorama(): Panorama
+ centerAndZoom(center: Point, zoom: number): void
+ panTo(center: Point, opts?: PanOptions): void
+ panBy(x: number, y: number, opts?: PanOptions): void
+ reset(): void
+ setCenter(center: Point | string): void
+ setCurrentCity(city: string): void
+ setMapType(mapType: MapType): void
+ setViewport(view: Point[], viewportOptions?: ViewportOptions): void
+ setZoom(zoom: number): void
+ highResolutionEnabled(): boolean
+ zoomIn(): void
+ zoomOut(): void
+ addHotspot(hotspot: Hotspot): void
+ removeHotspot(hotspot: Hotspot): void
+ clearHotspots(): void
+ addControl(control: Control): void
+ removeControl(control: Control): void
+ getContainer(): HTMLElement
+ addContextMenu(menu: ContextMenu): void
+ removeContextMenu(menu: ContextMenu): void
+ addOverlay(overlay: Overlay): void
+ removeOverlay(overlay: Overlay): void
+ clearOverlays(): void
+ openInfoWindow(infoWnd: InfoWindow, point: Point): void
+ closeInfoWindow(): void
+ pointToOverlayPixel(point: Point): Pixel
+ overlayPixelToPoint(pixel: Pixel): Point
+ getInfoWindow(): InfoWindow
+ getOverlays(): Overlay[]
+ getPanes(): MapPanes
+ addTileLayer(tileLayer: TileLayer): void
+ removeTileLayer(tilelayer: TileLayer): void
+ getTileLayer(mapType: string): TileLayer
+ pixelToPoint(pixel: Pixel): Point
+ pointToPixel(point: Point): Pixel
+ onclick: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void
+ ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onrightclick: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void
+ onrightdblclick: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void
+ onmaptypechange: (event: { type: string, target: any }) => void
+ onmousemove: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void
+ onmouseover: (event: { type: string, target: any }) => void
+ onmouseout: (event: { type: string, target: any }) => void
+ onmovestart: (event: { type: string, target: any }) => void
+ onmoving: (event: { type: string, target: any }) => void
+ onmoveend: (event: { type: string, target: any }) => void
+ onzoomstart: (event: { type: string, target: any }) => void
+ onzoomend: (event: { type: string, target: any }) => void
+ onaddoverlay: (event: { type: string, target: any }) => void
+ onaddcontrol: (event: { type: string, target: any }) => void
+ onremovecontrol: (event: { type: string, target: any }) => void
+ onremoveoverlay: (event: { type: string, target: any }) => void
+ onclearoverlays: (event: { type: string, target: any }) => void
+ ondragstart: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ ondragging: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ ondragend: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onaddtilelayer: (event: { type: string, target: any }) => void
+ onremovetilelayer: (event: { type: string, target: any }) => void
+ onload: (event: { type: string, target: any, point: Point, pixel: Pixel, zoom: number }) => void
+ onresize: (event: { type: string, target: any, size: Size }) => void
+ onhotspotclick: (event: { type: string, target: any, spots: HotspotOptions }) => void
+ onhotspotover: (event: { type: string, target: any, spots: HotspotOptions }) => void
+ onhotspotout: (event: { type: string, target: any, spots: HotspotOptions }) => void
+ ontilesloaded: (event: { type: string, target: any }) => void
+ ontouchstart: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ ontouchmove: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ ontouchend: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onlongpress: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ }
+ interface PanOptions {
+ noAnimation?: boolean
+ }
+ interface MapOptions {
+ minZoom?: number
+ maxZoom?: number
+ mapType?: MapType
+ enableHighResolution?: boolean
+ enableAutoResize?: boolean
+ enableMapClick?: boolean
+ }
+ interface Viewport {
+ center: Point
+ zoom: number
+ }
+ interface ViewportOptions {
+ enableAnimation?: boolean
+ margins?: number[]
+ zoomFactor?: number
+ delay?: number
+ }
+ type APIVersion = number
+ interface MapStyle {
+ features: any[]
+ style: string
+ }
+}
declare const BMAP_API_VERSION: BMap.APIVersion
\ No newline at end of file
diff --git a/types/baidumap-web-sdk/baidumap.maplayer.d.ts b/types/baidumap-web-sdk/baidumap.maplayer.d.ts
index 4ed2230bfb..244fff0c7b 100644
--- a/types/baidumap-web-sdk/baidumap.maplayer.d.ts
+++ b/types/baidumap-web-sdk/baidumap.maplayer.d.ts
@@ -1,82 +1,82 @@
-// Type definitions for BaiduMap v2.0
-// Project: http://lbsyun.baidu.com/index.php?title=jspopular
-// Definitions by: Codemonk
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-/* *****************************************************************************
-Copyright [Codemonk] [Codemonk@live.cn]
-
-This project is licensed under the MIT license.
-Copyrights are respective of each contributor listed at the beginning of each definition file.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-***************************************************************************** */
-
-///
-///
-declare namespace BMap {
- class TileLayer {
- constructor(opts?: TileLayerOptions)
- getTilesUrl(tileCoord: Pixel, zoom: number): string
- getCopyright(): Copyright
- isTransparentPng(): boolean
- }
- interface TileLayerOptions {
- transparentPng?: boolean
- tileUrlTemplate?: string
- copyright?: Copyright
- zIndex?: number
- }
- class TrafficLayer extends TileLayer {
- constructor(opts?: TrafficLayerOptions)
- }
- interface TrafficLayerOptions {
- predictDate?: PredictDate
- }
- interface PredictDate {
- weekday: number
- hour: number
- }
- class CustomLayer extends TileLayer {
- constructor(opts: CustomLayerOptions)
- onhotspotclick: (event: { type: string, target: any, content: any }) => void
- }
- interface Custompoi {
- poiId: string
- databoxId: string
- title: string
- address: string
- phoneNumber: string
- postcode: string
- provinceCode: number
- province: string
- cityCode: number
- city: string
- districtCode: number
- district: string
- point: Point
- tags: string[]
- typeId: number
- extendedData: any
- }
- class PanoramaCoverageLayer extends TileLayer {
- constructor()
- }
- interface CustomLayerOptions {
- databoxId?: string
- geotableId?: string
- q?: string
- tags?: string
- filter?: string
- pointDensityType?: PointDensityType
- }
- type PointDensityType = number
-}
-
-declare const BMAP_POINT_DENSITY_HIGH: BMap.PointDensityType
-declare const BMAP_POINT_DENSITY_MEDIUM: BMap.PointDensityType
+// Type definitions for BaiduMap v2.0
+// Project: http://lbsyun.baidu.com/index.php?title=jspopular
+// Definitions by: Codemonk
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/* *****************************************************************************
+Copyright [Codemonk] [Codemonk@live.cn]
+
+This project is licensed under the MIT license.
+Copyrights are respective of each contributor listed at the beginning of each definition file.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+***************************************************************************** */
+
+///
+///
+declare namespace BMap {
+ class TileLayer {
+ constructor(opts?: TileLayerOptions)
+ getTilesUrl(tileCoord: Pixel, zoom: number): string
+ getCopyright(): Copyright
+ isTransparentPng(): boolean
+ }
+ interface TileLayerOptions {
+ transparentPng?: boolean
+ tileUrlTemplate?: string
+ copyright?: Copyright
+ zIndex?: number
+ }
+ class TrafficLayer extends TileLayer {
+ constructor(opts?: TrafficLayerOptions)
+ }
+ interface TrafficLayerOptions {
+ predictDate?: PredictDate
+ }
+ interface PredictDate {
+ weekday: number
+ hour: number
+ }
+ class CustomLayer extends TileLayer {
+ constructor(opts: CustomLayerOptions)
+ onhotspotclick: (event: { type: string, target: any, content: any }) => void
+ }
+ interface Custompoi {
+ poiId: string
+ databoxId: string
+ title: string
+ address: string
+ phoneNumber: string
+ postcode: string
+ provinceCode: number
+ province: string
+ cityCode: number
+ city: string
+ districtCode: number
+ district: string
+ point: Point
+ tags: string[]
+ typeId: number
+ extendedData: any
+ }
+ class PanoramaCoverageLayer extends TileLayer {
+ constructor()
+ }
+ interface CustomLayerOptions {
+ databoxId?: string
+ geotableId?: string
+ q?: string
+ tags?: string
+ filter?: string
+ pointDensityType?: PointDensityType
+ }
+ type PointDensityType = number
+}
+
+declare const BMAP_POINT_DENSITY_HIGH: BMap.PointDensityType
+declare const BMAP_POINT_DENSITY_MEDIUM: BMap.PointDensityType
declare const BMAP_POINT_DENSITY_LOW: BMap.PointDensityType
\ No newline at end of file
diff --git a/types/baidumap-web-sdk/baidumap.maptype.d.ts b/types/baidumap-web-sdk/baidumap.maptype.d.ts
index 804b200cb1..01056212bc 100644
--- a/types/baidumap-web-sdk/baidumap.maptype.d.ts
+++ b/types/baidumap-web-sdk/baidumap.maptype.d.ts
@@ -1,51 +1,51 @@
-// Type definitions for BaiduMap v2.0
-// Project: http://lbsyun.baidu.com/index.php?title=jspopular
-// Definitions by: Codemonk
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-/* *****************************************************************************
-Copyright [Codemonk] [Codemonk@live.cn]
-
-This project is licensed under the MIT license.
-Copyrights are respective of each contributor listed at the beginning of each definition file.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-***************************************************************************** */
-
-///
-///
-declare namespace BMap {
- class MapType {
- constructor(name: string, layers: TileLayer | TileLayer[], opts?: MapTypeOptions)
- getName(): string
- getTileLayer(): TileLayer
- getMinZoom(): number
- getMaxZoom(): number
- getProjection(): Projection
- getTextColor(): string
- getTips(): string
- }
- interface MapTypeOptions {
- minZoom?: number
- maxZoom?: number
- errorImageUrl?: string
- textColor?: number
- tips?: string
- }
- interface Projection {
- lngLatToPoint(lngLat: Point): Pixel
- pointToLngLat(point: Pixel): Point
- }
- interface MercatorProjection extends Projection {
- }
- interface PerspectiveProjection extends Projection {
- }
-}
-declare const BMAP_NORMAL_MAP: BMap.MapType
-declare const BMAP_PERSPECTIVE_MAP: BMap.MapType
-declare const BMAP_SATELLITE_MAP: BMap.MapType
+// Type definitions for BaiduMap v2.0
+// Project: http://lbsyun.baidu.com/index.php?title=jspopular
+// Definitions by: Codemonk
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/* *****************************************************************************
+Copyright [Codemonk] [Codemonk@live.cn]
+
+This project is licensed under the MIT license.
+Copyrights are respective of each contributor listed at the beginning of each definition file.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+***************************************************************************** */
+
+///
+///
+declare namespace BMap {
+ class MapType {
+ constructor(name: string, layers: TileLayer | TileLayer[], opts?: MapTypeOptions)
+ getName(): string
+ getTileLayer(): TileLayer
+ getMinZoom(): number
+ getMaxZoom(): number
+ getProjection(): Projection
+ getTextColor(): string
+ getTips(): string
+ }
+ interface MapTypeOptions {
+ minZoom?: number
+ maxZoom?: number
+ errorImageUrl?: string
+ textColor?: number
+ tips?: string
+ }
+ interface Projection {
+ lngLatToPoint(lngLat: Point): Pixel
+ pointToLngLat(point: Pixel): Point
+ }
+ interface MercatorProjection extends Projection {
+ }
+ interface PerspectiveProjection extends Projection {
+ }
+}
+declare const BMAP_NORMAL_MAP: BMap.MapType
+declare const BMAP_PERSPECTIVE_MAP: BMap.MapType
+declare const BMAP_SATELLITE_MAP: BMap.MapType
declare const BMAP_HYBRID_MAP: BMap.MapType
\ No newline at end of file
diff --git a/types/baidumap-web-sdk/baidumap.overlay.d.ts b/types/baidumap-web-sdk/baidumap.overlay.d.ts
index 295c30ff8a..d723ac5e48 100644
--- a/types/baidumap-web-sdk/baidumap.overlay.d.ts
+++ b/types/baidumap-web-sdk/baidumap.overlay.d.ts
@@ -1,438 +1,438 @@
-// Type definitions for BaiduMap v2.0
-// Project: http://lbsyun.baidu.com/index.php?title=jspopular
-// Definitions by: Codemonk
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-/* *****************************************************************************
-Copyright [Codemonk] [Codemonk@live.cn]
-
-This project is licensed under the MIT license.
-Copyrights are respective of each contributor listed at the beginning of each definition file.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-***************************************************************************** */
-
-///
-///
-///
-declare namespace BMap {
- interface Overlay {
- initialize?(map: Map): HTMLElement
- isVisible?(): boolean
- draw?(): void
- show?(): void
- hide?(): void
- }
- type SymbolShapeType = number
- interface PolylineOptions {
- strokeColor?: string
- strokeWeight?: number
- strokeOpacity?: number
- strokeStyle?: string
- enableMassClear?: boolean
- enableEditing?: boolean
- enableClicking?: boolean
- }
- interface GroundOverlayOptions {
- opacity?: number
- imageURL?: string
- displayOnMinLevel?: number
- displayOnMaxLevel?: number
- }
- class Marker implements Overlay {
- constructor(point: Point, opts?: MarkerOptions)
- openInfoWindow(infoWnd: InfoWindow): void
- closeInfoWindow(): void
- setIcon(icon: Icon): void
- getIcon(): Icon
- setPosition(position: Point): void
- getPosition(): Point
- setOffset(offset: Size): void
- getOffset(): Size
- setLabel(label: Label): void
- getLabel(): Label
- setTitle(title: string): void
- getTitle(): string
- setTop(isTop: boolean): void
- enableDragging(): void
- disableDragging(): void
- enableMassClear(): void
- disableMassClear(): void
- setZIndex(zIndex: number): void
- getMap(): Map
- addContextMenu(menu: ContextMenu): void
- removeContextMenu(menu: ContextMenu): void
- setAnimation(animation?: Animation): void
- setRotation(rotation: number): void
- getRotation(): number
- setShadow(shadow: Icon): void
- getShadow(): void
- addEventListener(event: string, handler: Function): void
- removeEventListener(event: string, handler: Function): void
- onclick: (event: { type: string, target: any }) => void
- ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onremove: (event: { type: string, target: any }) => void
- oninfowindowclose: (event: { type: string, target: any }) => void
- oninfowindowopen: (event: { type: string, target: any }) => void
- ondragstart: (event: { type: string, target: any }) => void
- ondragging: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- ondragend: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onrightclick: (event: { type: string, target: any }) => void
- }
- interface SymbolOptions {
- anchor?: Size
- fillColor?: string
- fillOpacity?: number
- scale?: number
- rotation?: number
- strokeColor?: string
- strokeOpacity?: number
- strokeWeight?: number
- }
- class IconSequence {
- constructor(symbol: Symbol, offset?: string, repeat?: string, fixedRotation?: boolean)
- }
- class PointCollection implements Overlay {
- constructor(points: Point[], opts?: PointCollectionOption)
- setPoints(points: Point[]): void
- setStyles(styles: PointCollectionOption): void
- clear(): void
- onclick: (event: { type: string, target: any, point: Point }) => void
- onmouseover: (event: { type: string, target: any, point: Point }) => void
- onmouseout: (event: { type: string, target: any, point: Point }) => void
- }
- interface MarkerOptions {
- offset?: Size
- icon?: Icon
- enableMassClear?: boolean
- enableDragging?: boolean
- enableClicking?: boolean
- raiseOnDrag?: boolean
- draggingCursor?: string
- rotation?: number
- shadow?: Icon
- title?: string
- }
- class InfoWindow implements Overlay {
- constructor(content: string | HTMLElement, opts?: InfoWindowOptions)
- setWidth(width: number): void
- setHeight(height: number): void
- redraw(): void
- setTitle(title: string | HTMLElement): void
- getTitle(): string | HTMLElement
- setContent(content: string | HTMLElement): void
- getContent(): string | HTMLElement
- getPosition(): Point
- enableMaximize(): void
- disableMaximize(): void
- isOpen(): boolean
- setMaxContent(content: string): void
- maximize(): void
- restore(): void
- enableAutoPan(): void
- disableAutoPan(): void
- enableCloseOnClick(): void
- disableCloseOnClick(): void
- addEventListener(event: string, handler: Function): void
- removeEventListener(event: string, handler: Function): void
- onclose: (event: { type: string, target: any, point: Point }) => void
- onopen: (event: { type: string, target: any, point: Point }) => void
- onmaximize: (event: { type: string, target: any }) => void
- onrestore: (event: { type: string, target: any }) => void
- onclickclose: (event: { type: string, target: any }) => void
- }
- class Polygon implements Overlay {
- constructor(points: Array, opts?: PolygonOptions)
- setPath(path: Point[]): void
- getPath(): Point[]
- setStrokeColor(color: string): void
- getStrokeColor(): string
- setFillColor(color: string): void
- getFillColor(): string
- setStrokeOpacity(opacity: number): void
- getStrokeOpacity(): number
- setFillOpacity(opacity: number): void
- getFillOpacity(): number
- setStrokeWeight(weight: number): void
- getStrokeWeight(): number
- setStrokeStyle(style: string): void
- getStrokeStyle(): string
- getBounds(): Bounds
- enableEditing(): void
- disableEditing(): void
- enableMassClear(): void
- disableMassClear(): void
- setPointAt(index: number, point: Point): void
- setPositionAt(index: number, point: Point): void
- getMap(): Map
- addEventListener(event: string, handler: Function): void
- removeEventListener(event: string, handler: Function): void
- onclick: (event: { type: string, target: any }) => void
- ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onremove: (event: { type: string, target: any }) => void
- onlineupdate: (event: { type: string, target: any }) => void
- }
- interface PointCollectionOption {
- shape?: ShapeType
- color?: string
- size?: SizeType
- }
- type Animation = number
- interface InfoWindowOptions {
- width?: number
- height?: number
- maxWidth?: number
- offset?: Size
- title?: string
- enableAutoPan?: boolean
- enableCloseOnClick?: boolean
- enableMessage?: boolean
- message?: string
- }
- interface PolygonOptions {
- strokeColor?: string
- fillColor?: string
- strokeWeight?: number
- strokeOpacity?: number
- fillOpacity?: number
- strokeStyle?: number
- enableMassClear?: boolean
- enableEditing?: boolean
- enableClicking?: boolean
- }
- type ShapeType = number
- class Icon implements Overlay {
- constructor(url: string, size: Size, opts?: IconOptions)
- anchor: Size
- size: Size
- imageOffset: Size
- imageSize: Size
- imageUrl: Size
- infoWindowAnchor: Size
- printImageUrl: string
- setImageUrl(imageUrl: string): void
- setSize(size: Size): void
- setImageSize(offset: Size): void
- setAnchor(anchor: Size): void
- setImageOffset(offset: Size): void
- setInfoWindowAnchor(anchor: Size): void
- setPrintImageUrl(url: string): void
- }
- class Label implements Overlay {
- constructor(content: string, opts?: LabelOptions)
- setStyle(styles: Object): void
- setContent(content: string): void
- setPosition(position: Point): void
- getPosition(): Point
- setOffset(offset: Size): void
- getOffset(): Size
- setTitle(title: string): void
- getTitle(): string
- enableMassClear(): void
- disableMassClear(): void
- setZIndex(zIndex: number): void
- setPosition(position: Point): void
- getMap(): Map
- addEventListener(event: string, handler: Function): void
- removeEventListener(event: string, handler: Function): void
- onclick: (event: { type: string, target: any }) => void
- ondblclick: (event: { type: string, target: any }) => void
- onmousedown: (event: { type: string, target: any }) => void
- onmouseup: (event: { type: string, target: any }) => void
- onmouseout: (event: { type: string, target: any }) => void
- onmouseover: (event: { type: string, target: any }) => void
- onremove: (event: { type: string, target: any }) => void
- onrightclick: (event: { type: string, target: any }) => void
- }
- class Circle implements Overlay {
- constructor(center: Point, radius: number, opts?: CircleOptions)
- setCenter(center: Point): void
- getCenter(): Point
- setRadius(radius: number): void
- getRadius(): number
- getBounds(): Bounds
- setStrokeColor(color: string): void
- getStrokeColor(): string
- setFillColor(color: string): void
- getFillColor(): string
- setStrokeOpacity(opacity: number): void
- getStrokeOpacity(): number
- setFillOpacity(opacity: number): void
- getFillOpacity(): number
- setStrokeWeight(weight: number): void
- getStrokeWeight(): number
- setStrokeStyle(style: string): void
- getStrokeStyle(): string
- getBounds(): Bounds
- enableEditing(): void
- disableEditing(): void
- enableMassClear(): void
- disableMassClear(): void
- getMap(): Map
- addEventListener(event: string, handler: Function): void
- removeEventListener(event: string, handler: Function): void
- onclick: (event: { type: string, target: any }) => void
- ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onremove: (event: { type: string, target: any }) => void
- onlineupdate: (event: { type: string, target: any }) => void
- }
- type SizeType = number
- interface IconOptions {
- anchor?: Size
- imageOffset?: Size
- infoWindowAnchor?: Size
- printImageUrl?: string
- }
- interface LabelOptions {
- offset?: Size
- position?: Point
- enableMassClear?: boolean
- }
- interface CircleOptions {
- strokeColor?: string
- fillColor?: string
- strokeWeight?: number
- strokeOpacity?: number
- fillOpacity?: number
- strokeStyle?: string
- enableMassClear?: boolean
- enableEditing?: boolean
- enableClicking?: boolean
- }
- class Hotspot implements Overlay {
- constructor(position: Point, opts?: HotspotOptions)
- setPosition(position: Point): void
- getPosition(): Point
- setText(text: string): void
- getText(): string
- setUserData(data: any): void
- getUserData(): any
- }
- class Symbol implements Overlay {
- constructor(path: string | SymbolShapeType, opts?: SymbolOptions)
- setPath(path: string | SymbolShapeType): void
- setAnchor(anchor: Size): void
- setRotation(rotation: number): void
- setScale(scale: number): void
- setStrokeWeight(strokeWeight: number): void
- setStrokeColor(color: string): void
- setStrokeOpacity(opacity: number): void
- setFillOpacity(opacity: number): void
- setFillColor(color: string): void
- }
- class Polyline implements Overlay {
- constructor(points: Point[], opts?: PolylineOptions)
- setPath(path: Point[]): void
- getPath(): Point[]
- setStrokeColor(color: string): void
- getStrokeColor(): string
- setFillColor(color: string): void
- getFillColor(): string
- setStrokeOpacity(opacity: number): void
- getStrokeOpacity(): number
- setFillOpacity(opacity: number): void
- getFillOpacity(): number
- setStrokeWeight(weight: number): void
- getStrokeWeight(): number
- setStrokeStyle(style: string): void
- getStrokeStyle(): string
- getBounds(): Bounds
- enableEditing(): void
- disableEditing(): void
- enableMassClear(): void
- disableMassClear(): void
- setPointAt(index: number, point: Point): void
- setPositionAt(index: number, point: Point): void
- getMap(): Map
- addEventListener(event: string, handler: Function): void
- removeEventListener(event: string, handler: Function): void
- onclick: (event: { type: string, target: any }) => void
- ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onremove: (event: { type: string, target: any }) => void
- onlineupdate: (event: { type: string, target: any }) => void
- }
- class GroundOverlay implements Overlay {
- constructor(bounds: Bounds, opts?: GroundOverlayOptions)
- setBounds(bounds: Bounds): void
- getBounds(): Bounds
- setOpacity(opcity: number): void
- getOpacity(): number
- setImageURL(url: string): void
- getImageURL(): string
- setDisplayOnMinLevel(level: number): void
- getDisplayOnMinLevel(): number
- setDispalyOnMaxLevel(level: number): void
- getDispalyOnMaxLevel(): number
- onclick: (event: { type: string, target: any }) => void
- ondblclick: (event: { type: string, target: any }) => void
- }
- interface HotspotOptions {
- text?: string
- offsets?: number[]
- userData?: any
- minZoom?: number
- maxZoom?: number
- }
- interface MapPanes {
- floatPane?: HTMLElement
- markerMouseTarget?: HTMLElement
- floatShadow?: HTMLElement
- labelPane?: HTMLElement
- markerPane?: HTMLElement
- markerShadow?: HTMLElement
- mapPane?: HTMLElement
- }
-}
-
-declare const BMap_Symbol_SHAPE_CIRCLE: BMap.SymbolShapeType
-declare const BMap_Symbol_SHAPE_RECTANGLE: BMap.SymbolShapeType
-declare const BMap_Symbol_SHAPE_RHOMBUS: BMap.SymbolShapeType
-declare const BMap_Symbol_SHAPE_STAR: BMap.SymbolShapeType
-declare const BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW: BMap.SymbolShapeType
-declare const BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW: BMap.SymbolShapeType
-declare const BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW: BMap.SymbolShapeType
-declare const BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW: BMap.SymbolShapeType
-declare const BMap_Symbol_SHAPE_POINT: BMap.SymbolShapeType
-declare const BMap_Symbol_SHAPE_PLANE: BMap.SymbolShapeType
-declare const BMap_Symbol_SHAPE_CAMERA: BMap.SymbolShapeType
-declare const BMap_Symbol_SHAPE_WARNING: BMap.SymbolShapeType
-declare const BMap_Symbol_SHAPE_SMILE: BMap.SymbolShapeType
-declare const BMap_Symbol_SHAPE_CLOCK: BMap.SymbolShapeType
-
-
-declare const BMAP_ANIMATION_DROP: BMap.Animation
-declare const BMAP_ANIMATION_BOUNCE: BMap.Animation
-
-declare const BMAP_POINT_SHAPE_CIRCLE: BMap.ShapeType
-declare const APE_STAR: BMap.ShapeType
-declare const APE_SQUARE: BMap.ShapeType
-declare const APE_RHOMBUS: BMap.ShapeType
-declare const APE_WATERDROP: BMap.ShapeType
-
-declare const BMAP_POINT_SIZE_TINY: BMap.SizeType
-declare const BMAP_POINT_SIZE_SMALLER: BMap.SizeType
-declare const BMAP_POINT_SIZE_SMALL: BMap.SizeType
-declare const BMAP_POINT_SIZE_NORMAL: BMap.SizeType
-declare const BMAP_POINT_SIZE_BIG: BMap.SizeType
-declare const BMAP_POINT_SIZE_BIGGER: BMap.SizeType
+// Type definitions for BaiduMap v2.0
+// Project: http://lbsyun.baidu.com/index.php?title=jspopular
+// Definitions by: Codemonk
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/* *****************************************************************************
+Copyright [Codemonk] [Codemonk@live.cn]
+
+This project is licensed under the MIT license.
+Copyrights are respective of each contributor listed at the beginning of each definition file.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+***************************************************************************** */
+
+///
+///
+///
+declare namespace BMap {
+ interface Overlay {
+ initialize?(map: Map): HTMLElement
+ isVisible?(): boolean
+ draw?(): void
+ show?(): void
+ hide?(): void
+ }
+ type SymbolShapeType = number
+ interface PolylineOptions {
+ strokeColor?: string
+ strokeWeight?: number
+ strokeOpacity?: number
+ strokeStyle?: string
+ enableMassClear?: boolean
+ enableEditing?: boolean
+ enableClicking?: boolean
+ }
+ interface GroundOverlayOptions {
+ opacity?: number
+ imageURL?: string
+ displayOnMinLevel?: number
+ displayOnMaxLevel?: number
+ }
+ class Marker implements Overlay {
+ constructor(point: Point, opts?: MarkerOptions)
+ openInfoWindow(infoWnd: InfoWindow): void
+ closeInfoWindow(): void
+ setIcon(icon: Icon): void
+ getIcon(): Icon
+ setPosition(position: Point): void
+ getPosition(): Point
+ setOffset(offset: Size): void
+ getOffset(): Size
+ setLabel(label: Label): void
+ getLabel(): Label
+ setTitle(title: string): void
+ getTitle(): string
+ setTop(isTop: boolean): void
+ enableDragging(): void
+ disableDragging(): void
+ enableMassClear(): void
+ disableMassClear(): void
+ setZIndex(zIndex: number): void
+ getMap(): Map
+ addContextMenu(menu: ContextMenu): void
+ removeContextMenu(menu: ContextMenu): void
+ setAnimation(animation?: Animation): void
+ setRotation(rotation: number): void
+ getRotation(): number
+ setShadow(shadow: Icon): void
+ getShadow(): void
+ addEventListener(event: string, handler: Function): void
+ removeEventListener(event: string, handler: Function): void
+ onclick: (event: { type: string, target: any }) => void
+ ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onremove: (event: { type: string, target: any }) => void
+ oninfowindowclose: (event: { type: string, target: any }) => void
+ oninfowindowopen: (event: { type: string, target: any }) => void
+ ondragstart: (event: { type: string, target: any }) => void
+ ondragging: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ ondragend: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onrightclick: (event: { type: string, target: any }) => void
+ }
+ interface SymbolOptions {
+ anchor?: Size
+ fillColor?: string
+ fillOpacity?: number
+ scale?: number
+ rotation?: number
+ strokeColor?: string
+ strokeOpacity?: number
+ strokeWeight?: number
+ }
+ class IconSequence {
+ constructor(symbol: Symbol, offset?: string, repeat?: string, fixedRotation?: boolean)
+ }
+ class PointCollection implements Overlay {
+ constructor(points: Point[], opts?: PointCollectionOption)
+ setPoints(points: Point[]): void
+ setStyles(styles: PointCollectionOption): void
+ clear(): void
+ onclick: (event: { type: string, target: any, point: Point }) => void
+ onmouseover: (event: { type: string, target: any, point: Point }) => void
+ onmouseout: (event: { type: string, target: any, point: Point }) => void
+ }
+ interface MarkerOptions {
+ offset?: Size
+ icon?: Icon
+ enableMassClear?: boolean
+ enableDragging?: boolean
+ enableClicking?: boolean
+ raiseOnDrag?: boolean
+ draggingCursor?: string
+ rotation?: number
+ shadow?: Icon
+ title?: string
+ }
+ class InfoWindow implements Overlay {
+ constructor(content: string | HTMLElement, opts?: InfoWindowOptions)
+ setWidth(width: number): void
+ setHeight(height: number): void
+ redraw(): void
+ setTitle(title: string | HTMLElement): void
+ getTitle(): string | HTMLElement
+ setContent(content: string | HTMLElement): void
+ getContent(): string | HTMLElement
+ getPosition(): Point
+ enableMaximize(): void
+ disableMaximize(): void
+ isOpen(): boolean
+ setMaxContent(content: string): void
+ maximize(): void
+ restore(): void
+ enableAutoPan(): void
+ disableAutoPan(): void
+ enableCloseOnClick(): void
+ disableCloseOnClick(): void
+ addEventListener(event: string, handler: Function): void
+ removeEventListener(event: string, handler: Function): void
+ onclose: (event: { type: string, target: any, point: Point }) => void
+ onopen: (event: { type: string, target: any, point: Point }) => void
+ onmaximize: (event: { type: string, target: any }) => void
+ onrestore: (event: { type: string, target: any }) => void
+ onclickclose: (event: { type: string, target: any }) => void
+ }
+ class Polygon implements Overlay {
+ constructor(points: Array, opts?: PolygonOptions)
+ setPath(path: Point[]): void
+ getPath(): Point[]
+ setStrokeColor(color: string): void
+ getStrokeColor(): string
+ setFillColor(color: string): void
+ getFillColor(): string
+ setStrokeOpacity(opacity: number): void
+ getStrokeOpacity(): number
+ setFillOpacity(opacity: number): void
+ getFillOpacity(): number
+ setStrokeWeight(weight: number): void
+ getStrokeWeight(): number
+ setStrokeStyle(style: string): void
+ getStrokeStyle(): string
+ getBounds(): Bounds
+ enableEditing(): void
+ disableEditing(): void
+ enableMassClear(): void
+ disableMassClear(): void
+ setPointAt(index: number, point: Point): void
+ setPositionAt(index: number, point: Point): void
+ getMap(): Map
+ addEventListener(event: string, handler: Function): void
+ removeEventListener(event: string, handler: Function): void
+ onclick: (event: { type: string, target: any }) => void
+ ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onremove: (event: { type: string, target: any }) => void
+ onlineupdate: (event: { type: string, target: any }) => void
+ }
+ interface PointCollectionOption {
+ shape?: ShapeType
+ color?: string
+ size?: SizeType
+ }
+ type Animation = number
+ interface InfoWindowOptions {
+ width?: number
+ height?: number
+ maxWidth?: number
+ offset?: Size
+ title?: string
+ enableAutoPan?: boolean
+ enableCloseOnClick?: boolean
+ enableMessage?: boolean
+ message?: string
+ }
+ interface PolygonOptions {
+ strokeColor?: string
+ fillColor?: string
+ strokeWeight?: number
+ strokeOpacity?: number
+ fillOpacity?: number
+ strokeStyle?: number
+ enableMassClear?: boolean
+ enableEditing?: boolean
+ enableClicking?: boolean
+ }
+ type ShapeType = number
+ class Icon implements Overlay {
+ constructor(url: string, size: Size, opts?: IconOptions)
+ anchor: Size
+ size: Size
+ imageOffset: Size
+ imageSize: Size
+ imageUrl: Size
+ infoWindowAnchor: Size
+ printImageUrl: string
+ setImageUrl(imageUrl: string): void
+ setSize(size: Size): void
+ setImageSize(offset: Size): void
+ setAnchor(anchor: Size): void
+ setImageOffset(offset: Size): void
+ setInfoWindowAnchor(anchor: Size): void
+ setPrintImageUrl(url: string): void
+ }
+ class Label implements Overlay {
+ constructor(content: string, opts?: LabelOptions)
+ setStyle(styles: Object): void
+ setContent(content: string): void
+ setPosition(position: Point): void
+ getPosition(): Point
+ setOffset(offset: Size): void
+ getOffset(): Size
+ setTitle(title: string): void
+ getTitle(): string
+ enableMassClear(): void
+ disableMassClear(): void
+ setZIndex(zIndex: number): void
+ setPosition(position: Point): void
+ getMap(): Map
+ addEventListener(event: string, handler: Function): void
+ removeEventListener(event: string, handler: Function): void
+ onclick: (event: { type: string, target: any }) => void
+ ondblclick: (event: { type: string, target: any }) => void
+ onmousedown: (event: { type: string, target: any }) => void
+ onmouseup: (event: { type: string, target: any }) => void
+ onmouseout: (event: { type: string, target: any }) => void
+ onmouseover: (event: { type: string, target: any }) => void
+ onremove: (event: { type: string, target: any }) => void
+ onrightclick: (event: { type: string, target: any }) => void
+ }
+ class Circle implements Overlay {
+ constructor(center: Point, radius: number, opts?: CircleOptions)
+ setCenter(center: Point): void
+ getCenter(): Point
+ setRadius(radius: number): void
+ getRadius(): number
+ getBounds(): Bounds
+ setStrokeColor(color: string): void
+ getStrokeColor(): string
+ setFillColor(color: string): void
+ getFillColor(): string
+ setStrokeOpacity(opacity: number): void
+ getStrokeOpacity(): number
+ setFillOpacity(opacity: number): void
+ getFillOpacity(): number
+ setStrokeWeight(weight: number): void
+ getStrokeWeight(): number
+ setStrokeStyle(style: string): void
+ getStrokeStyle(): string
+ getBounds(): Bounds
+ enableEditing(): void
+ disableEditing(): void
+ enableMassClear(): void
+ disableMassClear(): void
+ getMap(): Map
+ addEventListener(event: string, handler: Function): void
+ removeEventListener(event: string, handler: Function): void
+ onclick: (event: { type: string, target: any }) => void
+ ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onremove: (event: { type: string, target: any }) => void
+ onlineupdate: (event: { type: string, target: any }) => void
+ }
+ type SizeType = number
+ interface IconOptions {
+ anchor?: Size
+ imageOffset?: Size
+ infoWindowAnchor?: Size
+ printImageUrl?: string
+ }
+ interface LabelOptions {
+ offset?: Size
+ position?: Point
+ enableMassClear?: boolean
+ }
+ interface CircleOptions {
+ strokeColor?: string
+ fillColor?: string
+ strokeWeight?: number
+ strokeOpacity?: number
+ fillOpacity?: number
+ strokeStyle?: string
+ enableMassClear?: boolean
+ enableEditing?: boolean
+ enableClicking?: boolean
+ }
+ class Hotspot implements Overlay {
+ constructor(position: Point, opts?: HotspotOptions)
+ setPosition(position: Point): void
+ getPosition(): Point
+ setText(text: string): void
+ getText(): string
+ setUserData(data: any): void
+ getUserData(): any
+ }
+ class Symbol implements Overlay {
+ constructor(path: string | SymbolShapeType, opts?: SymbolOptions)
+ setPath(path: string | SymbolShapeType): void
+ setAnchor(anchor: Size): void
+ setRotation(rotation: number): void
+ setScale(scale: number): void
+ setStrokeWeight(strokeWeight: number): void
+ setStrokeColor(color: string): void
+ setStrokeOpacity(opacity: number): void
+ setFillOpacity(opacity: number): void
+ setFillColor(color: string): void
+ }
+ class Polyline implements Overlay {
+ constructor(points: Point[], opts?: PolylineOptions)
+ setPath(path: Point[]): void
+ getPath(): Point[]
+ setStrokeColor(color: string): void
+ getStrokeColor(): string
+ setFillColor(color: string): void
+ getFillColor(): string
+ setStrokeOpacity(opacity: number): void
+ getStrokeOpacity(): number
+ setFillOpacity(opacity: number): void
+ getFillOpacity(): number
+ setStrokeWeight(weight: number): void
+ getStrokeWeight(): number
+ setStrokeStyle(style: string): void
+ getStrokeStyle(): string
+ getBounds(): Bounds
+ enableEditing(): void
+ disableEditing(): void
+ enableMassClear(): void
+ disableMassClear(): void
+ setPointAt(index: number, point: Point): void
+ setPositionAt(index: number, point: Point): void
+ getMap(): Map
+ addEventListener(event: string, handler: Function): void
+ removeEventListener(event: string, handler: Function): void
+ onclick: (event: { type: string, target: any }) => void
+ ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onremove: (event: { type: string, target: any }) => void
+ onlineupdate: (event: { type: string, target: any }) => void
+ }
+ class GroundOverlay implements Overlay {
+ constructor(bounds: Bounds, opts?: GroundOverlayOptions)
+ setBounds(bounds: Bounds): void
+ getBounds(): Bounds
+ setOpacity(opcity: number): void
+ getOpacity(): number
+ setImageURL(url: string): void
+ getImageURL(): string
+ setDisplayOnMinLevel(level: number): void
+ getDisplayOnMinLevel(): number
+ setDispalyOnMaxLevel(level: number): void
+ getDispalyOnMaxLevel(): number
+ onclick: (event: { type: string, target: any }) => void
+ ondblclick: (event: { type: string, target: any }) => void
+ }
+ interface HotspotOptions {
+ text?: string
+ offsets?: number[]
+ userData?: any
+ minZoom?: number
+ maxZoom?: number
+ }
+ interface MapPanes {
+ floatPane?: HTMLElement
+ markerMouseTarget?: HTMLElement
+ floatShadow?: HTMLElement
+ labelPane?: HTMLElement
+ markerPane?: HTMLElement
+ markerShadow?: HTMLElement
+ mapPane?: HTMLElement
+ }
+}
+
+declare const BMap_Symbol_SHAPE_CIRCLE: BMap.SymbolShapeType
+declare const BMap_Symbol_SHAPE_RECTANGLE: BMap.SymbolShapeType
+declare const BMap_Symbol_SHAPE_RHOMBUS: BMap.SymbolShapeType
+declare const BMap_Symbol_SHAPE_STAR: BMap.SymbolShapeType
+declare const BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW: BMap.SymbolShapeType
+declare const BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW: BMap.SymbolShapeType
+declare const BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW: BMap.SymbolShapeType
+declare const BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW: BMap.SymbolShapeType
+declare const BMap_Symbol_SHAPE_POINT: BMap.SymbolShapeType
+declare const BMap_Symbol_SHAPE_PLANE: BMap.SymbolShapeType
+declare const BMap_Symbol_SHAPE_CAMERA: BMap.SymbolShapeType
+declare const BMap_Symbol_SHAPE_WARNING: BMap.SymbolShapeType
+declare const BMap_Symbol_SHAPE_SMILE: BMap.SymbolShapeType
+declare const BMap_Symbol_SHAPE_CLOCK: BMap.SymbolShapeType
+
+
+declare const BMAP_ANIMATION_DROP: BMap.Animation
+declare const BMAP_ANIMATION_BOUNCE: BMap.Animation
+
+declare const BMAP_POINT_SHAPE_CIRCLE: BMap.ShapeType
+declare const APE_STAR: BMap.ShapeType
+declare const APE_SQUARE: BMap.ShapeType
+declare const APE_RHOMBUS: BMap.ShapeType
+declare const APE_WATERDROP: BMap.ShapeType
+
+declare const BMAP_POINT_SIZE_TINY: BMap.SizeType
+declare const BMAP_POINT_SIZE_SMALLER: BMap.SizeType
+declare const BMAP_POINT_SIZE_SMALL: BMap.SizeType
+declare const BMAP_POINT_SIZE_NORMAL: BMap.SizeType
+declare const BMAP_POINT_SIZE_BIG: BMap.SizeType
+declare const BMAP_POINT_SIZE_BIGGER: BMap.SizeType
declare const BMAP_POINT_SIZE_HUGE: BMap.SizeType
\ No newline at end of file
diff --git a/types/baidumap-web-sdk/baidumap.panorama.d.ts b/types/baidumap-web-sdk/baidumap.panorama.d.ts
index 6b3e10f6b2..f087732fb4 100644
--- a/types/baidumap-web-sdk/baidumap.panorama.d.ts
+++ b/types/baidumap-web-sdk/baidumap.panorama.d.ts
@@ -1,121 +1,121 @@
-// Type definitions for BaiduMap v2.0
-// Project: http://lbsyun.baidu.com/index.php?title=jspopular
-// Definitions by: Codemonk
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-/* *****************************************************************************
-Copyright [Codemonk] [Codemonk@live.cn]
-
-This project is licensed under the MIT license.
-Copyrights are respective of each contributor listed at the beginning of each definition file.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-***************************************************************************** */
-
-///
-///
-declare namespace BMap {
- class Panorama {
- constructor(container: string | HTMLElement, opts?: PanoramaOptions)
- getLinks(): PanoramaLink[]
- getId(): string
- getPosition(): Point
- getPov(): PanoramaPov
- getZoom(): number
- setId(id: string): void
- setPosition(position: Point): void
- setPov(pov: PanoramaPov): void
- setZoom(zoom: number): void
- enableScrollWheelZoom(): void
- disableScrollWheelZoom(): void
- show(): void
- hide(): void
- addOverlay(overlay: PanoramaLabel): void
- removeOverlay(overlay: PanoramaLabel): void
- getSceneType(): PanoramaSceneType
- setOptions(opts?: PanoramaOptions): void
- setPanoramaPOIType(): PanoramaPOIType
- onposition_changed: () => void
- onlinks_changed: () => void
- onpov_changed: () => void
- onzoom_changed: () => void
- onscene_type_changed: () => void
- }
-
- interface PanoramaOptions {
- navigationControl?: boolean
- linksControl?: boolean
- indoorSceneSwitchControl?: boolean
- albumsControl?: boolean
- albumsControlOptions?: AlbumsControlOptions
- }
- interface PanoramaLink {
- description: string
- heading: string
- id: string
- }
- interface PanoramaPov {
- heading: number
- pitch: number
- }
- class PanoramaService {
- constructor()
- getPanoramaById(id: string, callback: (data: PanoramaData) => void): void
- getPanoramaByLocation(point: Point, radius?: number, callback?: (data: PanoramaData) => void): void
- }
- interface PanoramaData {
- id: string
- description: string
- links: PanoramaLink[]
- position: Point
- tiles: PanoramaTileData
- }
- interface PanoramaTileData {
- centerHeading: number
- tileSize: Size
- worldSize: Size
- }
- class PanoramaLabel {
- constructor(content: string, opts?: PanoramaLabelOptions)
- setPosition(position: Point): void
- getPosition(): Point
- getPov(): PanoramaPov
- setContent(content: string): void
- getContent(): string
- show(): void
- hide(): void
- setAltitude(altitude: number): void
- getAltitude(): number
- addEventListener(event: string, handler: Function): void
- removeEventListener(event: string, handler: Function): void
- onclick: (event: { type: string, target: any }) => void
- onmouseover: (event: { type: string, target: any }) => void
- onmouseout: (event: { type: string, target: any }) => void
- onremove: (event: { type: string, target: any }) => void
- }
- interface PanoramaLabelOptions {
- position?: Point
- altitude?: number
- }
- interface AlbumsControlOptions {
- anchor?: ControlAnchor
- offset?: Size
- maxWidth?: number | string
- imageHeight?: number
- }
- type PanoramaSceneType = string
- type PanoramaPOIType = string
-}
-declare const BMAP_PANORAMA_INDOOR_SCENE: string
-declare const BMAP_PANORAMA_STREET_SCENE: string
-
-declare const BMAP_PANORAMA_POI_HOTEL: string
-declare const BMAP_PANORAMA_POI_CATERING: string
-declare const BMAP_PANORAMA_POI_MOVIE: string
-declare const BMAP_PANORAMA_POI_TRANSIT: string
-declare const BMAP_PANORAMA_POI_INDOOR_SCENE: string
-declare const BMAP_PANORAMA_POI_NONE: string
+// Type definitions for BaiduMap v2.0
+// Project: http://lbsyun.baidu.com/index.php?title=jspopular
+// Definitions by: Codemonk
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/* *****************************************************************************
+Copyright [Codemonk] [Codemonk@live.cn]
+
+This project is licensed under the MIT license.
+Copyrights are respective of each contributor listed at the beginning of each definition file.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+***************************************************************************** */
+
+///
+///
+declare namespace BMap {
+ class Panorama {
+ constructor(container: string | HTMLElement, opts?: PanoramaOptions)
+ getLinks(): PanoramaLink[]
+ getId(): string
+ getPosition(): Point
+ getPov(): PanoramaPov
+ getZoom(): number
+ setId(id: string): void
+ setPosition(position: Point): void
+ setPov(pov: PanoramaPov): void
+ setZoom(zoom: number): void
+ enableScrollWheelZoom(): void
+ disableScrollWheelZoom(): void
+ show(): void
+ hide(): void
+ addOverlay(overlay: PanoramaLabel): void
+ removeOverlay(overlay: PanoramaLabel): void
+ getSceneType(): PanoramaSceneType
+ setOptions(opts?: PanoramaOptions): void
+ setPanoramaPOIType(): PanoramaPOIType
+ onposition_changed: () => void
+ onlinks_changed: () => void
+ onpov_changed: () => void
+ onzoom_changed: () => void
+ onscene_type_changed: () => void
+ }
+
+ interface PanoramaOptions {
+ navigationControl?: boolean
+ linksControl?: boolean
+ indoorSceneSwitchControl?: boolean
+ albumsControl?: boolean
+ albumsControlOptions?: AlbumsControlOptions
+ }
+ interface PanoramaLink {
+ description: string
+ heading: string
+ id: string
+ }
+ interface PanoramaPov {
+ heading: number
+ pitch: number
+ }
+ class PanoramaService {
+ constructor()
+ getPanoramaById(id: string, callback: (data: PanoramaData) => void): void
+ getPanoramaByLocation(point: Point, radius?: number, callback?: (data: PanoramaData) => void): void
+ }
+ interface PanoramaData {
+ id: string
+ description: string
+ links: PanoramaLink[]
+ position: Point
+ tiles: PanoramaTileData
+ }
+ interface PanoramaTileData {
+ centerHeading: number
+ tileSize: Size
+ worldSize: Size
+ }
+ class PanoramaLabel {
+ constructor(content: string, opts?: PanoramaLabelOptions)
+ setPosition(position: Point): void
+ getPosition(): Point
+ getPov(): PanoramaPov
+ setContent(content: string): void
+ getContent(): string
+ show(): void
+ hide(): void
+ setAltitude(altitude: number): void
+ getAltitude(): number
+ addEventListener(event: string, handler: Function): void
+ removeEventListener(event: string, handler: Function): void
+ onclick: (event: { type: string, target: any }) => void
+ onmouseover: (event: { type: string, target: any }) => void
+ onmouseout: (event: { type: string, target: any }) => void
+ onremove: (event: { type: string, target: any }) => void
+ }
+ interface PanoramaLabelOptions {
+ position?: Point
+ altitude?: number
+ }
+ interface AlbumsControlOptions {
+ anchor?: ControlAnchor
+ offset?: Size
+ maxWidth?: number | string
+ imageHeight?: number
+ }
+ type PanoramaSceneType = string
+ type PanoramaPOIType = string
+}
+declare const BMAP_PANORAMA_INDOOR_SCENE: string
+declare const BMAP_PANORAMA_STREET_SCENE: string
+
+declare const BMAP_PANORAMA_POI_HOTEL: string
+declare const BMAP_PANORAMA_POI_CATERING: string
+declare const BMAP_PANORAMA_POI_MOVIE: string
+declare const BMAP_PANORAMA_POI_TRANSIT: string
+declare const BMAP_PANORAMA_POI_INDOOR_SCENE: string
+declare const BMAP_PANORAMA_POI_NONE: string
diff --git a/types/baidumap-web-sdk/baidumap.rightmenu.d.ts b/types/baidumap-web-sdk/baidumap.rightmenu.d.ts
index ef79b71641..b760c73561 100644
--- a/types/baidumap-web-sdk/baidumap.rightmenu.d.ts
+++ b/types/baidumap-web-sdk/baidumap.rightmenu.d.ts
@@ -1,47 +1,47 @@
-// Type definitions for BaiduMap v2.0
-// Project: http://lbsyun.baidu.com/index.php?title=jspopular
-// Definitions by: Codemonk
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-/* *****************************************************************************
-Copyright [Codemonk] [Codemonk@live.cn]
-
-This project is licensed under the MIT license.
-Copyrights are respective of each contributor listed at the beginning of each definition file.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-***************************************************************************** */
-
-///
-
-declare namespace BMap {
- type ContextMenuIcon = string
- interface MenuItemOptions {
- width?: number
- id?: string
- iconUrl?: string
- }
- class MenuItem {
- constructor(text: string, callback: (point: Point) => void, opts?: MenuItemOptions)
- setText(text: string): void
- setIcon(iconUrl: string): void
- enable(): void
- disable(): void
- }
- class ContextMenu {
- constructor()
- addItem(item: MenuItem): void
- getItem(index: number): MenuItem
- removeItem(item: MenuItem): void
- addSeparator(): void
- removeSeparator(index: number): void
- onopen: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- onclose: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
- }
-}
-declare const BMAP_CONTEXT_MENU_ICON_ZOOMIN: string
+// Type definitions for BaiduMap v2.0
+// Project: http://lbsyun.baidu.com/index.php?title=jspopular
+// Definitions by: Codemonk
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/* *****************************************************************************
+Copyright [Codemonk] [Codemonk@live.cn]
+
+This project is licensed under the MIT license.
+Copyrights are respective of each contributor listed at the beginning of each definition file.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+***************************************************************************** */
+
+///
+
+declare namespace BMap {
+ type ContextMenuIcon = string
+ interface MenuItemOptions {
+ width?: number
+ id?: string
+ iconUrl?: string
+ }
+ class MenuItem {
+ constructor(text: string, callback: (point: Point) => void, opts?: MenuItemOptions)
+ setText(text: string): void
+ setIcon(iconUrl: string): void
+ enable(): void
+ disable(): void
+ }
+ class ContextMenu {
+ constructor()
+ addItem(item: MenuItem): void
+ getItem(index: number): MenuItem
+ removeItem(item: MenuItem): void
+ addSeparator(): void
+ removeSeparator(index: number): void
+ onopen: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ onclose: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void
+ }
+}
+declare const BMAP_CONTEXT_MENU_ICON_ZOOMIN: string
declare const BMAP_CONTEXT_MENU_ICON_ZOOMOUT: string
\ No newline at end of file
diff --git a/types/baidumap-web-sdk/baidumap.service.d.ts b/types/baidumap-web-sdk/baidumap.service.d.ts
index 54ca6f7e1d..dbff0b7dfe 100644
--- a/types/baidumap-web-sdk/baidumap.service.d.ts
+++ b/types/baidumap-web-sdk/baidumap.service.d.ts
@@ -1,432 +1,432 @@
-// Type definitions for BaiduMap v2.0
-// Project: http://lbsyun.baidu.com/index.php?title=jspopular
-// Definitions by: Codemonk
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-/* *****************************************************************************
-Copyright [Codemonk] [Codemonk@live.cn]
-
-This project is licensed under the MIT license.
-Copyrights are respective of each contributor listed at the beginning of each definition file.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-***************************************************************************** */
-
-///
-///
-declare namespace BMap {
- class LocalSearch {
- constructor(location: Map | Point | string, opts?: LocalSearchOptions)
- search(keyword: string | Array, option?: Object): void
- searchInBounds(keyword: string | Array, bounds: Bounds, option?: Object): void
- searchNearby(keyword: string | Array, center: LocalResultPoi | string | Point, radius: number, option?: Object): void
- getResults(): LocalResult | LocalResult[]
- clearResults(): void
- gotoPage(page: number): void
- enableAutoViewport(): void
- disableAutoViewport(): void
- enableFirstResultSelection(): void
- disableFirstResultSelection(): void
- setLocation(location: Map | Point | string): void
- setPageCapacity(capacity: number): void
- getPageCapacity(): number
- setSearchCompleteCallback(callback: (results: LocalResult | LocalResult[]) => void): void
- setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void
- setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void
- setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void
- getStatus(): ServiceStatusCode
- }
- type LineType = number
- interface WalkingRouteResult {
- city: string
- getStart(): LocalResultPoi
- getEnd(): LocalResultPoi
- getNumPlans(): number
- getPlan(i: number): RoutePlan
- }
- class BusLineSearch {
- constructor(location: Map | Point | string, opts?: BusLineSearchOptions)
- getBusList(keyword: string): void
- getBusLine(busLstItem: BusListItem): void
- clearResults(): void
- enableAutoViewport(): void
- disableAutoViewport(): void
- setLocation(location: Map | Point | string): void
- getStatus(): ServiceStatusCode
- toString(): string
- setGetBusListCompleteCallback(callback: (rs: BusListResult) => void): void
- setGetBusLineCompleteCallback(callback: (rs: BusLine) => void): void
- setBusListHtmlSetCallback(callback: (container: HTMLElement) => void): void
- setBusLineHtmlSetCallback(callback: (container: HTMLElement) => void): void
- setPolylinesSetCallback(callback: (ply: Polyline) => void): void
- setMarkersSetCallback(callback: (markers: Marker[]) => void): void
- }
- interface LocalSearchOptions {
- renderOptions?: RenderOptions
- onMarkersSet?: (pois: LocalResultPoi[]) => void
- onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void
- onResultsHtmlSet?: (container: HTMLElement) => void
- pageCapacity?: number
- onSearchComplete?: (results: LocalResult[]) => void
- }
- class DrivingRoute {
- constructor(location: Map | Point | string, opts?: DrivingRouteOptions)
- search(start: string | Point | LocalResultPoi, end: string | Point | LocalResultPoi, opts?: Object): void
- getResults(): DrivingRouteResult
- clearResults(): void
- enableAutoViewport(): void
- disableAutoViewport(): void
- setLocation(location: Map | Point | string): void
- setPolicy(policy: DrivingPolicy): void
- setSearchCompleteCallback(callback: (results: DrivingRouteResult) => void): void
- setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void
- setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void
- setPolylinesSetCallback(callback: (routes: Route[]) => void): void
- setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void
- getStatus(): ServiceStatusCode
- toString(): string
- }
- class Geocoder {
- constructor()
- getPoint(address: string, callback: (point: Point) => void, city: string): void
- getLocation(point: Point, callback: (result: GeocoderResult) => void, opts?: LocationOptions): void
- }
- interface BusLineSearchOptions {
- renderOptions?: RenderOptions
- onGetBusListComplete?: (rs: BusListResult) => void
- onGetBusLineComplete?: (rs: BusLine) => void
- onBusListHtmlSet?: (container: HTMLElement) => void
- onBusLineHtmlSet?: (container: HTMLElement) => void
- onPolylinesSet?: (ply: Polyline) => void
- onMarkersSet?: (sts: Marker[]) => void
- }
- interface CustomData {
- geotableId: number
- tags: string
- filter: string
- }
- interface DrivingRouteOptions {
- renderOptions?: RenderOptions
- policy?: DrivingPolicy
- onSearchComplete?: (results: DrivingRouteResult) => void
- onMarkersSet?: (pois: LocalResultPoi[]) => void
- onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void
- onPolylinesSet?: (routes: Route[]) => void
- onResultsHtmlSet?: (container: HTMLElement) => void
- }
- interface GeocoderResult {
- point: Point
- address: string
- addressComponents: AddressComponent
- surroundingPoi: LocalResultPoi[]
- business: string
- }
- interface BusListResult {
- keyword: string
- city: string
- moreResultsUrl: string
- getNumBusList(): number
- getBusListItem(i: number): BusListItem
- }
- interface RenderOptions {
- map: Map
- panel?: string | HTMLElement
- selectFirstResult?: boolean
- autoViewport?: boolean
- highlightMode?: HighlightModes
- }
- type DrivingPolicy = number
- interface AddressComponent {
- streetNumber: string
- street: string
- district: string
- city: string
- province: string
- }
- interface BusLine {
- name: string
- startTime: string
- endTime: string
- company: string
- getNumBusStations(): string
- getBusStation(i: number): BusStation
- getPath(): Point[]
- getPolyline(): Polyline
- }
- interface LocalResult {
- keyword: string
- center: LocalResultPoi
- radius: number
- bounds: Bounds
- city: string
- moreResultsUrl: string
- province: string
- suggestions: string[]
- getPoi(i: number): LocalResultPoi
- getCurrentNumPois(): number
- getNumPois(): number
- getNumPages(): number
- getPageIndex(): number
- getCityList(): any[]
- }
-
- interface DrivingRouteResult {
- policy: DrivingPolicy
- city: string
- moreResultsUrl: string
- taxiFare: TaxiFare
- getStart(): LocalResultPoi
- getEnd(): LocalResultPoi
- getNumPlans(): number
- getPlan(i: number): RoutePlan
- }
- interface LocationOptions {
- poiRadius?: number
- numPois?: number
- }
- interface BusListItem {
- name: string
- }
- interface LocalResultPoi {
- title: string
- point: Point
- url: string
- address: string
- city: string
- phoneNumber: string
- postcode: string
- type: PoiType
- isAccurate: boolean
- province: string
- tags: string[]
- detailUrl: string
- }
- interface TaxiFare {
- day: TaxiFareDetail
- night: TaxiFareDetail
- distance: number
- remark: string
- }
- class LocalCity {
- constructor(opts?: LocalCityOptions)
- get(callback: (result: LocalCityResult) => void): void
- }
- interface BusStation {
- name: string
- position: Point
- }
- type PoiType = number
- interface TaxiFareDetail {
- initialFare: number
- unitFare: number
- totalFare: number
- }
- interface LocalCityOptions {
- renderOptions?: RenderOptions
- }
- class Autocomplete {
- constructor(opts?: AutocompleteOptions)
- show(): void
- hide(): void
- setTypes(types: string[]): void
- setLocation(location: string | Map | Point): void
- search(keywords: string): void
- getResults(): AutocompleteResult
- setInputValue(keyword: string): void
- dispose(): void
- onconfirm: (event: { type: string, target: any, item: any }) => void
- onhighlight: (event: { type: string, target: any, fromitem: any, toitem: any }) => void
- }
- class TransitRoute {
- constructor(location: Map | Point | string, opts?: TransitRouteOptions)
- search(start: string | Point | LocalResultPoi, end: string | Point | LocalResultPoi): void
- getResults(): TransitRouteResult
- clearResults(): void
- enableAutoViewport(): void
- disableAutoViewport(): void
- setPageCapacity(capacity: number): void
- setLocation(location: Map | Point | string): void
- setPolicy(policy: TransitPolicy): void
- setSearchCompleteCallback(callback: (results: TransitRouteResult) => void): void
- setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void
- setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void
- setPolylinesSetCallback(callback: (lines: Line[], routes: Route[]) => void): void
- setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void
- getStatus(): ServiceStatusCode
- toString(): string
- }
- interface RoutePlan {
- getNumRoutes(): number
- getRoute(i: number): Route
- getDistance(format?: boolean): string | number
- getDuration(format?: boolean): string | number
- getDragPois(): LocalResultPoi[]
- }
- interface LocalCityResult {
- center: Point
- level: number
- name: string
- }
- interface AutocompleteOptions {
- location?: string | Map | Point
- types?: string[]
- onSearchComplete?: (result: AutocompleteResult) => void
- input?: string | HTMLElement
- }
- interface TransitRouteOptions {
- renderOptions?: RenderOptions
- policy?: TransitPolicy
- pageCapacity?: number
- onSearchComplete?: (result: TransitRouteResult) => void
- onMarkersSet?: (pois: LocalResultPoi[], transfers: LocalResultPoi[]) => void
- onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void
- onPolylinesSet?: (lines: Line[]) => void
- onResultsHtmlSet?: (container: HTMLElement) => void
- }
- interface Route {
- getNumRoutes(): number
- getStep(i: number): Step
- getDistance(format?: boolean): string | number
- getIndex(): number
- getPolyline(): Polyline
- getPoints(): Point[]
- getPath(): Point[]
- getRouteType(): RouteType
- }
- class TrafficControl {
- constructor()
- setPanelOffset(offset: Size): void
- show(): void
- hide(): void
- }
- interface AutocompleteResultPoi {
- province: string
- City: string//wtf
- district: string
- street: string
- streetNumber: string
- business: string
- }
- type TransitPolicy = number
- type RouteType = number
- class Geolocation {
- constructor()
- getCurrentPosition(callback: (result: GeolocationResult) => void, opts?: PositionOptions): void
- getStatus(): ServiceStatusCode
- }
- interface AutocompleteResult {
- keyword: string
- getPoi(i: number): AutocompleteResultPoi
- getNumPois(): number
- }
- interface TransitRouteResult {
- policy: TransitPolicy
- city: string
- moreResultsUrl: string
- getStart(): LocalResultPoi
- getEnd(): LocalResultPoi
- getNumPlans(): number
- getPlan(i: number): TransitRoutePlan
- }
- interface Step {
- getPoint(): Point
- getPosition(): Point
- getIndex(): number
- getDescription(includeHtml: boolean): string
- getDistance(format?: boolean): string | number
- }
- interface GeolocationResult {
- point: Point
- accuracy: number
- }
- class Boundary {
- constructor()
- get(name: string, callback: (result: string[]) => void): void
- }
- interface TransitRoutePlan {
- getNumLines(): number
- getLine(i: number): Line
- getNumRoutes(): number
- getRoute(i: number): Route
- getDistance(format?: boolean): string | number
- getDuration(format?: boolean): string | number
- getDescription(includeHtml: boolean): string
- }
- class WalkingRoute {
- constructor(location: Map | Point | string, opts?: WalkingRouteOptions)
- search(start: string | Point | LocalResultPoi, end: string | Point | LocalResultPoi): void
- getResults(): WalkingRouteResult
- clearResults(): void
- enableAutoViewport(): void
- disableAutoViewport(): void
- setLocation(location: Map | Point | string): void
- setSearchCompleteCallback(callback: (result: WalkingRouteResult) => void): void
- setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void
- setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void
- setPolylinesSetCallback(callback: (routes: Route[]) => void): void
- setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void
- getStatus(): ServiceStatusCode
- toString(): string
- }
- interface PositionOptions {
- enableHighAccuracy?: boolean
- timeout?: number
- maximumAge?: number
- }
- interface Line {
- title: string
- type: LineType
- getNumViaStops(): number
- getGetOnStop(): LocalResultPoi
- getGetOffStop(): LocalResultPoi
- getPoints(): Point[]
- getPath(): Point[]
- getPolyline(): Polyline
- getDistance(format?: boolean): string | number
- }
- interface WalkingRouteOptions {
- renderOptions?: RenderOptions,
- onSearchComplete?: (result: WalkingRouteResult) => void,
- onMarkersSet?: (pois: LocalResultPoi[]) => void,
- onPolylinesSet?: (routes: Route[]) => void,
- onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void,
- onResultsHtmlSet?: (container: HTMLElement) => void
- }
- type HighlightModes = number
- type ServiceStatusCode = number
-}
-
-declare const BMAP_LINE_TYPE_BUS: BMap.LineType
-declare const BMAP_LINE_TYPE_SUBWAY: BMap.LineType
-declare const BMAP_LINE_TYPE_FERRY: BMap.LineType
-
-declare const BMAP_DRIVING_POLICY_LEAST_TIME: BMap.DrivingPolicy
-declare const BMAP_DRIVING_POLICY_LEAST_DISTANCE: BMap.DrivingPolicy
-declare const BMAP_DRIVING_POLICY_AVOID_HIGHWAYS: BMap.DrivingPolicy
-
-declare const BMAP_POI_TYPE_NORMAL: BMap.PoiType
-declare const BMAP_POI_TYPE_BUSSTOP: BMap.PoiType
-declare const BMAP_POI_TYPE_SUBSTOP: BMap.PoiType
-
-
-declare const BMAP_TRANSIT_POLICY_LEAST_TIME: BMap.TransitPolicy
-declare const BMAP_TRANSIT_POLICY_LEAST_TRANSFER: BMap.TransitPolicy
-declare const BMAP_TRANSIT_POLICY_LEAST_WALKING: BMap.TransitPolicy
-declare const BMAP_TRANSIT_POLICY_AVOID_SUBWAYS: BMap.TransitPolicy
-
-declare const BMAP_ROUTE_TYPE_DRIVING: BMap.RouteType
-declare const BMAP_ROUTE_TYPE_WALKING: BMap.RouteType
-
-declare const BMAP_HIGHLIGHT_STEP: BMap.HighlightModes
-declare const BMAP_HIGHLIGHT_ROUTE: BMap.HighlightModes
-
-declare const BMAP_STATUS_SUCCESS: BMap.ServiceStatusCode
-declare const BMAP_STATUS_CITY_LIST: BMap.ServiceStatusCode
-declare const BMAP_STATUS_UNKNOWN_LOCATION: BMap.ServiceStatusCode
-declare const BMAP_STATUS_UNKNOWN_ROUTE: BMap.ServiceStatusCode
-declare const BMAP_STATUS_INVALID_KEY: BMap.ServiceStatusCode
-declare const BMAP_STATUS_INVALID_REQUEST: BMap.ServiceStatusCode
\ No newline at end of file
+// Type definitions for BaiduMap v2.0
+// Project: http://lbsyun.baidu.com/index.php?title=jspopular
+// Definitions by: Codemonk
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/* *****************************************************************************
+Copyright [Codemonk] [Codemonk@live.cn]
+
+This project is licensed under the MIT license.
+Copyrights are respective of each contributor listed at the beginning of each definition file.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+***************************************************************************** */
+
+///
+///
+declare namespace BMap {
+ class LocalSearch {
+ constructor(location: Map | Point | string, opts?: LocalSearchOptions)
+ search(keyword: string | Array, option?: Object): void
+ searchInBounds(keyword: string | Array, bounds: Bounds, option?: Object): void
+ searchNearby(keyword: string | Array, center: LocalResultPoi | string | Point, radius: number, option?: Object): void
+ getResults(): LocalResult | LocalResult[]
+ clearResults(): void
+ gotoPage(page: number): void
+ enableAutoViewport(): void
+ disableAutoViewport(): void
+ enableFirstResultSelection(): void
+ disableFirstResultSelection(): void
+ setLocation(location: Map | Point | string): void
+ setPageCapacity(capacity: number): void
+ getPageCapacity(): number
+ setSearchCompleteCallback(callback: (results: LocalResult | LocalResult[]) => void): void
+ setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void
+ setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void
+ setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void
+ getStatus(): ServiceStatusCode
+ }
+ type LineType = number
+ interface WalkingRouteResult {
+ city: string
+ getStart(): LocalResultPoi
+ getEnd(): LocalResultPoi
+ getNumPlans(): number
+ getPlan(i: number): RoutePlan
+ }
+ class BusLineSearch {
+ constructor(location: Map | Point | string, opts?: BusLineSearchOptions)
+ getBusList(keyword: string): void
+ getBusLine(busLstItem: BusListItem): void
+ clearResults(): void
+ enableAutoViewport(): void
+ disableAutoViewport(): void
+ setLocation(location: Map | Point | string): void
+ getStatus(): ServiceStatusCode
+ toString(): string
+ setGetBusListCompleteCallback(callback: (rs: BusListResult) => void): void
+ setGetBusLineCompleteCallback(callback: (rs: BusLine) => void): void
+ setBusListHtmlSetCallback(callback: (container: HTMLElement) => void): void
+ setBusLineHtmlSetCallback(callback: (container: HTMLElement) => void): void
+ setPolylinesSetCallback(callback: (ply: Polyline) => void): void
+ setMarkersSetCallback(callback: (markers: Marker[]) => void): void
+ }
+ interface LocalSearchOptions {
+ renderOptions?: RenderOptions
+ onMarkersSet?: (pois: LocalResultPoi[]) => void
+ onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void
+ onResultsHtmlSet?: (container: HTMLElement) => void
+ pageCapacity?: number
+ onSearchComplete?: (results: LocalResult[]) => void
+ }
+ class DrivingRoute {
+ constructor(location: Map | Point | string, opts?: DrivingRouteOptions)
+ search(start: string | Point | LocalResultPoi, end: string | Point | LocalResultPoi, opts?: Object): void
+ getResults(): DrivingRouteResult
+ clearResults(): void
+ enableAutoViewport(): void
+ disableAutoViewport(): void
+ setLocation(location: Map | Point | string): void
+ setPolicy(policy: DrivingPolicy): void
+ setSearchCompleteCallback(callback: (results: DrivingRouteResult) => void): void
+ setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void
+ setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void
+ setPolylinesSetCallback(callback: (routes: Route[]) => void): void
+ setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void
+ getStatus(): ServiceStatusCode
+ toString(): string
+ }
+ class Geocoder {
+ constructor()
+ getPoint(address: string, callback: (point: Point) => void, city: string): void
+ getLocation(point: Point, callback: (result: GeocoderResult) => void, opts?: LocationOptions): void
+ }
+ interface BusLineSearchOptions {
+ renderOptions?: RenderOptions
+ onGetBusListComplete?: (rs: BusListResult) => void
+ onGetBusLineComplete?: (rs: BusLine) => void
+ onBusListHtmlSet?: (container: HTMLElement) => void
+ onBusLineHtmlSet?: (container: HTMLElement) => void
+ onPolylinesSet?: (ply: Polyline) => void
+ onMarkersSet?: (sts: Marker[]) => void
+ }
+ interface CustomData {
+ geotableId: number
+ tags: string
+ filter: string
+ }
+ interface DrivingRouteOptions {
+ renderOptions?: RenderOptions
+ policy?: DrivingPolicy
+ onSearchComplete?: (results: DrivingRouteResult) => void
+ onMarkersSet?: (pois: LocalResultPoi[]) => void
+ onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void
+ onPolylinesSet?: (routes: Route[]) => void
+ onResultsHtmlSet?: (container: HTMLElement) => void
+ }
+ interface GeocoderResult {
+ point: Point
+ address: string
+ addressComponents: AddressComponent
+ surroundingPoi: LocalResultPoi[]
+ business: string
+ }
+ interface BusListResult {
+ keyword: string
+ city: string
+ moreResultsUrl: string
+ getNumBusList(): number
+ getBusListItem(i: number): BusListItem
+ }
+ interface RenderOptions {
+ map: Map
+ panel?: string | HTMLElement
+ selectFirstResult?: boolean
+ autoViewport?: boolean
+ highlightMode?: HighlightModes
+ }
+ type DrivingPolicy = number
+ interface AddressComponent {
+ streetNumber: string
+ street: string
+ district: string
+ city: string
+ province: string
+ }
+ interface BusLine {
+ name: string
+ startTime: string
+ endTime: string
+ company: string
+ getNumBusStations(): string
+ getBusStation(i: number): BusStation
+ getPath(): Point[]
+ getPolyline(): Polyline
+ }
+ interface LocalResult {
+ keyword: string
+ center: LocalResultPoi
+ radius: number
+ bounds: Bounds
+ city: string
+ moreResultsUrl: string
+ province: string
+ suggestions: string[]
+ getPoi(i: number): LocalResultPoi
+ getCurrentNumPois(): number
+ getNumPois(): number
+ getNumPages(): number
+ getPageIndex(): number
+ getCityList(): any[]
+ }
+
+ interface DrivingRouteResult {
+ policy: DrivingPolicy
+ city: string
+ moreResultsUrl: string
+ taxiFare: TaxiFare
+ getStart(): LocalResultPoi
+ getEnd(): LocalResultPoi
+ getNumPlans(): number
+ getPlan(i: number): RoutePlan
+ }
+ interface LocationOptions {
+ poiRadius?: number
+ numPois?: number
+ }
+ interface BusListItem {
+ name: string
+ }
+ interface LocalResultPoi {
+ title: string
+ point: Point
+ url: string
+ address: string
+ city: string
+ phoneNumber: string
+ postcode: string
+ type: PoiType
+ isAccurate: boolean
+ province: string
+ tags: string[]
+ detailUrl: string
+ }
+ interface TaxiFare {
+ day: TaxiFareDetail
+ night: TaxiFareDetail
+ distance: number
+ remark: string
+ }
+ class LocalCity {
+ constructor(opts?: LocalCityOptions)
+ get(callback: (result: LocalCityResult) => void): void
+ }
+ interface BusStation {
+ name: string
+ position: Point
+ }
+ type PoiType = number
+ interface TaxiFareDetail {
+ initialFare: number
+ unitFare: number
+ totalFare: number
+ }
+ interface LocalCityOptions {
+ renderOptions?: RenderOptions
+ }
+ class Autocomplete {
+ constructor(opts?: AutocompleteOptions)
+ show(): void
+ hide(): void
+ setTypes(types: string[]): void
+ setLocation(location: string | Map | Point): void
+ search(keywords: string): void
+ getResults(): AutocompleteResult
+ setInputValue(keyword: string): void
+ dispose(): void
+ onconfirm: (event: { type: string, target: any, item: any }) => void
+ onhighlight: (event: { type: string, target: any, fromitem: any, toitem: any }) => void
+ }
+ class TransitRoute {
+ constructor(location: Map | Point | string, opts?: TransitRouteOptions)
+ search(start: string | Point | LocalResultPoi, end: string | Point | LocalResultPoi): void
+ getResults(): TransitRouteResult
+ clearResults(): void
+ enableAutoViewport(): void
+ disableAutoViewport(): void
+ setPageCapacity(capacity: number): void
+ setLocation(location: Map | Point | string): void
+ setPolicy(policy: TransitPolicy): void
+ setSearchCompleteCallback(callback: (results: TransitRouteResult) => void): void
+ setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void
+ setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void
+ setPolylinesSetCallback(callback: (lines: Line[], routes: Route[]) => void): void
+ setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void
+ getStatus(): ServiceStatusCode
+ toString(): string
+ }
+ interface RoutePlan {
+ getNumRoutes(): number
+ getRoute(i: number): Route
+ getDistance(format?: boolean): string | number
+ getDuration(format?: boolean): string | number
+ getDragPois(): LocalResultPoi[]
+ }
+ interface LocalCityResult {
+ center: Point
+ level: number
+ name: string
+ }
+ interface AutocompleteOptions {
+ location?: string | Map | Point
+ types?: string[]
+ onSearchComplete?: (result: AutocompleteResult) => void
+ input?: string | HTMLElement
+ }
+ interface TransitRouteOptions {
+ renderOptions?: RenderOptions
+ policy?: TransitPolicy
+ pageCapacity?: number
+ onSearchComplete?: (result: TransitRouteResult) => void
+ onMarkersSet?: (pois: LocalResultPoi[], transfers: LocalResultPoi[]) => void
+ onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void
+ onPolylinesSet?: (lines: Line[]) => void
+ onResultsHtmlSet?: (container: HTMLElement) => void
+ }
+ interface Route {
+ getNumRoutes(): number
+ getStep(i: number): Step
+ getDistance(format?: boolean): string | number
+ getIndex(): number
+ getPolyline(): Polyline
+ getPoints(): Point[]
+ getPath(): Point[]
+ getRouteType(): RouteType
+ }
+ class TrafficControl {
+ constructor()
+ setPanelOffset(offset: Size): void
+ show(): void
+ hide(): void
+ }
+ interface AutocompleteResultPoi {
+ province: string
+ City: string//wtf
+ district: string
+ street: string
+ streetNumber: string
+ business: string
+ }
+ type TransitPolicy = number
+ type RouteType = number
+ class Geolocation {
+ constructor()
+ getCurrentPosition(callback: (result: GeolocationResult) => void, opts?: PositionOptions): void
+ getStatus(): ServiceStatusCode
+ }
+ interface AutocompleteResult {
+ keyword: string
+ getPoi(i: number): AutocompleteResultPoi
+ getNumPois(): number
+ }
+ interface TransitRouteResult {
+ policy: TransitPolicy
+ city: string
+ moreResultsUrl: string
+ getStart(): LocalResultPoi
+ getEnd(): LocalResultPoi
+ getNumPlans(): number
+ getPlan(i: number): TransitRoutePlan
+ }
+ interface Step {
+ getPoint(): Point
+ getPosition(): Point
+ getIndex(): number
+ getDescription(includeHtml: boolean): string
+ getDistance(format?: boolean): string | number
+ }
+ interface GeolocationResult {
+ point: Point
+ accuracy: number
+ }
+ class Boundary {
+ constructor()
+ get(name: string, callback: (result: string[]) => void): void
+ }
+ interface TransitRoutePlan {
+ getNumLines(): number
+ getLine(i: number): Line
+ getNumRoutes(): number
+ getRoute(i: number): Route
+ getDistance(format?: boolean): string | number
+ getDuration(format?: boolean): string | number
+ getDescription(includeHtml: boolean): string
+ }
+ class WalkingRoute {
+ constructor(location: Map | Point | string, opts?: WalkingRouteOptions)
+ search(start: string | Point | LocalResultPoi, end: string | Point | LocalResultPoi): void
+ getResults(): WalkingRouteResult
+ clearResults(): void
+ enableAutoViewport(): void
+ disableAutoViewport(): void
+ setLocation(location: Map | Point | string): void
+ setSearchCompleteCallback(callback: (result: WalkingRouteResult) => void): void
+ setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void
+ setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void
+ setPolylinesSetCallback(callback: (routes: Route[]) => void): void
+ setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void
+ getStatus(): ServiceStatusCode
+ toString(): string
+ }
+ interface PositionOptions {
+ enableHighAccuracy?: boolean
+ timeout?: number
+ maximumAge?: number
+ }
+ interface Line {
+ title: string
+ type: LineType
+ getNumViaStops(): number
+ getGetOnStop(): LocalResultPoi
+ getGetOffStop(): LocalResultPoi
+ getPoints(): Point[]
+ getPath(): Point[]
+ getPolyline(): Polyline
+ getDistance(format?: boolean): string | number
+ }
+ interface WalkingRouteOptions {
+ renderOptions?: RenderOptions,
+ onSearchComplete?: (result: WalkingRouteResult) => void,
+ onMarkersSet?: (pois: LocalResultPoi[]) => void,
+ onPolylinesSet?: (routes: Route[]) => void,
+ onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void,
+ onResultsHtmlSet?: (container: HTMLElement) => void
+ }
+ type HighlightModes = number
+ type ServiceStatusCode = number
+}
+
+declare const BMAP_LINE_TYPE_BUS: BMap.LineType
+declare const BMAP_LINE_TYPE_SUBWAY: BMap.LineType
+declare const BMAP_LINE_TYPE_FERRY: BMap.LineType
+
+declare const BMAP_DRIVING_POLICY_LEAST_TIME: BMap.DrivingPolicy
+declare const BMAP_DRIVING_POLICY_LEAST_DISTANCE: BMap.DrivingPolicy
+declare const BMAP_DRIVING_POLICY_AVOID_HIGHWAYS: BMap.DrivingPolicy
+
+declare const BMAP_POI_TYPE_NORMAL: BMap.PoiType
+declare const BMAP_POI_TYPE_BUSSTOP: BMap.PoiType
+declare const BMAP_POI_TYPE_SUBSTOP: BMap.PoiType
+
+
+declare const BMAP_TRANSIT_POLICY_LEAST_TIME: BMap.TransitPolicy
+declare const BMAP_TRANSIT_POLICY_LEAST_TRANSFER: BMap.TransitPolicy
+declare const BMAP_TRANSIT_POLICY_LEAST_WALKING: BMap.TransitPolicy
+declare const BMAP_TRANSIT_POLICY_AVOID_SUBWAYS: BMap.TransitPolicy
+
+declare const BMAP_ROUTE_TYPE_DRIVING: BMap.RouteType
+declare const BMAP_ROUTE_TYPE_WALKING: BMap.RouteType
+
+declare const BMAP_HIGHLIGHT_STEP: BMap.HighlightModes
+declare const BMAP_HIGHLIGHT_ROUTE: BMap.HighlightModes
+
+declare const BMAP_STATUS_SUCCESS: BMap.ServiceStatusCode
+declare const BMAP_STATUS_CITY_LIST: BMap.ServiceStatusCode
+declare const BMAP_STATUS_UNKNOWN_LOCATION: BMap.ServiceStatusCode
+declare const BMAP_STATUS_UNKNOWN_ROUTE: BMap.ServiceStatusCode
+declare const BMAP_STATUS_INVALID_KEY: BMap.ServiceStatusCode
+declare const BMAP_STATUS_INVALID_REQUEST: BMap.ServiceStatusCode
\ No newline at end of file
diff --git a/types/baidumap-web-sdk/baidumap.tools.d.ts b/types/baidumap-web-sdk/baidumap.tools.d.ts
index cd3ba6b619..c1bc6bf929 100644
--- a/types/baidumap-web-sdk/baidumap.tools.d.ts
+++ b/types/baidumap-web-sdk/baidumap.tools.d.ts
@@ -1,61 +1,61 @@
-// Type definitions for BaiduMap v2.0
-// Project: http://lbsyun.baidu.com/index.php?title=jspopular
-// Definitions by: Codemonk
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-/* *****************************************************************************
-Copyright [Codemonk] [Codemonk@live.cn]
-
-This project is licensed under the MIT license.
-Copyrights are respective of each contributor listed at the beginning of each definition file.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-***************************************************************************** */
-
-///
-///
-///
-declare namespace BMap {
- class PushpinTool {
- constructor(map: Map, opts?: PushpinToolOptions)
- open(): boolean
- close(): boolean
- setIcon(icon: Icon): Icon
- getIcon(): Icon
- setCursor(cursor: string): string
- getCursor(): string
- toString(): string
- onmarkend: (event: { type: string, target: any, marker: Marker }) => void
- }
- interface PushpinToolOptions {
- icon?: Icon
- cursor?: string
- followText?: string
- }
- class DistanceTool {
- constructor(map: Map)
- open(): boolean
- close(): void
- toString(): string
- ondrawend: (event: { type: string, target: any, points: Point[], polylines: Polyline[], distance: number }) => void
- }
- class DragAndZoomTool {
- constructor(map: Map, opts?: DragAndZoomToolOptions)
- open(): boolean
- close(): void
- toString(): string
- ondrawend: (event: { type: string, target: any, bounds: Bounds[] }) => void
- }
- interface DragAndZoomToolOptions {
- zoomType?: ZoomType,
- autoClose?: boolean,
- followText?: string
- }
- type ZoomType = number
-}
-declare const BMAP_ZOOM_IN: BMap.ZoomType
+// Type definitions for BaiduMap v2.0
+// Project: http://lbsyun.baidu.com/index.php?title=jspopular
+// Definitions by: Codemonk
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/* *****************************************************************************
+Copyright [Codemonk] [Codemonk@live.cn]
+
+This project is licensed under the MIT license.
+Copyrights are respective of each contributor listed at the beginning of each definition file.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+***************************************************************************** */
+
+///
+///
+///
+declare namespace BMap {
+ class PushpinTool {
+ constructor(map: Map, opts?: PushpinToolOptions)
+ open(): boolean
+ close(): boolean
+ setIcon(icon: Icon): Icon
+ getIcon(): Icon
+ setCursor(cursor: string): string
+ getCursor(): string
+ toString(): string
+ onmarkend: (event: { type: string, target: any, marker: Marker }) => void
+ }
+ interface PushpinToolOptions {
+ icon?: Icon
+ cursor?: string
+ followText?: string
+ }
+ class DistanceTool {
+ constructor(map: Map)
+ open(): boolean
+ close(): void
+ toString(): string
+ ondrawend: (event: { type: string, target: any, points: Point[], polylines: Polyline[], distance: number }) => void
+ }
+ class DragAndZoomTool {
+ constructor(map: Map, opts?: DragAndZoomToolOptions)
+ open(): boolean
+ close(): void
+ toString(): string
+ ondrawend: (event: { type: string, target: any, bounds: Bounds[] }) => void
+ }
+ interface DragAndZoomToolOptions {
+ zoomType?: ZoomType,
+ autoClose?: boolean,
+ followText?: string
+ }
+ type ZoomType = number
+}
+declare const BMAP_ZOOM_IN: BMap.ZoomType
declare const BMAP_ZOOM_OUT: BMap.ZoomType
\ No newline at end of file
diff --git a/types/baidumap-web-sdk/index.d.ts b/types/baidumap-web-sdk/index.d.ts
index cfab71e884..ac8f27c87b 100644
--- a/types/baidumap-web-sdk/index.d.ts
+++ b/types/baidumap-web-sdk/index.d.ts
@@ -1,28 +1,28 @@
-// Type definitions for BaiduMap v2.0
-// Project: http://lbsyun.baidu.com/index.php?title=jspopular
-// Definitions by: Codemonk
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-/* *****************************************************************************
-Copyright [Codemonk] [Codemonk@live.cn]
-
-This project is licensed under the MIT license.
-Copyrights are respective of each contributor listed at the beginning of each definition file.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-***************************************************************************** */
-
-///
-///
-///
-///
-///
-///
-///
-///
-///
-///
\ No newline at end of file
+// Type definitions for BaiduMap v2.0
+// Project: http://lbsyun.baidu.com/index.php?title=jspopular
+// Definitions by: Codemonk
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+
+/* *****************************************************************************
+Copyright [Codemonk] [Codemonk@live.cn]
+
+This project is licensed under the MIT license.
+Copyrights are respective of each contributor listed at the beginning of each definition file.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+***************************************************************************** */
+
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
\ No newline at end of file
diff --git a/types/baidumap-web-sdk/tslint.json b/types/baidumap-web-sdk/tslint.json
new file mode 100644
index 0000000000..aab43caa1d
--- /dev/null
+++ b/types/baidumap-web-sdk/tslint.json
@@ -0,0 +1,15 @@
+{
+ "extends": "dtslint/dt.json",
+ "rules": {
+ // All are TODOs
+ "eofline": false,
+ "comment-format": false,
+ "dt-header": false,
+ "max-line-length": false,
+ "member-access": false,
+ "no-namespace": false,
+ "no-useless-files": false,
+ "no-var": false,
+ "semicolon": false
+ }
+}
diff --git a/types/bittorrent-protocol/index.d.ts b/types/bittorrent-protocol/index.d.ts
index b5ef1a4a44..7c205edc33 100644
--- a/types/bittorrent-protocol/index.d.ts
+++ b/types/bittorrent-protocol/index.d.ts
@@ -81,7 +81,7 @@ declare namespace BittorrentProtocol {
// TODO: bitfield is a bitfield instance
on(event: 'bitfield', listener: (bitfield: any) => void): this;
- on(event: string | 'keep-alive' | 'choke' | 'unchoke' | 'interested' | 'uninterested' | 'timeout', listener: () => void): this;
+ on(event: 'keep-alive' | 'choke' | 'unchoke' | 'interested' | 'uninterested' | 'timeout', listener: () => void): this;
on(event: 'upload' | 'have' | 'download' | 'port', listener: (length: number) => void): this;
on(event: 'handshake', listener: (infoHash: string, peerId: string, extensions: Extension[]) => void): this;
on(event: 'request', listener: (index: number, offset: number, length: number, respond: () => void) => void): this;
@@ -89,6 +89,7 @@ declare namespace BittorrentProtocol {
on(event: 'cancel', listener: (index: number, offset: number, length: number) => void): this;
on(event: 'extended', listener: (ext: 'handshake' | string, buf: any) => void): void;
on(event: 'unknownmessage', listener: (buffer: Buffer) => void): this;
+ on(event: string, listener: (...args: any[]) => void): this;
}
}
diff --git a/types/blue-tape/index.d.ts b/types/blue-tape/index.d.ts
index 133968a165..c2d2d50ab5 100644
--- a/types/blue-tape/index.d.ts
+++ b/types/blue-tape/index.d.ts
@@ -2,6 +2,7 @@
// Project: https://github.com/spion/blue-tape
// Definitions by: Haoqun Jiang
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.3
///
diff --git a/types/bluebird-global/index.d.ts b/types/bluebird-global/index.d.ts
index 835bc59c31..c0e220ce07 100644
--- a/types/bluebird-global/index.d.ts
+++ b/types/bluebird-global/index.d.ts
@@ -2,6 +2,7 @@
// Project: https://github.com/petkaantonov/bluebird
// Definitions by: d-ph
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.3
/*
* 1. Why use `bluebird-global` instead of `bluebird`?
@@ -117,19 +118,19 @@ declare global {
*
* @todo Duplication of code is never ideal. See whether there's a better way of achieving this.
*/
- catch(predicate: (error: any) => boolean, onReject: (error: any) => T | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird;
- catch(predicate: (error: any) => boolean, onReject: (error: any) => U | Bluebird.Thenable): Bluebird;
- catch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => T | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird;
- catch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => U | Bluebird.Thenable): Bluebird;
- catch(predicate: Object, onReject: (error: any) => T | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird;
- catch(predicate: Object, onReject: (error: any) => U | Bluebird.Thenable): Bluebird;
+ catch(predicate: (error: any) => boolean, onReject: (error: any) => T | PromiseLike | void | PromiseLike): Bluebird;
+ catch(predicate: (error: any) => boolean, onReject: (error: any) => U | PromiseLike): Bluebird;
+ catch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => T | PromiseLike | void | PromiseLike): Bluebird;
+ catch(ErrorClass: new (...args: any[]) => E, onReject: (error: E) => U | PromiseLike): Bluebird;
+ catch(predicate: Object, onReject: (error: any) => T | PromiseLike | void | PromiseLike): Bluebird;
+ catch(predicate: Object, onReject: (error: any) => U | PromiseLike): Bluebird;
}
/*
* Patch all static methods and the constructor
*/
interface PromiseConstructor {
- new (callback: (resolve: (thenableOrResult?: T | Bluebird.Thenable) => void, reject: (error?: any) => void, onCancel?: (callback: () => void) => void) => void): Promise;
+ new (callback: (resolve: (thenableOrResult?: T | PromiseLike) => void, reject: (error?: any) => void, onCancel?: (callback: () => void) => void) => void): Promise;
// all: typeof Bluebird.all;
any: typeof Bluebird.any;
diff --git a/types/bluebird-retry/index.d.ts b/types/bluebird-retry/index.d.ts
index 63adc1476d..97d756524b 100644
--- a/types/bluebird-retry/index.d.ts
+++ b/types/bluebird-retry/index.d.ts
@@ -2,6 +2,7 @@
// Project: https://github.com/jut-io/bluebird-retry
// Definitions by: Pascal Vomhoff
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.3
///
diff --git a/types/bluebird/bluebird-tests.ts b/types/bluebird/bluebird-tests.ts
index c8fab7d57e..e616ae3f85 100644
--- a/types/bluebird/bluebird-tests.ts
+++ b/types/bluebird/bluebird-tests.ts
@@ -373,6 +373,30 @@ fooProm = fooProm.catch(CustomError, reason => {
fooProm = fooProm.catch(CustomError1, CustomError2, CustomError3, error => {});
fooProm = fooProm.catch(CustomError1, CustomError2, CustomError3, CustomError4, error => {});
fooProm = fooProm.catch(CustomError1, CustomError2, CustomError3, CustomError4, CustomError5, error => {});
+
+ const booPredicate1 = (error: CustomError1) => true;
+ const booPredicate2 = (error: [number]) => true;
+ const booPredicate3 = (error: string) => true;
+ const booPredicate4 = (error: Object) => true;
+ const booPredicate5 = (error: any) => true;
+
+ fooProm = fooProm.catch(booPredicate1, error => {});
+ fooProm = fooProm.catch(booPredicate1, booPredicate2, error => {});
+ fooProm = fooProm.catch(booPredicate1, booPredicate2, booPredicate3, error => {});
+ fooProm = fooProm.catch(booPredicate1, booPredicate2, booPredicate3, booPredicate4, error => {});
+ fooProm = fooProm.catch(booPredicate1, booPredicate2, booPredicate3, booPredicate4, booPredicate5, error => {});
+
+ const booObject1 = new CustomError1();
+ const booObject2 = [400, 500];
+ const booObject3 = ["Error1", "Error2"];
+ const booObject4 = {code: 400};
+ const booObject5: any = null;
+
+ fooProm = fooProm.catch(booObject1, error => {});
+ fooProm = fooProm.catch(booObject1, booObject2, error => {});
+ fooProm = fooProm.catch(booObject1, booObject2, booObject3, error => {});
+ fooProm = fooProm.catch(booObject1, booObject2, booObject3, booObject4, error => {});
+ fooProm = fooProm.catch(booObject1, booObject2, booObject3, booObject4, booObject5, error => {});
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/types/bluebird/index.d.ts b/types/bluebird/index.d.ts
index 5d1d5cfc81..8482e5fe6e 100644
--- a/types/bluebird/index.d.ts
+++ b/types/bluebird/index.d.ts
@@ -2,6 +2,7 @@
// Project: https://github.com/petkaantonov/bluebird
// Definitions by: Leonard Hecker
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.3
/*!
* The code following this comment originates from:
@@ -34,30 +35,29 @@
* THE SOFTWARE.
*/
-declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection {
+declare class Bluebird implements PromiseLike, Bluebird.Inspection {
/**
* Create a new promise. The passed in function will receive functions `resolve` and `reject` as its arguments which can be called to seal the fate of the created promise.
* If promise cancellation is enabled, passed in function will receive one more function argument `onCancel` that allows to register an optional cancellation callback.
*/
- constructor(callback: (resolve: (thenableOrResult?: R | Bluebird.Thenable) => void, reject: (error?: any) => void, onCancel?: (callback: () => void) => void) => void);
+ constructor(callback: (resolve: (thenableOrResult?: R | PromiseLike) => void, reject: (error?: any) => void, onCancel?: (callback: () => void) => void) => void);
/**
* Promises/A+ `.then()`. Returns a new promise chained from this promise. The new promise will be rejected or resolved dedefer on the passed `fulfilledHandler`, `rejectedHandler` and the state of this promise.
*/
- then(onFulfill: (value: R) => U1 | Bluebird.Thenable, onReject: (error: any) => U2 | Bluebird.Thenable): Bluebird;
- then(onFulfill: (value: R) => U | Bluebird.Thenable, onReject: (error: any) => U | Bluebird.Thenable): Bluebird;
- then(onFulfill: (value: R) => U | Bluebird.Thenable): Bluebird;
- then(): Bluebird;
+ // Based on PromiseLike.then, but returns a Bluebird instance.
+ then(onFulfill?: (value: R) => U | Bluebird.Thenable, onReject?: (error: any) => U | Bluebird.Thenable): Bluebird; // For simpler signature help.
+ then(onfulfilled?: ((value: R) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Bluebird;
/**
* This is a catch-all exception handler, shortcut for calling `.then(null, handler)` on this promise. Any exception happening in a `.then`-chain will propagate to nearest `.catch` handler.
*
* Alias `.caught();` for compatibility with earlier ECMAScript version.
*/
- catch(onReject?: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird;
- caught(onReject?: (error: any) => R | Bluebird.Thenable | void | Bluebird.Thenable): Bluebird;
- catch(onReject?: (error: any) => U | Bluebird.Thenable): Bluebird;
- caught(onReject?: (error: any) => U | Bluebird.Thenable): Bluebird;
+ catch(onReject?: (error: any) => R | PromiseLike | void | PromiseLike): Bluebird;
+ caught(onReject?: (error: any) => R | PromiseLike | void | PromiseLike): Bluebird;
+ catch(onReject?: (error: any) => U | PromiseLike): Bluebird;
+ caught(onReject?: (error: any) => U | PromiseLike): Bluebird;
/**
* This extends `.catch` to work more like catch-clauses in languages like Java or C#. Instead of manually checking `instanceof` or `.name === "SomeError"`, you may specify a number of error constructors which are eligible for this catch handler. The catch handler that is first met that has eligible constructors specified, is the one that will be called.
@@ -69,143 +69,263 @@ declare class Bluebird implements Bluebird.Thenable, Bluebird.Inspection(
- filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object,
- filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object,
- filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object,
- filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | Object,
- filter5: (new (...args: any[]) => E5) | ((error: any) => boolean) | Object,
- onReject: (error: E1 | E2 | E3 | E4 | E5) => R | Bluebird.Thenable | void | Bluebird.Thenable,
+ filter1: (new (...args: any[]) => E1),
+ filter2: (new (...args: any[]) => E2),
+ filter3: (new (...args: any[]) => E3),
+ filter4: (new (...args: any[]) => E4),
+ filter5: (new (...args: any[]) => E5),
+ onReject: (error: E1 | E2 | E3 | E4 | E5) => R | PromiseLike | void | PromiseLike,
+ ): Bluebird;
+ catch(
+ filter1: ((error: E1) => boolean) | (E1 & object),
+ filter2: ((error: E2) => boolean) | (E2 & object),
+ filter3: ((error: E3) => boolean) | (E3 & object),
+ filter4: ((error: E4) => boolean) | (E4 & object),
+ filter5: ((error: E5) => boolean) | (E5 & object),
+ onReject: (error: E1 | E2 | E3 | E4 | E5) => R | PromiseLike | void | PromiseLike,
): Bluebird;
caught(
- filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object,
- filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object,
- filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object,
- filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | Object,
- filter5: (new (...args: any[]) => E5) | ((error: any) => boolean) | Object,
- onReject: (error: E1 | E2 | E3 | E4 | E5) => R | Bluebird.Thenable | void | Bluebird.Thenable,
+ filter1: (new (...args: any[]) => E1),
+ filter2: (new (...args: any[]) => E2),
+ filter3: (new (...args: any[]) => E3),
+ filter4: (new (...args: any[]) => E4),
+ filter5: (new (...args: any[]) => E5),
+ onReject: (error: E1 | E2 | E3 | E4 | E5) => R | PromiseLike | void | PromiseLike,
+ ): Bluebird;
+ caught(
+ filter1: ((error: E1) => boolean) | (E1 & object),
+ filter2: ((error: E2) => boolean) | (E2 & object),
+ filter3: ((error: E3) => boolean) | (E3 & object),
+ filter4: ((error: E4) => boolean) | (E4 & object),
+ filter5: ((error: E5) => boolean) | (E5 & object),
+ onReject: (error: E1 | E2 | E3 | E4 | E5) => R | PromiseLike | void | PromiseLike,
): Bluebird;
catch(
- filter1: (new (...args: any[]) => E1) | ((error: any) => boolean) | Object,
- filter2: (new (...args: any[]) => E2) | ((error: any) => boolean) | Object,
- filter3: (new (...args: any[]) => E3) | ((error: any) => boolean) | Object,
- filter4: (new (...args: any[]) => E4) | ((error: any) => boolean) | Object,
- filter5: (new (...args: any[]) => E5) | ((error: any) => boolean) | Object,
- onReject: (error: E1 | E2 | E3 | E4 | E5) => U | Bluebird.Thenable,
+ filter1: (new (...args: any[]) => E1),
+ filter2: (new (...args: any[]) => E2),
+ filter3: (new (...args: any[]) => E3),
+ filter4: (new (...args: any[]) => E4),
+ filter5: (new (...args: any[]) => E5),
+ onReject: (error: E1 | E2 | E3 | E4 | E5) => U | PromiseLike | void | PromiseLike,
+ ): Bluebird;
+ catch(
+ filter1: ((error: E1) => boolean) | (E1 & object),
+ filter2: ((error: E2) => boolean) | (E2 & object),
+ filter3: ((error: E3) => boolean) | (E3 & object),
+ filter4: ((error: E4) => boolean) | (E4 & object),
+ filter5: ((error: E5) => boolean) | (E5 & object),
+ onReject: (error: E1 | E2 | E3 | E4 | E5) => U | PromiseLike